GEMINI_API_KEY is automatically generated and stored as a server-side secret for you — visible any time in the Secrets panel under Settings.- 4
Access Google AI Studio's Build Mode
Go to aistudio.google.com and sign in with your Gmail account. Select Build in the left sidebar — this opens the agentic app builder, where Gemini writes, previews, and iterates on a full Vite + React + TypeScript project for you inside the browser.
New: native Android apps, no GitHub/Vercel needed. Build mode also has a Build an Android app option that generates a real Kotlin + Jetpack Compose project instead of a web app, previewed on-device via QR code. If your end goal is purely "an app on my phone" rather than a URL you can also share on desktop, this is the most direct route — connect your Google Play Developer account and publish straight to Play's Internal Test track with one click. It doesn't yet support Firebase Auth inside AI Studio itself, so sign-in-heavy apps still need the web + PWA pipeline this guide walks through, or a follow-up session in Android Studio. The rest of this guide covers the web-app path. - 5
Describe Your App Idea
Type what you want your app to do, or start from a template in the App Gallery. Example prompts:
"Create a trivia game about world geography with multiple difficulty levels, score tracking, and fun facts after each answer.""Build a language learning assistant that helps users practice Spanish vocabulary and conversational phrases with interactive exercises."AI Studio generates a working first version in well under a minute, then you can keep chatting with the agent to add features, or open the Code tab to edit files directly.
- 6
Test Your App Thoroughly
Don't skipUse the live preview panel to test as you go. Check: Does the AI respond appropriately? Are there errors in the console? Does it handle unusual inputs gracefully? Keep refining your prompt and settings until you're satisfied.
Pro Tip: Have someone else test your app to catch issues you might miss. Try edge cases — empty input, very long input, rapid taps.Keys stay server-side. Because your Gemini API key is injected server-side by AI Studio's runtime, it's never exposed in the code you see in the browser — one less thing to worry about while you're in Build mode. - 6B
Optional Shortcut: Publish Straight from AI Studio
Fastest pathBefore heading to GitHub, know that AI Studio has its own one-click deploy: click Publish in the top bar, then Get started. Under the Google Cloud Starter Tier, your first two apps deploy straight to Cloud Run with no billing account or Google Cloud project setup — you get a live, HTTPS
*.run.app(or custom) URL in a minute or two, and can jump directly to Part 5 — Install on Android.Why this guide still walks through GitHub and Vercel/Replit. The Starter Tier caps you at two deployed apps total, on a single Cloud Run region, and isn't available if you've ever set up Google Cloud billing before. The GitHub route in Parts 3–4 gives you version history, unlimited projects, custom domains, and a repo you can hand-edit or move between hosts — worth the extra ten minutes for anything beyond a quick experiment. Use whichever fits what you're building; both produce an installable PWA.