Environment Variables Configuration
The project uses environment variables for configuration across different services. Here’s a guide to setting up the required environment variables:
Frontend Environment Variables
Expo App (frontend/apps/expo/.env
)
EXPO_PUBLIC_SITE_URL
: Your site’s URL (default: http://localhost:8081)EXPO_PUBLIC_SUPABASE_URL
: Your Supabase project URLEXPO_PUBLIC_SUPABASE_ANON_KEY
: Your Supabase anonymous keyEXPO_PUBLIC_FIREBASE_*
: Firebase configuration (get from Firebase Console)EXPO_PUBLIC_GOOGLE_CLIENT_ID_*
: Google OAuth client IDs for different platformsEXPO_PUBLIC_REST_BACKEND_URL
: Your Express.js backend URLEXPO_PUBLIC_STRIPE_*
: Stripe configuration (if using payments)
Next.js App (frontend/apps/next/.env
)
NEXT_PUBLIC_SITE_URL
: Your site’s URL (default: http://localhost:3000)NEXT_PUBLIC_SUPABASE_URL
: Your Supabase project URLNEXT_PUBLIC_SUPABASE_ANON_KEY
: Your Supabase anonymous keyNEXT_PUBLIC_FIREBASE_*
: Firebase configuration (get from Firebase Console)NEXT_PUBLIC_GOOGLE_CLIENT_ID_WEB
: Google OAuth client ID for webNEXT_PUBLIC_REST_BACKEND_URL
: Your Express.js backend URLNEXT_PUBLIC_STRIPE_*
: Stripe configuration (if using payments)
Backend Environment Variables
Express.js Server (backend/express-js/.env
)
PORT
: Server port (default: 8080)MONGODB_URL
: MongoDB connection URLJWT_*
: JWT configuration for authenticationSMTP_*
: Email service configurationGOOGLE_CLIENT_ID
andGOOGLE_CLIENT_SECRET
: Google OAuth credentialsMINIO_*
: MinIO storage configurationTWILIO_*
: Twilio configuration for SMS/OTP
Supabase Server (backend/supabase/.env
)
SUPABASE_API_URL
: Supabase API URL (default: http://127.0.0.1:54323)SITE_URL
: Your site’s URLSUPABASE_SMTP_*
: Email service configurationSUPABASE_AUTH_GOOGLE_*
: Google OAuth configuration
Getting API Keys and Credentials
- Supabase: Create a project at Supabase and get your project URL and anon key.
- Firebase: Create a project at Firebase Console and get your configuration.
- Google OAuth: Create OAuth credentials at Google Cloud Console.
- Stripe: Create an account at Stripe and get your API keys.
- Twilio: Create an account at Twilio for SMS/OTP functionality.
Security Notes
- Never commit sensitive environment variables to version control
- Use different API keys for development and production
- Keep your
.env
files in.gitignore
- Use environment variable encryption for production deployments
Related Documentation
For more information about how environment variables are handled in the application, see the Configuration and Environment Setup guide.