Deployment Guide
Deploying WatchLLM involves a Cloudflare Worker proxy and a Next.js dashboard. Both rely on pnpm and the GitHub workspace.
Worker (Cloudflare)
- Install Wrangler and login if you haven’t:
pnpm --filter @watchllm/worker install wranglerthenwrangler login. - Configure
wrangler.toml(copy the sample from the repo) withname = "watchllm-proxy",compatibility_date, and bindings forSUPABASE_*,UPSTASH_*,OPENAI_*, andSENTRY_DSN. - Publish dry run:
pnpm --filter @watchllm/worker build. - Deploy:
pnpm --filter @watchllm/worker deployorwrangler deploy --env production. - Add a custom domain in the Cloudflare dashboard (e.g.,
proxy.watchllm.dev). - Verify health:
curl https://proxy.watchllm.dev/healthreturnsstatus: ok.
Dashboard (Next.js)
- Copy
.env.exampleto.env.localand fill in Supabase, Stripe, Resend, Sentry, andNEXT_PUBLIC_APP_URL. - Build locally for sanity:
pnpm --filter @watchllm/dashboard build. - Deploy via Vercel: connect the repo, set Environment Variables, and run
pnpm --filter @watchllm/dashboard build. - Populate Stripe webhook secrets under
dashboard/app/api/webhooks/stripe/route.tsand verify in Stripe dashboard. - Enable Sentry DSN using
NEXT_PUBLIC_SENTRY_DSNfor release tracking. - After deployment, test the sign-up flow and checkout (Stripe) before announcing.
Shared Services
- Supabase: ensure
api_keys,projects,usage_logstables exist; use Supabase CLI or SQL editor. - Upstash Redis: configure
UPSTASH_REDIS_REST_URL/TOKENin both worker and test environments. - Stripe: add webhook for
/api/webhooks/stripewith secret in bothdashboard/.envand Stripe dashboard.
Continuous Deployment
- GitHub Actions run tests via
.github/workflows/test.ymlon every PR. - Merge triggers
pnpm build(worker + dashboard) from the rootbuildscript. - Tag releases with
vX.Y.Zto track Sentry deployments.