Ship to production
Everything you build on the other tabs runs first on your dev deployment. This tab takes your app to production and keeps it healthy there. Going live takes six steps, listed in How it fits together: test, set production's env, deploy, switch the providers, pass doctor --prod, and run it. Start with Deploy to production.
What it gives your app
| Part | What you get | Powered by | Before production | Start at |
|---|---|---|---|---|
| Tests | Your functions in convex-test with every component mounted and callers signed in; pages over a mock backend; Convex's lint rules | Vitest, convex-test, @nuxt/test-utils | The same tests, with no deployment and no provider | Testing |
| Hosting | One build command that ships the backend, then the app; the env split between them; previews, demos and custom domains; one-command production and a deploy template | Convex deployments, and Vercel or any host Nitro deploys to | A dev deployment and the Nuxt dev server | Deploy to production |
| The launch gate | doctor --prod fails on what a live product cannot run without, reads production's values and probes the live site | The package's CLI | doctor against the dev deployment | Prepare for launch |
| Protection | A Content Security Policy that knows the deployment, webhooks verified once that fail closed, rate limits on every route that sends mail or acts on others, bot checks | nuxt-security, the Convex rate limiter, Vercel BotID or Cloudflare Turnstile | Bot checks answer human; everything else as in production | Security model |
| Compliance | Which laws reach a client app and who answers for what; generated legal pages and a data map, a minimum age, a consent manager, the EU withdrawal button and AI-generated labels | Your counsel, with the providers' DPAs and Polar as merchant of record | The same pages, filled from your dev deployment's capabilities | Compliance |
| Monitoring | Error reports from the browser, the Nuxt server and the backend, cron check-ins, and a health endpoint | Sentry | A local error log in DevTools | Monitor errors and uptime |
| Flags | Feature flags read inside your functions, targeted by account, workspace, plan or percentage; kill switches; a maintenance notice | The backend component, on Convex | The same code, on the dev deployment | Flags and kill switches |
| Operations | Runbooks, backups, the webhook delivery log with replay, secret rotation, and the provider settings doctor --fix applies | The package, Convex, Polar and Resend | The same tools, on the providers' test modes | Monitor production |
| Releases | Provenance, an attested tarball and an SBOM for every release, a stability promise, and an upgrade command | GitHub, npm and Sigstore | What's new in 0.2 |
Each part's state is detected, never configured: npx nuxt-backend status --prod shows each capability of production with its state (Capabilities). The demo runs as a sandbox deployment: its strips page reads a flag as an experiment, and a spend limit turns on the pause_ai kill switch for the rest of a costly day.
How it fits together
A production app has two halves. The Convex deployment runs your functions and the backend component, with an env of its own. The Nuxt app runs on your host, pointed at that deployment. One variable on the deployment, BACKEND_ENVIRONMENT, decides whether the providers run in their test modes or live (Environments). Going live takes the same steps every time:
- Test and lint the backend.
defineBackendTestAppandasUserrun your functions as the deployment would (Testing), andbackendEslintapplies Convex's rules (Linting). - Set production's env. Production's own secrets and provider keys on the deployment, then
npx nuxt-backend env push --prodfor the rest. The host gets the backend URL and a production deploy key (The env split). - Deploy both halves.
npx convex deploy --cmd 'npm run build' --cmd-url-env-var-name NUXT_PUBLIC_BACKEND_URLpushes the backend, then builds the app against it (Deploy to production). - Switch the providers to production.
billing sync --env production,email sync --prodwith PREFS, a verified sending domain, both webhooks registered, production's bot-check keys, a model route and the error-reporting DSN (Service map). - Gate the launch.
npx nuxt-backend doctor --prod, then the list of what it can't see, and the first administrator (Prepare for launch). - Run it. Errors and uptime, flags and kill switches, the delivery log and the activity trail, with runbooks for when something breaks (Monitor production).
One-command production runs steps 2 to 5 as one command, and writes the app's env into a Vercel project for you.
The webhooks here are the ones your app receives. API keys and outgoing webhooks, for apps that other systems call, wait for a later release (Roadmap).
What you get
What the package ships for this part of the app, generated from the code: each name links to its reference entry.
- Pages
- /legal/accessibility/legal/privacy/legal/subprocessors/legal/terms
- Components
- <LegalProcessors><LegalStorage><LegalDetail><LegalVersion><LegalContactPoints><LegalModeration>
- Composables
- useFlaguseFlagAdminuseReportFormuseReportAppealuseExperiment
- Setup helpers
- setupRateLimitersetupWebhooksdefineFlagssetupFlags
- Findings
- backend-site-urldeployment-envdeployment-backend-environmentdeployment-removed-envenv-defaults
Deploy
Set up each service first: the Service map has the order, and a page per provider from sign-up to a passing doctor. Tests and linting run before every deploy (Test your app).
Deploy to production
Launch safely
Production checklist
doctor --prod fails on, what it probes on the live site, and the list for what no command can see.Operate
Flags and kill switches
Releases
Eject
Copy a packaged part, page or email into your app to own its source, with the version stamp that lets upgrade show what changed upstream.
Deploy to production
Ship the Convex backend and the Nuxt app with one build command on any host, split the env between them, set BACKEND_ENVIRONMENT to production, switch the providers over, make the first administrator and gate the launch on `doctor --prod`.