This contains everything you need to run your app locally.
View your app in AI Studio: https://ai.studio/apps/drive/1syB4EHXl9V0QTim57SkRqPtgAdwXTQ0C
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 project is configured to automatically deploy to GitHub Pages when you push to the main branch.
-
Add your Gemini API Key as a repository secret:
- Go to your repository settings
- Navigate to Settings → Secrets and variables → Actions
- Click "New repository secret"
- Name:
GEMINI_API_KEY - Value: Your Gemini API key
- Click "Add secret"
⚠️ Security Note: This application runs entirely in the browser and the API key will be embedded in the client-side JavaScript. Anyone who visits your deployed site can extract the API key from the page source. To mitigate this risk:- Use a restricted API key with usage limits and quotas
- Consider implementing a backend proxy service for production use
- Regularly monitor your API usage for any unusual activity
-
Enable GitHub Pages:
- Go to Settings → Pages
- Under "Source", select "GitHub Actions"
-
Deploy:
- Push your changes to the
mainbranch - The GitHub Actions workflow will automatically build and deploy your app
- Your app will be available at:
https://AWEplaysStuff.github.io
- Push your changes to the
You can also trigger a manual deployment:
- Go to Actions tab in your repository
- Select "Deploy to GitHub Pages" workflow
- Click "Run workflow"
