Store sensitive values in .dev.vars (local) or wrangler secret put (production). For integrations that need DNS verification and step-by-step setup, see Integrations in the sidebar.
Integration Guides (Recommended)
| Integration | Doc |
|---|---|
| Resend email | Full guide — API key, DNS, DMARC, verification |
BETTER_AUTH_SECRET
openssl rand -base64 32
pnpm wrangler secret put BETTER_AUTH_SECRET
Signs JWT session cookies. If leaked, rotate immediately and force users to sign in again.
Google OAuth
- Google Cloud Console → Credentials
- Create OAuth client ID → Web application
- Add authorized redirect URIs (local + production)
- Copy Client ID / Secret → env vars
Stripe
- Stripe Dashboard → Developers → API keys
- Copy Secret key →
STRIPE_SECRET_KEY - Webhooks → add endpoint → copy
whsec_...
Forward webhooks locally:
stripe listen --forward-to localhost:3000/api/stripe/webhook
Cloudflare R2
- Create bucket + API token (Object Read & Write)
- Configure
wrangler.jsoncbinding - Set
R2_*env vars
See Cloudflare Resources.
PostHog
| Variable | Where to find |
|---|---|
VITE_POSTHOG_TOKEN | Project settings → Project API Key |
POSTHOG_PERSONAL_API_KEY | Personal API Keys → phx_... |
POSTHOG_PROJECT_ID | Numeric project ID |
Google Analytics 4
- Client:
VITE_GA_MEASUREMENT_ID(stream measurement ID) - Admin: GCP service account +
pnpm ga4:grant <PROPERTY_ID>, seedocs/ga4-admin-spec.md
Good to know
Use Stripe live keys in production; test keys are for development only.
GOOGLE_REDIRECT_URImust match Google Console character-for-character.