Back to docs

Documentation

Deployment

Build, type generation, Worker deployment, and production checks.

Article
Previous

The Next.js app deploys as a Cloudflare Worker through OpenNext.

Commands

pnpm --filter @zship/web-nextjs check
pnpm --filter @zship/web-nextjs build:worker
pnpm --filter @zship/web-nextjs cf-typegen
pnpm --filter @zship/web-nextjs deploy

build:worker runs opennextjs-cloudflare build and then the Worker gzip size gate (scripts/check-worker-size.mjs, Cloudflare Free-plan 3 MiB limit). Root shortcuts are available for development, build, and deployment.

Production checklist

  • Confirm zship.app.json has the production app key, domain, site URL, SEO, and brand assets.
  • Confirm all Service Bindings in wrangler.jsonc point to the intended backend Workers.
  • Confirm fallback URLs and ZSHIP_KEY are not required in production unless deliberately configured.
  • Run typecheck and the worker build before deployment.
  • Smoke test auth, pricing, checkout creation, dashboard overview, sitemap, and llms endpoints against real backend services.