Backend variables
Validation is defined inbackend/src/config/env.validation.ts using Zod. Missing or invalid variables fail startup with a descriptive error.
Required
Optional
The email service prefers
BREVO_API_KEY when set; otherwise it falls back to SMTP_HOST (nodemailer), and to console logging if neither is configured.
Frontend variables
Only variables prefixed with
VITE_ are exposed to the client bundle. VITE_APP_URL is defined in the committed frontend/.env.production and also documented in frontend/.env.example.
Environment file locations
.env.example files as templates.
Per-environment values
Security notes
- Never commit
.envfiles to version control - Use different secrets for development and production
- Rotate
BETTER_AUTH_SECRETperiodically - Keep
DATABASE_URLandDIRECT_URLconfidential