Deployment Guide

Verify & Troubleshoot

Launch verification checklist and common issues.

Launch Checklist

#CheckExpected
1Homepage200, styles and i18n OK
2Google sign-inOAuth callback succeeds
3Magic linkResend delivers mail — see Resend integration
4Stripe CheckoutTest card 4242... succeeds
5Stripe WebhookDashboard shows 2xx
6R2 uploadAdmin can upload and access files
7Short linksgo. domain redirects correctly
8PostHog / GA4Live / Realtime events appear
9QueuesEmail campaign jobs consume successfully

Optional automation:

bash
pnpm posthog:verify:remote

Common Issues

Works locally, 500 in production

  • Check pnpm wrangler secret list for missing secrets
  • Cloudflare Dashboard → Workers → Logs for stack traces

Google redirect_uri_mismatch

GOOGLE_REDIRECT_URI must exactly match the URI in Google Console (scheme, host, path).

Stripe webhook signature failure

STRIPE_WEBHOOK_SECRET must come from the same environment (test/live) as the endpoint signing secret.

R2 credentials not configured

Production needs R2_ACCESS_KEY_ID and R2_SECRET_ACCESS_KEY secrets. Worker binding ≠ S3 API token.

Analytics missing in production

VITE_* is build-time → redeploy with pnpm run deploy after changes.

GA4 admin shows no properties

Run pnpm ga4:grant <PROPERTY_ID>, see docs/ga4-admin-spec.md.

Security Notes

  • Do not commit .dev.vars or third-party keys to Git
  • Rotate BETTER_AUTH_SECRET immediately if leaked
  • R2 API tokens: least privilege, target bucket only