Configure index.html
Critical file 1Open index.html in the AI Studio Code tab. Add these two lines if they're not already present — do NOT delete anything existing.
Inside <head>, before </head>:
<link rel="manifest" href="/manifest.json">Inside <body>, after <div id="root"></div>:
<script type="module" src="/index.tsx"></script>Create manifest.json
Critical file 2Create a new file in the root folder named manifest.json. Paste and customize:
{
"short_name": "YourApp", // shown under icon
"name": "Your Full App Name",
"start_url": "/",
"display": "standalone", // native app look
"theme_color": "#020617",
"background_color": "#020617",
"icons": [{
"src": "/icon-512.png",
"type": "image/png",
"sizes": "512x512"
}]
}Keep short_name under 12 characters. Change theme_color to match your app, and upload a real icon file to the repo rather than linking an external image — Android caches PWA icons at install time, and a broken external link means a broken icon forever.
- 10
Export Your App to GitHub
In AI Studio's Code/Preview pane, look for the GitHub icon (cat silhouette) in the header bar and click it — this opens the Push to GitHub panel (you may also see it called "Sync with GitHub"). The first time, authorize Google AI Studio's GitHub app when prompted. Set a repository name (lowercase + hyphens, e.g.
my-ai-app), set visibility to Public, and confirm.You'll see a confirmation once the initial commit lands in your new repository. After this first push, AI Studio keeps a sync link to that same repo, so later updates in Part 6 push to it directly rather than creating a new one each time — worth double-checking, since some users have reported the sync occasionally lagging behind; if a later push doesn't show up on GitHub, re-open the GitHub panel and push again.
Your API key does not travel with the export. For security, AI Studio does not copy yourGEMINI_API_KEYsecret into the GitHub repo. You'll add it manually as an environment variable in Vercel in the next part — that's expected, not a bug. - 11
Verify Your GitHub Repository
ChecklistGo to github.com and open your new repository. Confirm these files exist:
your-app-repo/ │ ├── index.html ← MUST have script tag + manifest link ├── manifest.json ← MUST exist with name, colors, icon ├── index.tsx or main.tsx — React entry point ├── package.json Node.js dependencies ├── vite.config.ts Build config ├── src/ Source code └── public/ Static assetsIfindex.htmlormanifest.jsonare missing or incorrect, edit them directly on GitHub (pencil icon on the file page) before deploying to Vercel.