Environment Variables

Backend variables (backend-js/src/app/config/envConfig.ts)

VariableRequiredDefaultNotes
MYSQL_USERYesnoneDB user.
MYSQL_PASSWORDYesnoneDB password (secret).
MYSQL_HOSTYesnoneDB host.
MYSQL_PORTNo3306DB port.
MYSQL_DATABASEYesnoneDB schema.
RESEND_API_KEYYes (for email features)noneRequired for login/reset/activation/status emails.
GOOGLE_DIRECTIONS_API_KEYYesnoneUsed for route optimization and geocoding.
JWT_SECRETNo in code, but must be set in prodhardcoded fallback stringDevelopment fallback exists; production must override.
JWT_ACCESS_EXPIRES_INNo15mAccess token TTL.
JWT_REFRESH_EXPIRES_DAYSNo7Refresh token TTL.
TRACKING_EXPIRES_DAYSNo30Tracking token TTL.
TRACKING_BASE_URLNolocalhost/prod URL by modeUsed in tracking email links.
RESET_BASE_URLNolocalhost/prod URL by modeUsed in reset/activation links.
DEFAULT_USER_PASSWORDNo in code, but security-sensitivehardcoded fallback stringSeed password for created users; must be overridden.

[!WARNING] JWT_SECRET and DEFAULT_USER_PASSWORD include hardcoded fallbacks in source. Treat them as development-only and override in production immediately.

Frontend variables (frontend-app/app/config/envConfig.ts)

VariableRequiredDefaultNotes
NEXT_PUBLIC_API_BASE_URLYes in devnoneAPI base URL for local/development frontend.
NEXT_PUBLIC_HERE_API_KEYYesnoneHERE map integration key.

Frontend hardcodes production API base URL as https://api.tolosaerronka.es/api when NODE_ENV=production.

Security-sensitive vars

  • Backend: MYSQL_PASSWORD, RESEND_API_KEY, GOOGLE_DIRECTIONS_API_KEY, JWT_SECRET, DEFAULT_USER_PASSWORD.
  • Frontend: public variables are exposed client-side by design; do not place secrets in NEXT_PUBLIC_*.

Source of truth

  • backend-js/.env.example is the seed reference.
  • Real production values should be supplied by deployment platform secrets.