-
Notifications
You must be signed in to change notification settings - Fork 0
Environment Variables
Prathamesh Bhamare edited this page Mar 9, 2026
·
1 revision
All environment variables used in MindBridge V2.
Create a file called .env in the root of your project. Copy from .env.example and fill in your values.
cp .env.example .env
β οΈ Never commit your.envfile to GitHub. It is in.gitignoreto prevent this.
| Variable | Description | Where to get it |
|---|---|---|
VITE_GEMINI_API_KEY |
Google Gemini API key | https://aistudio.google.com/app/apikey |
| Variable | Description | Where to get it |
|---|---|---|
VITE_FIREBASE_API_KEY |
Firebase web API key | Firebase Console β Project Settings β Your Apps |
VITE_FIREBASE_AUTH_DOMAIN |
Firebase auth domain | Same as above |
VITE_FIREBASE_PROJECT_ID |
Your Firebase project ID | Same as above |
VITE_FIREBASE_STORAGE_BUCKET |
Firebase storage bucket | Same as above |
VITE_FIREBASE_MESSAGING_SENDER_ID |
FCM sender ID | Same as above |
VITE_FIREBASE_APP_ID |
Firebase app ID | Same as above |
VITE_GEMINI_API_KEY=AIzaSyD3xxxxxxxxxxxxxxxxxxxx
VITE_FIREBASE_API_KEY=AIzaSyC44xxxxxxxxxxxxxxxxxxxx
VITE_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your-project-id
VITE_FIREBASE_STORAGE_BUCKET=your-project.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=123456789
VITE_FIREBASE_APP_ID=1:123456789:web:abcdefghij-
No quotes around values β just paste directly after the
= -
No spaces around the
=sign -
Save the file before running
npm run dev -
Restart the dev server after any
.envchange (Ctrl+C thennpm run dev) -
All variables must start with
VITE_β otherwise Vite won't expose them to the browser
For the live deployment to work via GitHub Actions, add all these same variables as GitHub Secrets:
- Go to your repo β Settings β Secrets and variables β Actions
- Click New repository secret
- Add each variable β name exactly as above, value exactly as in your
.env
See CI/CD Pipeline for the full setup.
If you need to update a key (e.g. new Gemini API key):
- Update your local
.envfile - Update the GitHub Secret:
- Go to repo β Settings β Secrets β click pencil icon β paste new value
- Trigger a redeploy:
git commit --allow-empty -m "Refresh deployment"
git push