DEV Community

NP
NP

Posted on

AI Studio - 100% Vide Coded React app

Education Track: Build Apps with Google AI Studio

I used AI studio Build to create a React app from scratch. I challenged myself to make a fully AI-coded application, testing the limits of what’s possible.

My Journey:

Attempt 1:

I actually built the same project twice. My first attempt was tough because I tried to do too much in a single prompt. Although my initial prompt was detailed and seemingly accurate, it wasn’t particularly helpful. As I kept adding more details, the outputs became increasingly inconsistent and scattered.

Create a React + FastAPI + Firebase web application called "VoiceBeat" - a voice-driven drum machine where users vocalize drum patterns that get converted to actual drum sounds.

CORE FUNCTIONALITY:

1. INSTRUMENT SETUP SECTION:
- Allow users to create mappings for 5 drum instruments: Kick, Snare, Hi-hat, Clap, Tom
- For each instrument, user inputs a text label for their vocal sound (e.g., "boom" for Kick, "chuck" for Snare, "tss" for Hi-hat)
- Each instrument has a "Preview" button to hear the software drum sample
- Use clean, modern UI with instrument icons

2. RECORDING SECTION:
- Time signature selector (4/4, 3/4, 6/8)
- BPM input field (default 120 BPM)
- Metronome toggle (on/off) with visual click indicator
- Two recording options:
  a) "Record Voice" button - records audio in real-time from microphone
  b) "Upload Audio" button - allows uploading audio file (mp3, wav)
- Display recording timer and waveform visualization during recording
- Stop recording button

3. AUDIO PROCESSING:
- Use Web Speech API or Gemini API to transcribe the recorded/uploaded audio to text with timestamps
- Match transcribed words to user's defined instrument labels
- Preserve timing gaps between vocal sounds (this is critical for rhythm)
- Display detected pattern as a visual timeline with instrument hits marked

4. PLAYBACK SECTION:
- Visual timeline showing each detected drum hit with instrument name and timing
- Play button to hear the pattern with software drum samples
- Metronome option during playback
- Display current playback position
- Allow basic editing: add/remove/move individual hits on timeline

5. FIREBASE INTEGRATION:
- User authentication (Google sign-in)
- Save instrument mappings (vocal label → drum instrument)
- Save created patterns with name and metadata
- Load saved patterns
- Simple profile page showing user's saved patterns

6. TECHNICAL REQUIREMENTS:
- React frontend with modern hooks
- FastAPI backend for audio processing and Firebase integration
- Use Web Audio API for drum sample playback and metronome
- Include 5 high-quality drum samples (kick, snare, hi-hat, clap, tom)
- Responsive design, mobile-friendly
- Clean, minimalist UI with good UX

7. UI/UX:
- Single page app with clear sections
- Modern color scheme (suggest dark theme for music app)
- Clear visual feedback for all actions
- Loading states during processing
- Error handling with user-friendly messages

Start with a working prototype that focuses on the core flow: setup instruments → record voice → see detected pattern → play back with drum sounds.
Enter fullscreen mode Exit fullscreen mode

Attempt 2:

The second attempt was far more streamlined and produced much better results. This time, I abandoned the idea of combining multiple frameworks and tools and focused solely on building a clean, well-structured React application.

Setup

I started with a prompt focused only on the UI—setting up a five-piece drum kit displayed as cards, defining both the layout and app structure.

Create a React web application called "VoiceBeat" - a voice-driven drum machine.

For this first step, build ONLY the instrument setup section. No other features yet.

REQUIREMENTS:

1. CREATE INSTRUMENT SETUP SECTION:
- Display 5 drum instruments in a clean horizontal grid layout
- The 5 instruments are: Kick, Snare, Hi-hat, Clap, Tom

2. EACH INSTRUMENT CARD SHOWS:
- Instrument name as a heading
- A small icon or emoji representing the instrument (🥁 for Kick, 🎵 for Snare, etc.)
- A text input field labeled "Vocal Sound" with these default values:
  - Kick: "boom"
  - Snare: "ka"
  - Hi-hat: "tss"
  - Clap: "clap"
  - Tom: "dum"
- A "Preview" button (doesn't need to work yet, just display it)
- Color-coded accent (border or background):
  - Kick: red accent
  - Snare: blue accent
  - Hi-hat: yellow accent
  - Clap: green accent
  - Tom: purple accent

3. DESIGN REQUIREMENTS:
- Use indigo color theme for the overall app background and UI elements
- Modern, clean design with good spacing
- Responsive layout
- Cards should be visually distinct but consistent
- Use Tailwind CSS for styling

4. APP STRUCTURE:
- Simple single-page React app
- Clean component structure
- No backend needed for this step
- No other sections yet (we'll add timeline, controls, etc. in next steps)

Focus only on making the instrument setup section look polished and functional for user input. The preview buttons don't need to do anything yet.
Enter fullscreen mode Exit fullscreen mode

Next, I placed all the drum cards in a left sidebar and built a sequencer for each of the five instruments. The implementation turned out neat and fully functional. You can check out the video below to see it in action.

Added controls

After that, I worked on adding controls—Play, Stop, BPM, Metronome, Bars, and Time Signature. I spent some time resolving layout issues like scrolling and styling, and I fixed the metronome and time signature logic since they weren’t syncing properly at first. For each prompt, I focused on one to three small fixes or updates at a time. One of those prompts looked like this:

Fix two metronome issues:

1. Metronome should respect the selected time signature (currently always plays 4/4):
   - 4/4 = downbeat every 4 beats
   - 3/4 = downbeat every 3 beats
   - 6/8 = downbeat every 6 beats

2. When sequencer is already playing and user turns metronome ON, it should start immediately in sync with the current playback position (not wait for next loop).
Enter fullscreen mode Exit fullscreen mode

Changed sequencer functioning

Next, I improved the sequencer’s visual layout by introducing a proper timeline view instead of plain boxes. This made the bars and sub-beats visually distinct. I also added the ability for users to drag and reposition selected notes along the timeline.

Voice mapping

This was the most crucial part—the Voice Mapping logic. Users can record or upload an audio clip of a rhythm they have in mind, such as “boom boom ka boom boom tss boom boom ka boom boom clap.” The app analyzes the audio using the Gemini API, identifies the sounds, and maps them to corresponding drum instruments to automatically generate a track. It’s essentially a lightweight version of a DAW combined with an intelligent pattern note-taker. The vocal mapping is editable, allowing users to assign specific words to particular instruments or notes.

Instrument Voice mapping

Midi export

The final step was exporting the project as a MIDI file that can be used in any DAW. You can see this in the demo video. Initially, each instrument was exported on a separate track, so I refined it to consolidate everything into one track.

To wrap up, I also added piano and guitar instruments and mapped them accordingly.

Final Voice Beats 1

Final Voice Beats 2

Pros:

  • Restoring a previous version of the project is as easy as clicking a button. If something goes wrong, you can instantly revert to an earlier state.
  • Deployment is just as simple—after connecting your project to the Cloud Console, click Deploy in AI Studio, select the project, and you’re done. The Studio handles the rest and provides a live deployment link.
  • Gemini API integration is seamless—it automatically creates an API key and connects it during development and deployment.
  • You can define system instructions for the project, such as specific tools or knowledge it should use.
  • The prompt supports file and voice uploads as inputs, adding a lot of flexibility.

Cons:

  • Chat history isn’t saved after a session. You can continue the project later, but if you refresh the browser or revisit the project, you lose previous context.
  • Each file has version control, but versions aren’t labeled clearly enough to identify changes easily.
  • Since the app was built in React, AI Studio tends to put all code into a single App.tsx file, which becomes difficult to manage. I had to ask it to split it into multiple files after few prompts.
  • The Auto Fix button appears when unresolved errors occur, but it doesn’t always provide enough details about what went wrong. In that case, I had to revert to the latest stable version.

My recommendations:

  • Keep it simple. Work on one major task or a few minor ones at a time. Avoid overloading prompts. If a task feels too big, break it into smaller checkpoints.
  • Revert early. If multiple prompts or Auto Fix attempts make things worse, roll back to a stable version immediately and try a different approach.
  • Allow flexibility. The Studio produces better results when you give it some creative room rather than rigid instructions.
  • Since chat history isn’t saved after a session, save your prompts in a separate file. Alternatively, you could use system instructions to make the app save them automatically—something I didn’t try but would recommend experimenting with.

Overall, AI Studio is a powerful tool for both non-developers who want to visualize their ideas in real life and experienced developers (like me) looking to speed up their workflow and reduce manual coding time.

Top comments (3)

Collapse
 
neurolov__ai profile image
Neurolov AI

That’s an impressive deep dive and honestly, a solid case study of how far AI-assisted development has come. What stands out most is how you treated it like a collaboration, not a shortcut. Breaking big goals into small, iterative prompts is exactly how you get value from these tools. The part about “VoiceBeat” using vocal mapping to generate drum patterns is brilliant it’s creative, technically challenging, and a perfect example of where AI-driven prototyping shines. The pain points you noted (context loss, code sprawl, unclear versioning) are real, but your workflow shows how to work with those limitations instead of getting stuck in them. This feels like the future of how we’ll all build fast, experimental, and human-guided.

Collapse
 
np_hacks_code profile image
NP

Thank you! Yup, this is how the development practices will soon change! I am building muscle memory :D

Collapse
 
roshan_sharma_617a6e70ff5 profile image
Roshan Sharma

This came out really cool, and breaking the work into smaller prompts clearly paid off. Love how the voice mapping and MIDI export came together.