Ship to production

Test the backend, deploy both halves on any host with Vercel first, switch every provider from its test mode to production, gate the launch on doctor --prod, then run it: errors and uptime, flags and kill switches, runbooks, backups and releases.

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

PartWhat you getPowered byBefore productionStart at
TestsYour functions in convex-test with every component mounted and callers signed in; pages over a mock backend; Convex's lint rulesVitest, convex-test, @nuxt/test-utilsThe same tests, with no deployment and no providerTesting
HostingOne 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 templateConvex deployments, and Vercel or any host Nitro deploys toA dev deployment and the Nuxt dev serverDeploy to production
The launch gatedoctor --prod fails on what a live product cannot run without, reads production's values and probes the live siteThe package's CLIdoctor against the dev deploymentPrepare for launch
ProtectionA 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 checksnuxt-security, the Convex rate limiter, Vercel BotID or Cloudflare TurnstileBot checks answer human; everything else as in productionSecurity model
ComplianceWhich 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 labelsYour counsel, with the providers' DPAs and Polar as merchant of recordThe same pages, filled from your dev deployment's capabilitiesCompliance
MonitoringError reports from the browser, the Nuxt server and the backend, cron check-ins, and a health endpointSentryA local error log in DevToolsMonitor errors and uptime
FlagsFeature flags read inside your functions, targeted by account, workspace, plan or percentage; kill switches; a maintenance noticeThe backend component, on ConvexThe same code, on the dev deploymentFlags and kill switches
OperationsRunbooks, backups, the webhook delivery log with replay, secret rotation, and the provider settings doctor --fix appliesThe package, Convex, Polar and ResendThe same tools, on the providers' test modesMonitor production
ReleasesProvenance, an attested tarball and an SBOM for every release, a stability promise, and an upgrade commandGitHub, npm and SigstoreWhat'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:

  1. Test and lint the backend. defineBackendTestApp and asUser run your functions as the deployment would (Testing), and backendEslint applies Convex's rules (Linting).
  2. Set production's env. Production's own secrets and provider keys on the deployment, then npx nuxt-backend env push --prod for the rest. The host gets the backend URL and a production deploy key (The env split).
  3. Deploy both halves. npx convex deploy --cmd 'npm run build' --cmd-url-env-var-name NUXT_PUBLIC_BACKEND_URL pushes the backend, then builds the app against it (Deploy to production).
  4. Switch the providers to production. billing sync --env production, email sync --prod with PREFS, a verified sending domain, both webhooks registered, production's bot-check keys, a model route and the error-reporting DSN (Service map).
  5. Gate the launch. npx nuxt-backend doctor --prod, then the list of what it can't see, and the first administrator (Prepare for launch).
  6. 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

One build command on any host, the env split, and the first deploy step by step.

Deploy to Vercel

BotID, Sentry's integration and the AI Gateway, then this site's setup: analytics without cookies and edge rate limits.

One-command production

One command sets up production and writes the app's Vercel env.

Deploy template

A new app on Vercel from its first commit, with Convex through the Marketplace.

Previews

A backend per branch, with its exact origin and every provider in its test mode.

Self-hosting and domains

A self-hosted backend, and custom domains for the deployment.

Demo and staging

Production mode on the providers' test modes, with BACKEND_ENVIRONMENT=sandbox.

Launch safely

Production checklist

What doctor --prod fails on, what it probes on the live site, and the list for what no command can see.

Security model

The policy, the webhook edge, sign-in limits, step-up, administrator visits and what stays internal.

Rate limits

Every limit on a route that sends mail or acts on others, and how to tune it.

Webhooks

The routes providers call, verified once and failing closed, with the delivery log.

Rotate secrets

Every secret replaced without signing anyone out or dropping a delivery.

Security surface

Everything an outsider can reach, reviewed as one checkpoint.

Supply chain

Lockfiles, an install cooldown, scripts allowed by name and reviewed agent config.

Compliance

Which laws reach a client app: privacy, accessibility, AI labels, moderation, email and subscriptions.

Operate

Monitor production

Where to look once the app is live, and what each place tells you.

Monitor errors and uptime

Error reports from every side, cron check-ins and the health endpoint.

Flags and kill switches

Roll features out by account, workspace, plan or percentage, and pause services in one switch.

Respond to incidents

What to do first when something breaks.

Replay deliveries

Send a webhook delivery an endpoint missed again.

Troubleshooting

Symptoms, log codes and their fixes.

Backup and restore

Snapshots of the deployment, a restore with the providers caught up, and a rollback.

Get help

Where to ask, what to include, and how a security report differs.

Releases

What's new in 0.2

The first release, capability by capability, and what is still experimental.

Changelog

Every release, generated from the commits.

Stability

What a minor or a patch release may change, and the experimental tier.

Verify a release

npm's provenance, the attested tarball and its SBOM.

Upgrade to a new version

Install a release, repair the scaffold and migrate the package's data in one command.