Skip to main content

Configuration

All configuration is browser-visible VITE_* variables read through import.meta.env. None are secrets. Reference file: .env.example.

VariableRead inEffect
VITE_SANITY_PROJECT_ID, VITE_SANITY_DATASET, VITE_SANITY_API_VERSION, VITE_SANITY_STUDIO_URLsrc/lib/sanity/env.tsSanity client. Required: the app throws at startup if one is missing
VITE_SANITY_VIEWER_TOKENsrc/lib/sanity/env.tsDraft preview (?preview=1). Only set in preview builds
VITE_EMAW_API_BASE_URLevery src/lib/*.ts API clientBackend origin, no trailing slash
VITE_STRIPE_PUBLISHABLE_KEYsrc/lib/stripe.tsEnables /checkout, paid event registration and donations. pk_test_ in dev, pk_live_ in prod
VITE_GOOGLE_CLIENT_IDsrc/lib/account/google.tsShows the Google sign-in buttons. Empty hides them
VITE_EMAW_APP_URLsrc/lib/app.tsWeb-app origin for the hand-off. Empty hides every "Open the app" entry point

import.meta.env.DEV enables Sanity visual editing.

Where values live​

EnvironmentSource
Local.env.local (gitignored)
develop deploy (CI)GitHub repository variables (vars.VITE_*), passed to npm run deploy:develop by the workflow. The .env.* files are gitignored in this repo
ProductionCloudflare Pages → project → Settings → Environment variables (Production), or the shell that runs the manual deploy

Leftovers to ignore​

  • .env.development / .env.production set VITE_BACKEND_URL, which nothing reads any more.
  • constants/url.tsx points at an unrelated API and is unused.
  • .dev.vars defines R2_* and STUDIO_* keys that no code in this repo reads; R2 credentials belong on the backend.

These are on the known gaps list.