📌 For Cloud Deployment: See CLOUD_DEPLOYMENT.md for step-by-step cloud deployment instructions.
# Production Environment Variables
NODE_ENV=production
PORT=5000
# Database (use production database)
DATABASE_URL="postgresql://user:password@prod-db-host:5432/prod_db"
# Google OAuth (update redirect URL)
GOOGLE_CLIENT_ID="your_client_id"
GOOGLE_CLIENT_SECRET="your_client_secret"
GOOGLE_REDIRECT_URL="https://your-backend-domain.com/api/auth/google/callback"
# CORS Security
FRONTEND_URL="https://your-frontend-domain.com"# Frontend Production Environment
NEXT_PUBLIC_API_URL=https://your-backend-domain.com/api- CORS Protection: Only allows requests from specified frontend URL
- Environment Variables: All sensitive data moved to .env files
- Gitignore Protection: .env files excluded from git
- OAuth Redirect Security: Callback URLs properly configured
-
Add Production Redirect URIs:
https://your-backend-domain.com/api/auth/google/callback
-
Add Production Origins (if needed):
https://your-frontend-domain.com
- Production Database: Set up PostgreSQL instance
- Run Migrations:
npx prisma migrate deploy npx prisma generate
npm run build # if you add build script
npm start # or npm run dev for developmentnpm run build
npm startBackend:
- Railway
- Render
- Heroku
- DigitalOcean App Platform
Frontend:
- Vercel
- Netlify
- Railway
Database:
- Railway PostgreSQL
- Supabase
- PlanetScale
- AWS RDS
- Connect GitHub repository
- Set environment variables in dashboard
- Deploy automatically
- Connect GitHub repository
- Add PostgreSQL service
- Set environment variables
- Deploy automatically
- Never commit .env files
- Use different Google OAuth credentials for production
- Use HTTPS in production
- Set up proper database access controls
- Enable production logging
# Backend
npm run build
npm start
# Frontend
npm run build
npm start- ✅ Update Google OAuth redirect URLs
- ✅ Set up production database
- ✅ Configure environment variables on hosting platform
- ✅ Test OAuth flow with production URLs
- ✅ Test calendar event creation
- ✅ Monitor logs for errors