src/env.ts — open it for the source of truth.
This page mirrors that file, organized by category, so you can copy-paste your way
to a working .env.local (and prod env) in one pass.
A few conventions:
- Required vars throw at startup if missing or empty.
- Optional vars default to empty string and the consuming module no-ops gracefully.
NEXT_PUBLIC_*vars are shipped to the browser. Never put secrets in them.- Set
SKIP_ENV_VALIDATION=trueto bypass validation in CI build steps that don’t need real values (Vercel preview builds, Docker image bakes, etc.).
Core
The bare minimum for the app to boot.OAuth
Each provider is independent — set both id + secret to enable, leave blank to hide.RESEND_API_KEY is empty.
Newsletter — Beehiiv
Only used ifsiteConfig.newsletter.provider = 'beehiiv'.
Payments — Stripe
Default provider. Only the*_PRICE_* ids you actually sell need to be set.
Payments — Creem
Only used ifsiteConfig.payment.provider = 'creem'.
AI providers
SetAI_PROVIDER to switch between providers. The mock provider streams fake
tokens without keys, so demo pages run offline out of the box.
Storage (S3 / R2)
Stub by default — wire only if you need uploads or signed downloads.Anti-bot — Cloudflare Turnstile
Set both keys to enable Turnstile on signup, forgot-password, and newsletter forms.Customer service
One widget at a time, picked bysiteConfig.customerService.provider. Each widget
self-gates on its env vars.
Affiliate
Set the matching var(s) for whichever provider is active insiteConfig.affiliate.provider.
The internal provider needs no env vars.
Analytics
Each script renders only when its env var is set. Mix and match freely.Search-engine site verification
Each emits a<meta> tag in <head> via Next.js metadata.verification,
proving ownership in the matching webmaster console. Server-side env vars (no
NEXT_PUBLIC_ prefix). Empty values render no tag.
GitHub invite delivery
Token used by the buyer flow to add a paid customer as a read-only collaborator on your private source repo. See GitHub invite delivery for the full setup.Misc
See also
- Vercel deployment — where to paste these in production.
- Cloudflare deployment —
wrangler secret putfor each secret. - Configuration —
siteConfigtoggles that switch which providers read which keys.