Environment Security Guide
🔒 Security Setup Complete
Your environment files are now secured with the following approach:
Files Structure:
✅ env.development.example # Committed (safe templates)
✅ env.production.example # Committed (safe templates)
🔒 env.development # NOT committed (real credentials)
🔒 env.production # NOT committed (real credentials)
🔒 .env # NOT committed (active config)
What's Protected:
- ✅ Real Supabase keys are NOT in git
- ✅ Database passwords are NOT in git
- ✅ Secret keys are NOT in git
- ✅ Templates show structure without secrets
🚀 Setup Instructions:
For New Team Members:
-
Copy template files:
cp env.development.example env.developmentcp env.production.example env.production -
Replace placeholders with real values:
# In env.development, replace:your-dev-project.supabase.co → actual dev project URLyour-dev-supabase-anon-key-here → actual dev anon keyyour-dev-supabase-service-role-key → actual dev service role keyyour-dev-password → actual dev database password -
Never commit the real files:
# These are automatically gitignored:env.developmentenv.production
For Production Deployment:
-
Vercel Environment Variables:
- Use values from
env.production - Set in Vercel Dashboard → Settings → Environment Variables
- Never store production secrets in git
- Use values from
-
Required Vercel Variables:
NODE_ENV=productionVITE_SUPABASE_URL=...VITE_SUPABASE_ANON_KEY=...SUPABASE_URL=...SUPABASE_SERVICE_ROLE_KEY=...SECRET_KEY=...JWT_SECRET=...
🛡️ Security Benefits:
- Team Collaboration: Everyone uses same structure
- Secret Protection: Real credentials never in git history
- Easy Setup: Copy examples → replace values
- Production Safety: Secrets only in deployment platform
- Audit Trail: Can see what variables are needed without exposing values
⚠️ Important Notes:
- Existing git history may contain old secrets - consider rotating them
- Never commit files ending in
env.developmentorenv.production - Always use
.examplefiles for templates - Rotate secrets if they were previously committed
Your environment setup is now secure! 🔐