Skip to main content

Backend Variables

Required

Application

Redis

Security

Monitoring

Frontend Variables

All frontend variables must be prefixed with VITE_.

Example Files

backend/.env.example

frontend/.env.example

Environment-Specific Values

Development

Staging

Production

Generating Secret Key

Security Best Practices

Never commit .env files to version control. Always use .env.example as a template.
  • Store secrets in environment variables, not code
  • Use different keys for each environment
  • Rotate keys periodically
  • Never log secret values
  • Limit who has access to production secrets
  • Use secret management tools (AWS Secrets Manager, Vault)
  • Audit secret access
  • Use GitHub Secrets for CI/CD
  • Don’t echo secrets in logs
  • Mask secrets in output

Validating Configuration

Backend

The application validates required variables on startup:

Frontend

Check Vite loads variables correctly: