Skip to main content
The scaffold validates env vars at startup with @t3-oss/env-nextjs and Zod. The full schema lives in 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=true to 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.

Mail

Resend is the default. The mail facade no-ops gracefully if RESEND_API_KEY is empty.

Newsletter — Beehiiv

Only used if siteConfig.newsletter.provider = 'beehiiv'.

Payments — Stripe

Default provider. Only the *_PRICE_* ids you actually sell need to be set.

Payments — Creem

Only used if siteConfig.payment.provider = 'creem'.

AI providers

Set AI_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 by siteConfig.customerService.provider. Each widget self-gates on its env vars.

Affiliate

Set the matching var(s) for whichever provider is active in siteConfig.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