Environment variables
All variables are validated at startup by using Zod, so a
misconfiguration fails fast with a clear message instead of a runtime crash.
Import the typed env object instead of reading process.env directly.
Copy .env.example to .env and fill in the values.
Reference
"Required" variables must be present for the app to boot. Optional variables light up their feature when set — the template runs with just a database and one AI key.
Notes
- Empty strings (
"") are treated as unset. - Set
SKIP_ENV_VALIDATION=1to bypass validation (used in the Docker build step and CI lint). - Client-exposed variables must be prefixed with
NEXT_PUBLIC_.