Configuration
All configuration is browser-visible VITE_* variables read through import.meta.env. None are secrets. Reference file: .env.example.
| Variable | Read in | Effect |
|---|---|---|
VITE_SANITY_PROJECT_ID, VITE_SANITY_DATASET, VITE_SANITY_API_VERSION, VITE_SANITY_STUDIO_URL | src/lib/sanity/env.ts | Sanity client. Required: the app throws at startup if one is missing |
VITE_SANITY_VIEWER_TOKEN | src/lib/sanity/env.ts | Draft preview (?preview=1). Only set in preview builds |
VITE_EMAW_API_BASE_URL | every src/lib/*.ts API client | Backend origin, no trailing slash |
VITE_STRIPE_PUBLISHABLE_KEY | src/lib/stripe.ts | Enables /checkout, paid event registration and donations. pk_test_ in dev, pk_live_ in prod |
VITE_GOOGLE_CLIENT_ID | src/lib/account/google.ts | Shows the Google sign-in buttons. Empty hides them |
VITE_EMAW_APP_URL | src/lib/app.ts | Web-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
| Environment | Source |
|---|---|
| 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 |
| Production | Cloudflare Pages → project → Settings → Environment variables (Production), or the shell that runs the manual deploy |
Leftovers to ignore
.env.development/.env.productionsetVITE_BACKEND_URL, which nothing reads any more.constants/url.tsxpoints at an unrelated API and is unused..dev.varsdefinesR2_*andSTUDIO_*keys that no code in this repo reads; R2 credentials belong on the backend.
These are on the known gaps list.