If you shared your OpenAI API key in plain text, you MUST:
-
Rotate it immediately:
- Go to https://platform.openai.com/api-keys
- Delete the exposed key
- Create a new key
-
Never share API keys in plain text - Use secure methods (password managers, encrypted messages)
-
Set up the new key using the instructions below
Firebase API keys are PUBLIC and safe to share. Add these to your .env file:
VITE_FIREBASE_API_KEY=AIzaSyDXMFwcfwe-vtwP52hQiisy0dxzjc2d1nQ
VITE_FIREBASE_AUTH_DOMAIN=acceens-5f3ad.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=acceens-5f3ad
VITE_FIREBASE_STORAGE_BUCKET=acceens-5f3ad.firebasestorage.app
VITE_FIREBASE_MESSAGING_SENDER_ID=384687344035
VITE_FIREBASE_APP_ID=1:384687344035:web:e129c33106e4a7849eb216
VITE_FIREBASE_MEASUREMENT_ID=G-4K07SBY9RL# Install Firebase CLI (if not already installed)
npm install -g firebase-tools
# Login to Firebase
firebase login
# Set OpenAI API key as a secret (SECURE METHOD)
firebase functions:secrets:set OPENAI_API_KEY
# When prompted, paste your OpenAI API key and press Enter
# Deploy functions
cd functions
npm install
firebase deploy --only functionsCreate a .env file in the project root (already in .gitignore):
OPENAI_API_KEY=your-api-key-here# Linux/Mac
export OPENAI_API_KEY="your-api-key-here"
# Windows PowerShell
$env:OPENAI_API_KEY="your-api-key-here"
# Windows CMD
set OPENAI_API_KEY=your-api-key-here- Clone the repository
- Run
npm install - Create
.envfile - Add Firebase configuration to
.env(values above) - Get your own OpenAI API key from https://platform.openai.com/api-keys
- Set OpenAI key locally (for development)
- Get access to Firebase project (ask team lead)
- Run
npm run dev - Test the application
To give teammates access to the Firebase project:
- Go to Firebase Console
- Select project: AccessLens (acceens-5f3ad)
- Go to: Project Settings > Users and permissions
- Click Add member
- Enter teammate's email
- Assign role: Editor (for development) or Viewer (read-only)
- Click Add
- Firebase API keys (they're public)
- Firebase project configuration
- Setup instructions
- OpenAI API keys (private, expensive)
- Personal
.envfiles - Service account keys
- Password managers (1Password, LastPass)
- Encrypted messages
- Secure team channels
- Environment variable management tools
- Check that
.envfile exists and hasOPENAI_API_KEY=your-key - Verify environment variable is set:
echo $OPENAI_API_KEY - Restart terminal/IDE after setting environment variables
- Ask team lead to add you to Firebase project
- Verify you're logged in:
firebase login
- Check that OpenAI secret is set:
firebase functions:secrets:access OPENAI_API_KEY - Check function logs:
firebase functions:log - Redeploy functions:
firebase deploy --only functions
- See OpenAI API Key Setup Guide for detailed instructions
- See Environment Setup Guide for Firebase setup
- See Firebase Setup Guide for Firebase configuration
- Monitor OpenAI usage: https://platform.openai.com/usage
- Set spending limits: https://platform.openai.com/account/billing/limits
- Use GPT-3.5-turbo (cheaper) for summaries
Remember: Never share OpenAI API keys in plain text. Always use secure methods!