Prerequisites: Node.js
-
Install dependencies:
npm install
-
Set up environment variables:
cp .env.example .env.local
Then edit
.env.localand add your Gemini API key. -
Run the app:
npm run dev
-
Push your code to a Git repository (GitHub, GitLab, etc.)
-
Go to Netlify and sign in
-
Click "New site from Git" and connect your repository
-
Configure build settings:
- Build command:
npm run build - Publish directory:
dist
- Build command:
-
Add environment variables in Netlify:
- Go to Site settings → Environment variables
- Add
GEMINI_API_KEYwith your actual API key
-
Deploy! Netlify will automatically build and deploy your site.
-
Build the project locally:
npm run build
-
Go to Netlify and drag the
distfolder to the deploy area -
After deployment, add your environment variables:
- Go to Site settings → Environment variables
- Add
GEMINI_API_KEYwith your actual API key
-
Redeploy to apply the environment variables
Make sure to set the following environment variable in Netlify:
GEMINI_API_KEY: Your Google Gemini API key
You can get a Gemini API key from Google AI Studio.
This project requires Node.js 20 or higher. The deployment is configured to use Node 20 automatically via:
.nvmrcfilenetlify.tomlconfigurationpackage.jsonengines field