This contains everything you need to run your app locally.
View your app in AI Studio: https://ai.studio/apps/cdfe12e8-77c2-4d49-a790-3dfe14091c11
Prerequisites: Node.js
- Install dependencies:
npm install - Set the
GEMINI_API_KEYin .env.local to your Gemini API key - Run the app:
npm run dev
This app is built for Google AI Studio. Open the link below to view and redeploy it directly from AI Studio:
https://ai.studio/apps/cdfe12e8-77c2-4d49-a790-3dfe14091c11
AI Studio automatically injects the GEMINI_API_KEY and APP_URL secrets at runtime — no manual configuration needed.
- Push your code to a GitHub repository.
- Import the repository at vercel.com/new.
- Set the Build Command to
npm run buildand the Output Directory todist. - Add the
GEMINI_API_KEYenvironment variable in Project Settings → Environment Variables. - Click Deploy.
- Push your code to a GitHub repository.
- Import the repository at app.netlify.com and choose Add new site → Import an existing project.
- Set the Build Command to
npm run buildand the Publish Directory todist. - Add the
GEMINI_API_KEYenvironment variable under Site configuration → Environment variables. - Click Deploy site.
- Build the production bundle:
npm run build
- The static files are generated in the
dist/directory. - Serve the
dist/folder with any static file server (nginx, Apache, Caddy,serve, etc.). - Make sure the
GEMINI_API_KEYenvironment variable is available at build time (it is embedded into the bundle by Vite).
Security note: Because Vite injects
GEMINI_API_KEYdirectly into the client-side JavaScript bundle, anyone who downloads your app can extract the key. Use API key restrictions in Google AI Studio to limit the key to specific HTTP referrers, and consider a short-lived or project-scoped key when self-hosting publicly.
