Skip to main content

Backend variables

Validation is defined in backend/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

Use the .env.example files as templates.

Per-environment values

Security notes

  • Never commit .env files to version control
  • Use different secrets for development and production
  • Rotate BETTER_AUTH_SECRET periodically
  • Keep DATABASE_URL and DIRECT_URL confidential