# Nuxt backend > The all-in-one backend for client apps on Nuxt and Convex — sign-in with codes and passkeys, workspaces, plans and credits, email and notifications, AI jobs, files and an admin console, from one package. Version: nuxt-backend 0.6.x Every page: [llms.txt](https://nuxt-backend.dev/llms.txt) · Skill for coding agents: [nuxt-backend](https://nuxt-backend.dev/.well-known/skills/nuxt-backend/SKILL.md) Commands use npm; use your project's package manager. Sign-in with codes and passkeys, workspaces, plans and credits, email and notifications, AI jobs, files and an admin console. One Nuxt module and one Convex component give a client app its whole backend, behind one API. Install it with `npx nuxt module add nuxt-backend`, or hand the install to a coding agent with this prompt: ```text Install nuxt-backend, the all-in-one SaaS backend for Nuxt on Convex, in this project: run `npx -y skills@1.7.0 add https://nuxt-backend.dev --skill nuxt-backend -y`, then follow .agents/skills/nuxt-backend/references/install.md. ``` - [Quickstart](https://nuxt-backend.dev/docs/start/quickstart): from an empty Nuxt app to a running backend. - [Start](https://nuxt-backend.dev/docs/start): what the package is, and whether it fits. - [Playground](https://nuxt-backend.dev/playground): Panels, the app the tutorial builds, running for a signed-in person; it has no Markdown twin. ## Everything behind a client app Twelve app layers, each with its pages, components and checks, on when its key is set: - [Auth](https://nuxt-backend.dev/docs/build/auth): Sign-in codes and passkeys, workspaces, launch phases and invites. - [Data](https://nuxt-backend.dev/docs/build/data): Realtime queries, search, checked uploads and share links. - [Jobs](https://nuxt-backend.dev/docs/build/data/jobs): Workflows, schedules, queues and retention. - [Billing](https://nuxt-backend.dev/docs/build/billing): Plans, credits, promotions, gifts and referrals. - [Email](https://nuxt-backend.dev/docs/build/email): Branded templates, topics and one-click unsubscribe. - [Notifications](https://nuxt-backend.dev/docs/build/email/notifications): An in-app inbox and web push, each kind opted into (planned). - [AI](https://nuxt-backend.dev/docs/build/ai): Metered model calls, generation jobs and chat (experimental). - [Protection](https://nuxt-backend.dev/docs/build/auth/sign-in/bots): Bot checks, rate limits and content safety. - [Monitoring](https://nuxt-backend.dev/docs/ship/operate/monitoring): Errors, cron monitors and a health endpoint. - [Flags](https://nuxt-backend.dev/docs/ship/operate/flags): Rollouts, kill switches and a maintenance banner. - [Analytics](https://nuxt-backend.dev/docs/build/growth/measure/revenue): Revenue, usage and the growth funnel in the admin console (planned). - [Hosting](https://nuxt-backend.dev/docs/ship): Vercel first, any Nuxt host, one-command production. Under the hood, one layer over all of these services; your code calls the package, and the package calls them: - Convex: database, functions, files, scheduler, AI Gateway. - Better Auth: sessions, codes, passkeys, workspaces. - Polar: checkout, subscriptions, meters, portal. - Resend: sending, delivery events, topics. - Vercel: hosting, bot checks, firewall. - Sentry: errors, cron monitors, uptime. ## One command checks it all `npx nuxt-backend doctor` checks every app layer and prints one finding per check, with a fix under each warning; `--only ` checks one layer and `--json` prints the report for a script or an agent. - `npx nuxt-backend doctor --only auth`: 5 checks, [the Auth docs](https://nuxt-backend.dev/docs/build/auth) - `npx nuxt-backend doctor --only billing`: 12 checks, [the Billing docs](https://nuxt-backend.dev/docs/build/billing) - `npx nuxt-backend doctor --only email`: 6 checks, [the Email docs](https://nuxt-backend.dev/docs/build/email) - `npx nuxt-backend doctor --only ai`: 10 checks, [the AI docs](https://nuxt-backend.dev/docs/build/ai) - `npx nuxt-backend doctor --only protection`: 3 checks, [the Protection docs](https://nuxt-backend.dev/docs/build/auth/sign-in/bots) - `npx nuxt-backend doctor --only monitoring`: 2 checks, [the Monitoring docs](https://nuxt-backend.dev/docs/ship/operate/monitoring) [The doctor reference](https://nuxt-backend.dev/docs/reference/cli#doctor) lists every check and its fix. ## One package, not twelve integrations - One API over every service: Your code calls useCredits() and email.send(), never a provider's SDK. Brand names stay in the docs. [Principles](https://nuxt-backend.dev/docs/start/concepts/principles). - Layers switch on by themselves: Set a layer's key and it turns on; leave it out and it stays off. There is no switch to flip. [App layers](https://nuxt-backend.dev/docs/start/concepts/capabilities). - Pages and components included: Sign-in, account, pricing, workspaces and the admin console ship ready, in your theme, every string a label. [Pages and components](https://nuxt-backend.dev/docs/build/ui). - Real sandboxes from the first run: Development runs on Polar's sandbox and Resend's test mode, with sent mail in a dev inbox. [Develop with real sandboxes](https://nuxt-backend.dev/docs/develop/sandboxes). - Typed errors end to end: Every refusal carries a code, from the Convex function to your page, so you switch on it instead of parsing text. [Errors](https://nuxt-backend.dev/docs/build/data/read-write/errors). - Ready for coding agents: Task skills, AGENTS.md and one developer MCP server that knows your project and the services under it. [Build with agents](https://nuxt-backend.dev/docs/develop/agents). ## Skills for coding agents A coding agent that builds an app on the package reads its skills: the core, `nuxt-backend`, with the rules, the CLI and the env, and a task skill for each part of the app: - [`nuxt-backend-auth`](https://nuxt-backend.dev/.well-known/skills/nuxt-backend-auth/SKILL.md): sign-in, sessions, passkeys, roles, user-scoped functions, workspaces and invitations, invite codes and the waitlist, the admin console with impersonation, the activity trail, consents, and account export and deletion - [`nuxt-backend-billing`](https://nuxt-backend.dev/.well-known/skills/nuxt-backend-billing/SKILL.md): the catalog, plans, checkout, the portal, feature gates, plan quotas and credits - [`nuxt-backend-growth`](https://nuxt-backend.dev/.well-known/skills/nuxt-backend-growth/SKILL.md): launch phases, offers, referrals, gifts, lifecycle email and the funnel - [`nuxt-backend-email`](https://nuxt-backend.dev/.well-known/skills/nuxt-backend-email/SKILL.md): transactional email, templates, delivery tracking, the dev inbox and notifications - [`nuxt-backend-ai`](https://nuxt-backend.dev/.well-known/skills/nuxt-backend-ai/SKILL.md): metered AI actions, streams and the job queue - [`nuxt-backend-data`](https://nuxt-backend.dev/.well-known/skills/nuxt-backend-data/SKILL.md): the function tiers, queries and mutations, errors, search, workflows, uploads, share links, presence, retention, tokens and the Convex components for counts, queues, cached actions, crons and migrations - [`nuxt-backend-ui`](https://nuxt-backend.dev/.well-known/skills/nuxt-backend-ui/SKILL.md): the packaged pages and components, their parts, theming, labels, translation, slots, the headless composables and eject - [`nuxt-backend-ship`](https://nuxt-backend.dev/.well-known/skills/nuxt-backend-ship/SKILL.md): provider setup, tests, deploying, production checks, monitoring, flags and kill switches, webhooks and rate limits - [`nuxt-backend-upgrade`](https://nuxt-backend.dev/.well-known/skills/nuxt-backend-upgrade/SKILL.md): moving an app to a new version, and every name a release renamed or removed Install them with `npx skills add https://nuxt-backend.dev --skill '*'`. [Skills and agent files](https://nuxt-backend.dev/docs/develop/agents) covers what each holds, and [Docs for agents](https://nuxt-backend.dev/docs/develop/agents/docs-for-agents) lists everything this site serves to agents. These docs answer as MCP tools too, read-only and with no sign-in: `https://mcp.nuxt-backend.dev/mcp`. [Docs MCP](https://nuxt-backend.dev/docs/develop/agents/docs-mcp) lists the tools and connects a client. ## Install the module. Run nuxt-backend dev. Ship. Add the module with `npx nuxt module add nuxt-backend`. The first `npx nuxt-backend dev` scaffolds the backend files and fills in the environment: nothing to set by hand. ## Resources for Agents - [API catalog: every service document this site publishes](https://nuxt-backend.dev/.well-known/api-catalog) - [Sitemap (XML)](https://nuxt-backend.dev/sitemap.xml) - [Sitemap (Markdown): every page on the site](https://nuxt-backend.dev/sitemap.md) - [MCP server card: MCP endpoint at https://nuxt-backend.dev/mcp](https://nuxt-backend.dev/.well-known/mcp/server-card.json) - [MCP endpoint (streamable HTTP)](https://nuxt-backend.dev/mcp) - [llms.txt: index of the documentation for LLMs](https://nuxt-backend.dev/llms.txt) - [llms-full.txt: the full documentation as a single file](https://nuxt-backend.dev/llms-full.txt) - [Agent skills index: every skill published by this site](https://nuxt-backend.dev/.well-known/skills/index.json) - [Agent skill: nuxt-backend](https://nuxt-backend.dev/.well-known/skills/nuxt-backend/SKILL.md) - [Agent skill: nuxt-backend-ai](https://nuxt-backend.dev/.well-known/skills/nuxt-backend-ai/SKILL.md) - [Agent skill: nuxt-backend-auth](https://nuxt-backend.dev/.well-known/skills/nuxt-backend-auth/SKILL.md) - [Agent skill: nuxt-backend-billing](https://nuxt-backend.dev/.well-known/skills/nuxt-backend-billing/SKILL.md) - [Agent skill: nuxt-backend-data](https://nuxt-backend.dev/.well-known/skills/nuxt-backend-data/SKILL.md) - [Agent skill: nuxt-backend-email](https://nuxt-backend.dev/.well-known/skills/nuxt-backend-email/SKILL.md) - [Agent skill: nuxt-backend-growth](https://nuxt-backend.dev/.well-known/skills/nuxt-backend-growth/SKILL.md) - [Agent skill: nuxt-backend-ship](https://nuxt-backend.dev/.well-known/skills/nuxt-backend-ship/SKILL.md) - [Agent skill: nuxt-backend-ui](https://nuxt-backend.dev/.well-known/skills/nuxt-backend-ui/SKILL.md) - [Agent skill: nuxt-backend-upgrade](https://nuxt-backend.dev/.well-known/skills/nuxt-backend-upgrade/SKILL.md) - [Public surface: every public name of nuxt-backend 0.6.x, as JSON](https://nuxt-backend.dev/.well-known/skills/nuxt-backend/references/surface.json) - [Rename map: every name a release renamed, reshaped or removed, with its upgrade note](https://nuxt-backend.dev/.well-known/skills/nuxt-backend/references/renames.json) - [Doctor report schema: what `npx nuxt-backend doctor --json` prints](https://nuxt-backend.dev/schemas/doctor.json) - [Docs for agents: every machine-readable surface of this site](https://nuxt-backend.dev/docs/develop/agents/docs-for-agents) - [Docs MCP: these docs as MCP tools at https://mcp.nuxt-backend.dev/mcp, read-only, with no sign-in](https://nuxt-backend.dev/docs/develop/agents/docs-mcp) - [OpenAPI document: every route this site serves to agents](https://nuxt-backend.dev/openapi.json) # Introduction > What nuxt-backend is, the backend of a client app on Nuxt in twelve capabilities, the services behind it, who it is for, what waits for a later release, and what your app has on day one. Version: nuxt-backend 0.6.x · Tab: Start · Kind: landing · Status: stable Every page: [llms.txt](https://nuxt-backend.dev/llms.txt) · Skill for coding agents: [nuxt-backend](https://nuxt-backend.dev/.well-known/skills/nuxt-backend/SKILL.md) Commands use npm; use your project's package manager. `nuxt-backend` is the backend of a client app: a product people sign in to, pay for and create things in. One [Nuxt](https://nuxt.com) module and one [Convex](https://convex.dev) component give your app sign-in, workspaces, plans and credits, email, notifications, metered AI and generation jobs, and the pages that use them. You write your product. The package brings the sign-in flows, the webhook handling, the credit accounting and the pages. The package groups the services it builds on into twelve [capabilities](https://nuxt-backend.dev/docs/start/concepts/capabilities), each named for what it gives your app: `auth`, `billing`, `email` and so on. Your code calls `useCredits` and reads `BILLING_*` rather than Polar's API, and each capability starts working once its key is set. Know the trade-offs before you start. Your data lives in Convex, and payments run through Polar as merchant of record, at 5% + 50¢ per sale. Sign-in is passkeys and sign-in codes only, the app runs on Nuxt 4, and there is no per-seat billing. Each capability is built on one provider's own features, so leaving a provider means rewriting that capability. [When it fits](#when-it-fits) has the full list. ## What it is made of A Nuxt module for the app, and one all-in-one backend component for Convex, with these services behind them. Each service has a page that sets it up, from the account to production:
Service What it does in your app Capabilities
Convex The database, functions, realtime sync, scheduling and file storage. The package's backend component runs here, beside your own tables. data, jobs, flags
Better Auth Sessions, sign-in codes, passkeys and workspaces. It runs inside your deployment, so it needs no account. auth
Polar Products, checkout, subscriptions, credit meters and invoices, as the merchant of record. billing, analytics
Resend Sending, delivery events, contacts, topics, automations and inbound mail. email, notifications
Convex AI Gateway Every provider's models with no key to manage, each call at its real cost. Without it, a Vercel AI Gateway key does the same. ai
Vercel Hosting first. Other hosts keep working. hosting
Vercel BotID or Cloudflare Turnstile An invisible bot check on Vercel, a challenge elsewhere, before a code is sent or an account is made. protection
Sentry Error reports, logs, traces, cron check-ins and uptime. monitoring
The [Service map](https://nuxt-backend.dev/docs/services) says which you need, the free tier of each, and the order to connect them in. In development each provider runs in its own test mode: Polar's sandbox for checkout, Resend's test addresses for mail, and sign-in codes in your terminal until email is connected ([Develop on real sandboxes](https://nuxt-backend.dev/docs/develop/sandboxes)). The [Feature map](https://nuxt-backend.dev/docs/start/feature-map) lists every feature with its status. ## Who it is for A Nuxt developer, or a small team, building a client app. A tool that turns photos into comic strips, a writing app sold by credits, a game with a premium plan. You want sign-in, billing and email working before your first feature, on a realtime backend. You want pages you restyle rather than build, and a coding agent that knows the package as well as you do. ## When it fits
Use it when Pick something else when
You are building a client app on Nuxt 4, and want sign-in, plans and credits working on day one You need passwords or social sign-in: sign-in here is passkeys and sign-in codes only
Your data can live in Convex, the realtime database underneath Your data has to live in Postgres, MySQL or another database
You sell plans, prepaid credits or metered AI, billed by the provider's own meters You bill per seat: it is not planned
You want the pages too (sign-in, pricing, settings), styled to start and yours to restyle Your app is React or Next, or Nuxt 5 before the package supports it
[Principles](https://nuxt-backend.dev/docs/start/concepts/principles) explains each "no", and [Choosing nuxt-backend](https://nuxt-backend.dev/docs/start/concepts/choosing) compares the package with the alternatives. ## What it is not - **Not a platform for service providers, yet.** API keys, outgoing webhooks, an MCP endpoint for your users' agents, custom workspace roles and ownership transfer wait for a later release. The [Roadmap](https://nuxt-backend.dev/docs/start/roadmap) says why each one waits. - **Not a hosted service.** It runs in your Convex deployment and your Nuxt app, on your provider accounts: the data and the customers are yours. - **Not a Nuxt layer or a template you fork.** It is one module in `modules`, a dependency you upgrade: `npx nuxt-backend upgrade` repairs the scaffold and runs the package's data migrations. - **Not a kit of optional parts.** Every capability ships in the package and starts working once its key or catalog exists. Until then it stays off, or runs on its development stand-in, such as sign-in codes printed in your terminal. - **Not a switch between providers.** The names are neutral, but each capability is built on one service's own features ([Replacing a provider](https://nuxt-backend.dev/docs/start/concepts/choosing#replacing-a-provider)). - **Not tied to a UI kit.** The pages come styled and depend on no UI library. Customizing them climbs one ladder: mount, tokens, labels, slots, swap a part, headless composables, eject ([Customization ladder](https://nuxt-backend.dev/docs/build/ui/customize)). ## Day one After the install and the first `npx nuxt-backend dev`, with no account anywhere, your app already has: - **Sign-in.** `/login` takes a passkey or a sign-in code. The code prints in your terminal until email is connected, and every new account gets a personal workspace: the unit that pays, holds members and owns data. - **Accounts.** `/settings`, `/profile` and `/security`: the workspace and its members, the plan and credits, the profile, passkeys and signed-in devices. - **For administrators.** `/admin`, for the people who run the app. - **A view of it all.** The DevTools Backend tab and `npx nuxt-backend status` show each capability's state, and `npx nuxt-backend doctor` names what is missing. A Polar sandbox token adds the rest of the first hour. `npx nuxt-backend billing sync` creates the plans and credit packs of `backend/billing.catalog.ts` in Polar's sandbox, `/pricing` sells them, and a scaffolded metered action spends the credits. [What you got](https://nuxt-backend.dev/docs/start/what-you-got) lists every file, page, route and composable of that first run. ## Three ways to start Paste this into Claude Code, Cursor, Codex or any agent that runs commands in your project. It installs the package's skill and follows its install guide, on a local deployment that needs no account: ```text Install nuxt-backend, the all-in-one SaaS backend for Nuxt on Convex, in this project: run `npx -y skills@1.7.0 add https://nuxt-backend.dev --skill nuxt-backend -y`, then follow .agents/skills/nuxt-backend/references/install.md. ``` Or open it in your agent with the prompt typed in: - Claude Code (Anthropic): [Claude app](claude://code/new?q=Install%20nuxt-backend%2C%20the%20all-in-one%20SaaS%20backend%20for%20Nuxt%20on%20Convex%2C%20in%20this%20project%3A%0Arun%20%60npx%20-y%20skills%401.7.0%20add%20https%3A%2F%2Fnuxt-backend.dev%20--skill%20nuxt-backend%20-y%60%2C%0Athen%20follow%20.agents%2Fskills%2Fnuxt-backend%2Freferences%2Finstall.md.), [VS Code](vscode://anthropic.claude-code/open?prompt=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.), [Cursor](cursor://anthropic.claude-code/open?prompt=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.), [Windsurf](windsurf://anthropic.claude-code/open?prompt=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.), [Insiders](vscode-insiders://anthropic.claude-code/open?prompt=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.), [VSCodium](vscodium://anthropic.claude-code/open?prompt=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.), [Kiro](kiro://anthropic.claude-code/open?prompt=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.), [Antigravity](antigravity-ide://anthropic.claude-code/open?prompt=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.), [Trae](trae://anthropic.claude-code/open?prompt=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.), [Positron](positron://anthropic.claude-code/open?prompt=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.), [Web](https://claude.ai/code?prompt=Install%20nuxt-backend%2C%20the%20all-in-one%20SaaS%20backend%20for%20Nuxt%20on%20Convex%2C%20in%20this%20project%3A%0Arun%20%60npx%20-y%20skills%401.7.0%20add%20https%3A%2F%2Fnuxt-backend.dev%20--skill%20nuxt-backend%20-y%60%2C%0Athen%20follow%20.agents%2Fskills%2Fnuxt-backend%2Freferences%2Finstall.md.) - Cursor (Anysphere): [Cursor](cursor://anysphere.cursor-deeplink/prompt?text=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.) - Codex (OpenAI): [Codex app](codex://new?prompt=Install%20nuxt-backend%2C%20the%20all-in-one%20SaaS%20backend%20for%20Nuxt%20on%20Convex%2C%20in%20this%20project%3A%0Arun%20%60npx%20-y%20skills%401.7.0%20add%20https%3A%2F%2Fnuxt-backend.dev%20--skill%20nuxt-backend%20-y%60%2C%0Athen%20follow%20.agents%2Fskills%2Fnuxt-backend%2Freferences%2Finstall.md.) - Copilot (GitHub): [VS Code](vscode://GitHub.Copilot-Chat/chat?mode=agent&prompt=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.), [Insiders](vscode-insiders://GitHub.Copilot-Chat/chat?mode=agent&prompt=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.) - Cascade (Cognition): [Windsurf](windsurf://cascade?prompt=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.) - Zed (Zed Industries): [Zed](zed://agent?prompt=Install%20nuxt-backend%2C%20the%20all-in-one%20SaaS%20backend%20for%20Nuxt%20on%20Convex%2C%20in%20this%20project%3A%0Arun%20%60npx%20-y%20skills%401.7.0%20add%20https%3A%2F%2Fnuxt-backend.dev%20--skill%20nuxt-backend%20-y%60%2C%0Athen%20follow%20.agents%2Fskills%2Fnuxt-backend%2Freferences%2Finstall.md.) - Trae (ByteDance): [Trae](trae://trae.ai-ide/side-chat?query=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.) In a Nuxt app you already have, start with Nuxt's own module command: ```bash npx nuxt module add nuxt-backend ``` The [Quickstart](https://nuxt-backend.dev/docs/start/quickstart) takes it from there: a signed-in app in about three minutes, with no account anywhere. A new app, with the module installed and its backend files written: ```bash npm create nuxt@latest my-app -- -t gh:qruto/nuxt-backend/templates/starter cd my-app npm run dev ``` The first run asks where to create the deployment. **Start without an account** makes a local one. [Templates and examples](https://nuxt-backend.dev/docs/start/templates) lists the starter, Panels and the examples. ## Learn by building panels The [tutorial](https://nuxt-backend.dev/docs/start/tutorial) builds Panels, a comic-strip maker, in six parts: sign-in, credits, photo uploads, generation jobs, notifications and share links, then a deploy. Panels is also the public demo and a template, so the code you write there is the code the demo runs. ## In this tab Read the Start tab top to bottom on a first visit, then keep the concepts at hand: - **Begin.** [Quickstart](https://nuxt-backend.dev/docs/start/quickstart): a signed-in app, then credits bought and spent. [What you got](https://nuxt-backend.dev/docs/start/what-you-got): the inventory of that first run. - **Install.** [Installation](https://nuxt-backend.dev/docs/start/installation): one command, an agent prompt, or by hand. [Templates and examples](https://nuxt-backend.dev/docs/start/templates): the starter, Panels and the examples. - **Try.** [Try the demo](https://nuxt-backend.dev/docs/start/playground): Panels, the tutorial's app, live on this site in sandbox mode. [Try everything](https://nuxt-backend.dev/docs/start/playground/try-everything): the same on your machine, with personas and a checklist. - **Build.** [Build a creative app](https://nuxt-backend.dev/docs/start/tutorial): the tutorial, from the starter to production. - **Plan.** [Feature map](https://nuxt-backend.dev/docs/start/feature-map): every feature with its status. [Roadmap](https://nuxt-backend.dev/docs/start/roadmap): what waits for a later release. - **Understand.** [How it works](https://nuxt-backend.dev/docs/start/concepts/how-it-works), [Capabilities](https://nuxt-backend.dev/docs/start/concepts/capabilities), [Principles](https://nuxt-backend.dev/docs/start/concepts/principles), [Environments](https://nuxt-backend.dev/docs/start/concepts/environments), [nuxt-backend and nuxt-convex-module](https://nuxt-backend.dev/docs/start/concepts/nuxt-convex-module) and [Choosing nuxt-backend](https://nuxt-backend.dev/docs/start/concepts/choosing). ## The docs, tab by tab The tabs run from general to detailed: what it is, how to connect each service, how to develop and test, how to build each feature, how to ship. Build Panels, a comic-strip maker, from the starter to production in six parts. One page per provider: the account, its test mode, the keys, the webhooks, production, costs and the data it holds. The dev loop on real sandboxes, the dev inbox, DevTools and doctor, testing at every level, and building with a coding agent. Every feature, grouped as auth and accounts, billing, email and notifications, AI, data and files, growth, and the UI. The deploy, the production checklist, security, compliance, operating in production, and releases. Every option, env name, composable, component, route, error and CLI flag, generated from the code. ## Version and stability These docs describe the `0.6.x` line. Patch releases never change the public surface. A minor release may change it, through a deprecation first, and each change is on the [Upgrade page](https://nuxt-backend.dev/docs/ship/releases/upgrade). [Stability](https://nuxt-backend.dev/docs/ship/releases/stability) lists what counts as the surface, and which parts are still experimental. Two chips mark a page ahead of the code. **Planned** means the feature arrives in the next release and is not built yet. **Changing** means it is built, and the page already shows the API as the next release reshapes it. The [Feature map](https://nuxt-backend.dev/docs/start/feature-map#statuses) explains both and names the unit of work behind each. ## Try it first The [demo](https://nuxt-backend.dev/playground) is Panels, the tutorial's app, running against this site's own deployment in sandbox mode: sign in with a generated sandbox address, with nothing to install. [Try the demo](https://nuxt-backend.dev/docs/start/playground) says what it lets you do and what it refuses, and [Try everything](https://nuxt-backend.dev/docs/start/playground/try-everything) runs the same on your machine. # Quickstart > A signed-in app in about three minutes with no account anywhere, then credits bought on Polar's sandbox and spent by a metered action in about five more. Version: nuxt-backend 0.6.x · Tab: Start · Kind: tutorial · Status: stable Every page: [llms.txt](https://nuxt-backend.dev/llms.txt) · Skill for coding agents: [nuxt-backend](https://nuxt-backend.dev/.well-known/skills/nuxt-backend/SKILL.md) Commands use npm; use your project's package manager. Two checkpoints take you from an empty folder to a signed-in app that sells and spends credits. The first needs no account: the app runs on a local deployment, and sign-in codes print in your terminal. The second adds a Polar sandbox account, so checkout runs on Polar's own test server.
Checkpoint Accounts Time
1. A signed-in app None About 3 minutes
2. Credits bought and spent A Polar sandbox account About 5 minutes
Next: email and webhooks A Resend account, and a Convex account for a cloud deployment About 10 minutes
You need Node 24.11 or later. Deploying is not part of the Quickstart: [Deploy](https://nuxt-backend.dev/docs/ship/deploy) takes it from here. ## Checkpoint 1: a signed-in app ### Create the app ```bash [new app] npm create nuxt@latest my-app -- -t gh:qruto/nuxt-backend/templates/starter cd my-app ``` ```bash [existing app] npx nuxt module add nuxt-backend ``` The [starter](https://nuxt-backend.dev/docs/start/templates#starter) is a Nuxt app with the module installed and its backend files written. In an app you already have, `nuxt module add` is the whole install: the module's install step adds `convex`, writes the same files into `backend/`, points the `dev` script at `nuxt-backend dev`, swaps `` for `` and adds a home page when the app has none. It asks a few questions in the terminal, and the defaults are fine for this page. [Installation](https://nuxt-backend.dev/docs/start/installation) covers strict pnpm, the install through a coding agent and the install by hand. ### Start it ```bash npx nuxt-backend dev --anonymous ``` `npx nuxt-backend dev` runs Convex and Nuxt together, and the `dev` script runs the same command. `--anonymous` creates a local deployment that needs no account, on macOS, Linux and Windows alike. A plain `npm run dev` asks instead, and **Start without an account** is the same answer. The first run writes `CONVEX_DEPLOYMENT` to `.env.local`, then gives the deployment its `AUTH_SECRET`, a `SITE_URL` of `http://localhost:3000` and a `BACKEND_ENVIRONMENT` of `development`. Its last check reads `backend preflight: …`, and the email and billing findings in it are expected until you connect those services. ### Sign in with the code in the terminal Open [localhost:3000/login](http://localhost:3000/login), type your email and ask for a code. No email provider is connected, and a `development` deployment logs every code, so it prints in the terminal running `dev`. Paste it, and you are signed in, with a personal workspace of your own. **You should now see** your email and your workspace on `/app`, which the starter's home page opens. In an app you already have, open `/settings`, which the module mounts. ## Checkpoint 2: credits bought and spent The starter's catalog, `backend/billing.catalog.ts`, declares two plans and two credit packs. This checkpoint creates them in Polar's sandbox, buys a pack with a test card and spends one credit. ### Connect Polar's sandbox Sign up at [sandbox.polar.sh](https://sandbox.polar.sh/start), create an organization and an organization access token, and put the token in `.env.local`: ```bash [.env.local] BILLING_ACCESS_TOKEN=your_sandbox_access_token ``` Then push it to the deployment and create the catalog in the sandbox: ```bash npx nuxt-backend env push npx nuxt-backend billing sync ``` `billing sync` creates the meter, the plans and the packs, and writes their ids to `backend/billing.generated.ts`. [`/pricing`](http://localhost:3000/pricing) lists them now. ### Buy a credit pack On `/app`, press **Buy 500 credits**. Polar's sandbox checkout opens: pay with the card `4242 4242 4242 4242`, any future expiry and any CVC, then press **Pay**. Back on `/app`, the balance reads 500. The return from checkout refreshes it, since Polar's webhooks cannot reach a deployment on your machine. ### Spend a credit Press **Spend 1 credit**. It calls `transform` from `backend/ai.ts`, a metered action: it reserves a credit, runs, then settles the spend with Polar, and the balance drops to 499. A run that fails releases its reservation and charges nothing. **You should now see** 499 credits on `/app` and in the credits section of `/settings`. In an app you already have, these two buttons are one page: ```vue [app/pages/credits.vue] ``` `definePageMeta({ auth: true })` sends a visitor who is not signed in to `/login` and back. `useCredits` reads the balance live, so the page updates the moment a purchase or a spend settles. ## Next: email and webhooks Codes in the terminal and a refresh after checkout cover a first run. Two more steps make development behave like production. The [Service map](https://nuxt-backend.dev/docs/services) gives the order, and each service's page its keys: - **Email.** Put a Resend key in `.env.local` as `EMAIL_API_KEY`, with `EMAIL_FROM`, and run `npx nuxt-backend env push` ([Resend](https://nuxt-backend.dev/docs/services/resend)). In development, mail goes only to Resend's test addresses: sign in as `delivered+you@resend.dev`, and read the code with `npx nuxt-backend inbox`. - **Webhooks.** `npx convex login` links the deployment to your Convex account, and a cloud dev deployment has the public URL Polar and Resend post to ([Convex](https://nuxt-backend.dev/docs/services/convex)). Run `npx nuxt-backend billing sync` and `npx nuxt-backend email sync` again to register it. [Develop on real sandboxes](https://nuxt-backend.dev/docs/develop/sandboxes) covers both, and the AI gateway for a real model call. ## Where to go next - [Build a creative app](https://nuxt-backend.dev/docs/start/tutorial): the tutorial, from this starter to Panels, a comic-strip maker in production. - [Service map](https://nuxt-backend.dev/docs/services): every provider, what it powers, and the order to connect them in. - [What you got](https://nuxt-backend.dev/docs/start/what-you-got): every file, page, route and composable the first run gave you. - [Feature map](https://nuxt-backend.dev/docs/start/feature-map): everything else the package does, capability by capability. - [Run the dev loop](https://nuxt-backend.dev/docs/develop/dev-loop): the daily loop, and the other kinds of deployment. - [Try the demo](https://nuxt-backend.dev/docs/start/playground): Panels, the tutorial's app, running live in sandbox mode, before you build anything. ## First-run troubleshooting
What you see Why, and the fix
The Nuxt welcome page instead of the app app/app.vue still renders . Render instead.
convex dev can't resolve @convex-dev/… Strict pnpm hides the components Convex bundles. Hoist them .
"This app is in test mode and only emails test addresses, so this address can't receive mail here." Email is connected and in test mode, which delivers only to Resend's test addresses. Sign in as delivered+you@resend.dev , and read the code in the terminal or with npx nuxt-backend inbox .
"This app can't send email yet." The deployment has no email provider, and it is not a development one, so it does not log codes either. Run npx nuxt-backend env push , which sets BACKEND_ENVIRONMENT on a dev deployment.
/pricing is empty The catalog never reached the deployment. With dev running, run npx nuxt-backend billing sync , then see Pricing is empty .
billing sync says the token is invalid It is a production token. Polar's sandbox takes only a token created in the sandbox itself.
Anything else: [Troubleshooting](https://nuxt-backend.dev/docs/ship/operate/troubleshooting) lists every message the package prints, and `npx nuxt-backend doctor` names what is missing ([Diagnose your setup](https://nuxt-backend.dev/docs/develop/doctor)). # Installation > Install nuxt-backend into a Nuxt app you already have with one command, through a coding agent in one prompt, or by hand, with or without nuxt-convex-module. Version: nuxt-backend 0.6.x · Tab: Start · Kind: how-to · Status: stable Every page: [llms.txt](https://nuxt-backend.dev/llms.txt) · Skill for coding agents: [nuxt-backend](https://nuxt-backend.dev/.well-known/skills/nuxt-backend/SKILL.md) Commands use npm; use your project's package manager. Add the package to a Nuxt app with one command, then start it once. nuxt-backend is one Nuxt module: it goes in `modules`, never in `extends` ([Principles](https://nuxt-backend.dev/docs/start/concepts/principles#one-module-not-a-nuxt-layer)). For a new app, [create it from the starter](https://nuxt-backend.dev/docs/start/templates#starter) instead: the module is installed and the files are written. ## Before you start - **Nuxt 4.7.0 or later**, not Nuxt 5 yet: the server code is written against `nuxt/server`, a 4.6 API, and Nuxt 4.6 no longer builds with Vite 8.4 ([Roadmap](https://nuxt-backend.dev/docs/start/roadmap#upstream-releases-the-package-holds-for)). - **Node 24.11 or later**, the package's `engines` floor. - No Convex account: the first run can create a local deployment, and [Run the dev loop](https://nuxt-backend.dev/docs/develop/dev-loop) says how to move to a cloud one. The [Service map](https://nuxt-backend.dev/docs/services) lists the accounts each later step asks for. ## Install Paste this prompt into Claude Code, Cursor, Codex or any agent that can run commands in your project: ```text Install nuxt-backend, the all-in-one SaaS backend for Nuxt on Convex, in this project: run `npx -y skills@1.7.0 add https://nuxt-backend.dev --skill nuxt-backend -y`, then follow .agents/skills/nuxt-backend/references/install.md. ``` Or open it in your agent with the prompt typed in: - Claude Code (Anthropic): [Claude app](claude://code/new?q=Install%20nuxt-backend%2C%20the%20all-in-one%20SaaS%20backend%20for%20Nuxt%20on%20Convex%2C%20in%20this%20project%3A%0Arun%20%60npx%20-y%20skills%401.7.0%20add%20https%3A%2F%2Fnuxt-backend.dev%20--skill%20nuxt-backend%20-y%60%2C%0Athen%20follow%20.agents%2Fskills%2Fnuxt-backend%2Freferences%2Finstall.md.), [VS Code](vscode://anthropic.claude-code/open?prompt=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.), [Cursor](cursor://anthropic.claude-code/open?prompt=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.), [Windsurf](windsurf://anthropic.claude-code/open?prompt=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.), [Insiders](vscode-insiders://anthropic.claude-code/open?prompt=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.), [VSCodium](vscodium://anthropic.claude-code/open?prompt=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.), [Kiro](kiro://anthropic.claude-code/open?prompt=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.), [Antigravity](antigravity-ide://anthropic.claude-code/open?prompt=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.), [Trae](trae://anthropic.claude-code/open?prompt=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.), [Positron](positron://anthropic.claude-code/open?prompt=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.), [Web](https://claude.ai/code?prompt=Install%20nuxt-backend%2C%20the%20all-in-one%20SaaS%20backend%20for%20Nuxt%20on%20Convex%2C%20in%20this%20project%3A%0Arun%20%60npx%20-y%20skills%401.7.0%20add%20https%3A%2F%2Fnuxt-backend.dev%20--skill%20nuxt-backend%20-y%60%2C%0Athen%20follow%20.agents%2Fskills%2Fnuxt-backend%2Freferences%2Finstall.md.) - Cursor (Anysphere): [Cursor](cursor://anysphere.cursor-deeplink/prompt?text=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.) - Codex (OpenAI): [Codex app](codex://new?prompt=Install%20nuxt-backend%2C%20the%20all-in-one%20SaaS%20backend%20for%20Nuxt%20on%20Convex%2C%20in%20this%20project%3A%0Arun%20%60npx%20-y%20skills%401.7.0%20add%20https%3A%2F%2Fnuxt-backend.dev%20--skill%20nuxt-backend%20-y%60%2C%0Athen%20follow%20.agents%2Fskills%2Fnuxt-backend%2Freferences%2Finstall.md.) - Copilot (GitHub): [VS Code](vscode://GitHub.Copilot-Chat/chat?mode=agent&prompt=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.), [Insiders](vscode-insiders://GitHub.Copilot-Chat/chat?mode=agent&prompt=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.) - Cascade (Cognition): [Windsurf](windsurf://cascade?prompt=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.) - Zed (Zed Industries): [Zed](zed://agent?prompt=Install%20nuxt-backend%2C%20the%20all-in-one%20SaaS%20backend%20for%20Nuxt%20on%20Convex%2C%20in%20this%20project%3A%0Arun%20%60npx%20-y%20skills%401.7.0%20add%20https%3A%2F%2Fnuxt-backend.dev%20--skill%20nuxt-backend%20-y%60%2C%0Athen%20follow%20.agents%2Fskills%2Fnuxt-backend%2Freferences%2Finstall.md.) - Trae (ByteDance): [Trae](trae://trae.ai-ide/side-chat?query=Install%2520nuxt-backend%252C%2520the%2520all-in-one%2520SaaS%2520backend%2520for%2520Nuxt%2520on%2520Convex%252C%2520in%2520this%2520project%253A%250Arun%2520%2560npx%2520-y%2520skills%25401.7.0%2520add%2520https%253A%252F%252Fnuxt-backend.dev%2520--skill%2520nuxt-backend%2520-y%2560%252C%250Athen%2520follow%2520.agents%252Fskills%252Fnuxt-backend%252Freferences%252Finstall.md.) The agent installs the package's core [skill](https://nuxt-backend.dev/docs/develop/agents#the-agent-skills), then follows its install guide. The guide adds the package to an existing app (or creates one from the [starter](https://nuxt-backend.dev/docs/start/templates#starter)), starts it on a local deployment that needs no account, and checks that the app serves `/login`. It asks before it logs in to Convex or touches your accounts, and it never prints or replaces `AUTH_SECRET`. The skill stays in the project for later tasks, and the install adds the task skills of the installed version beside it. ```bash npx nuxt module add nuxt-backend ``` `nuxt module add` installs the package, adds `'nuxt-backend'` to `modules`, then runs the module's install step. That step: - installs `convex`, the one peer an app lists itself, since `npx convex dev` refuses to start until the app's own `package.json` names it (Nuxt brings `vue`; optional peers such as `ai` or `@sentry/nuxt` wait until a feature needs them); - writes the backend files into `backend/` (or the functions folder `convex.json` names), never over a file that exists; - writes `.env.example`, grouped by purpose; - points the `dev` script at `nuxt-backend dev`; - swaps `` for `` in an untouched `app/app.vue`, so the module's pages render; - writes a home page, `app/pages/index.vue`, when no page answers `/` and the app extends no layer, which may serve `/` itself: the app's name and a link to sign in, or to the account once signed in; - writes an `AGENTS.md` section, the agent skills and the one `nuxt-backend` entry in `.mcp.json` for the developer MCP server, and under pnpm 12 tells pnpm not to link a second copy of the skills ([Using strict pnpm](#using-strict-pnpm)); - asks the few questions it needs, such as whether to write the agent files, in the terminal. `npx nuxt-backend init` runs the same setup again later, and restores a file that went missing. [`init`](https://nuxt-backend.dev/docs/reference/cli#init) lists every flag, and [Project files](https://nuxt-backend.dev/docs/reference/configuration/project-files) every file it writes. Install the two packages, then add the module: ```bash npm install nuxt-backend convex ``` ```ts [nuxt.config.ts] export default defineNuxtConfig({ modules: ['nuxt-backend'], }) ``` Then write the backend files with `npx nuxt-backend init --no-agents`, which never touches a file that exists. If you skip `init` entirely, make its two edits yourself: render `` in `app/app.vue` instead of ``, and point the `dev` script at `nuxt-backend dev`, which [Run the dev loop](https://nuxt-backend.dev/docs/develop/dev-loop) explains. Give the app a page at `/` too, if it has none: the module's pages turn on the router, and `/` answers 404 without one. **An app on nuxt-convex-module already**: keep its entry in `modules` and its options. `nuxt-backend` installs and configures that module itself, and forces the few options it depends on ([nuxt-backend and nuxt-convex-module](https://nuxt-backend.dev/docs/start/concepts/nuxt-convex-module)). Your `convex/` folder stays where it is: the files go there beside yours, and an existing `convex.config.ts`, `http.ts`, `schema.ts` or `auth.config.ts` is kept, so merge the package's parts into them as [Auth setup](https://nuxt-backend.dev/docs/build/auth/setup) shows. ## Start it ```bash npm run dev ``` The first run sets up a dev deployment when none is configured: log in to Convex when it asks, or pick **Start without an account** for a local one. `npx nuxt-backend dev --anonymous` picks the local one without asking, on every OS. It writes `CONVEX_DEPLOYMENT` to `.env.local`, gives the deployment its `AUTH_SECRET`, `SITE_URL` and `BACKEND_ENVIRONMENT`, then runs Convex and Nuxt in this terminal. Nothing goes in `.env` by hand: the backend's URL derives from the deployment's name. ## Check it works Open `/login` and sign in: with no email provider connected, the code prints in the terminal. `npx nuxt-backend doctor` checks the project and the deployment and names whatever is missing ([Diagnose your setup](https://nuxt-backend.dev/docs/develop/doctor)). ## Using strict pnpm A flat `node_modules` (npm, Yarn, or pnpm with `nodeLinker: hoisted`) exposes the bundled Convex components to Convex's bundler. pnpm's default isolated layout hides them, so let them reach the project root from `pnpm-workspace.yaml` (pnpm 11 and later read their settings there, not from `.npmrc`): ```yaml [pnpm-workspace.yaml] publicHoistPattern: - '@convex-dev/*' ``` Without it, the first `convex dev` push fails to resolve the component definitions. The Nuxt side needs nothing: the module installs `nuxt-convex-module` and `nuxt-security` from its own dependencies. Apps made from the [templates](https://nuxt-backend.dev/docs/start/templates) carry this setting in a `.pnpmfile.mjs`. pnpm 11 and later hold back a version published less than a day ago (`minimumReleaseAge`). An install takes an older version that fits the range, and the new one only when nothing older fits. A project that sets `minimumReleaseAge` itself fails the install in that case. pnpm also stops an install until each dependency build script is approved or denied (`pnpm approve-builds`, or `pnpm approve` on pnpm 12). `esbuild` comes in through Nuxt and works without its script, so denying it is safe. Both are pnpm's own supply-chain defaults. pnpm 12 links the agent skills a dependency ships once you approve them, and lists nuxt-backend under "Agent skills awaiting approval" until then. `init` already installs those skills in `.agents/skills` and keeps them on the version you have installed, so a second copy would show your agent each skill twice. Under pnpm 12.11 or later, `init` denies that copy itself: it adds `skills: false` for nuxt-backend under `permissions` in `pnpm-workspace.yaml`, the entry `pnpm approve '!nuxt-backend'` records, creating the file when the project has none and keeping every other key and comment. A `skills` entry nuxt-backend has there already stays as it is, an approval included: set it to `false` yourself to deny the copy. pnpm 11 doesn't read `permissions` and warns about the key on every install, so under pnpm 11 `init` leaves the file alone. After a move to pnpm 12, `npx nuxt-backend init --agents` adds the entry, or `pnpm approve '!nuxt-backend'` records it. ## If it fails
Symptom Fix
convex dev can't resolve @convex-dev/…/convex.config Hoist the components: Using strict pnpm .
npx convex dev says to add convex to your dependencies Install convex in the app itself ( Troubleshooting ).
/login shows the Nuxt welcome page Render in app/app.vue ( Troubleshooting ).
/ answers 404, and the dev log says No match found for location with path "/" The app has no page at / : run npx nuxt-backend init , which writes one unless the app extends a layer, or add app/pages/index.vue yourself ( Troubleshooting ).
npm run dev stops at "Preparing Convex functions" The dev script is convex dev --start "nuxt dev" : run npx nuxt-backend doctor --fix ( Troubleshooting ).
nuxt module add wrote no backend/ folder The install step runs only in an interactive terminal. Run npx nuxt-backend init .
## Related - [Quickstart](https://nuxt-backend.dev/docs/start/quickstart): from here to a signed-in app and credits spent. - [Build a creative app](https://nuxt-backend.dev/docs/start/tutorial): the tutorial, from here to an app in production. - [Environment variables](https://nuxt-backend.dev/docs/reference/configuration/environment-variables): every name, what sets it and what its absence does. - [Upgrade](https://nuxt-backend.dev/docs/ship/releases/upgrade): moving to a new release with `npx nuxt-backend upgrade`. # What you got > The inventory after the first run, on one page, from the backend files and which of them are yours to the pages, routes, composables and components, the env it set and the maintenance now running. Version: nuxt-backend 0.6.x · Tab: Start · Kind: concept · Status: stable Every page: [llms.txt](https://nuxt-backend.dev/llms.txt) · Skill for coding agents: [nuxt-backend](https://nuxt-backend.dev/.well-known/skills/nuxt-backend/SKILL.md) Commands use npm; use your project's package manager. The install and the first `npx nuxt-backend dev` left your app with a deployment that mounts the `backend` component, and a `backend/` folder of setup files that are yours to edit. Pages and HTTP routes already answer, every composable and component is auto-imported, and a maintenance pass keeps the backend's own tables small. None of it needs a line of your code. ## The inventory The list below is generated from the package's registries, so whatever a later release adds shows up here, each name linked to its reference entry. The scaffold writes only the files the package calls into: you add a file when you use what it sets up. - Your files: [`backend/convex.config.ts`](https://nuxt-backend.dev/docs/reference/configuration/project-files#every-file), [`backend/auth.config.ts`](https://nuxt-backend.dev/docs/reference/configuration/project-files#every-file), [`backend/auth.ts`](https://nuxt-backend.dev/docs/reference/configuration/project-files#every-file), [`backend/http.ts`](https://nuxt-backend.dev/docs/reference/configuration/project-files#every-file), [`backend/billing.catalog.ts`](https://nuxt-backend.dev/docs/reference/configuration/project-files#every-file), [`backend/ai.ts`](https://nuxt-backend.dev/docs/reference/configuration/project-files#every-file), [`backend/functions.ts`](https://nuxt-backend.dev/docs/reference/configuration/project-files#every-file), [`backend/billing.ts`](https://nuxt-backend.dev/docs/reference/configuration/project-files#every-file), [`backend/email.ts`](https://nuxt-backend.dev/docs/reference/configuration/project-files#every-file), [`backend/rateLimiter.ts`](https://nuxt-backend.dev/docs/reference/configuration/project-files#every-file), [`backend/workflows.ts`](https://nuxt-backend.dev/docs/reference/configuration/project-files#every-file), [`backend/audit.ts`](https://nuxt-backend.dev/docs/reference/configuration/project-files#every-file), [`backend/notifications.ts`](https://nuxt-backend.dev/docs/reference/configuration/project-files#every-file), [`backend/account.ts`](https://nuxt-backend.dev/docs/reference/configuration/project-files#every-file), [`backend/admin.ts`](https://nuxt-backend.dev/docs/reference/configuration/project-files#every-file), [`backend/webhooks.ts`](https://nuxt-backend.dev/docs/reference/configuration/project-files#every-file), [`backend/flags.ts`](https://nuxt-backend.dev/docs/reference/configuration/project-files#every-file), [`backend/paths.generated.ts`](https://nuxt-backend.dev/docs/reference/configuration/project-files#every-file), [`backend/brand.generated.ts`](https://nuxt-backend.dev/docs/reference/configuration/project-files#every-file), [`backend/labels.generated.ts`](https://nuxt-backend.dev/docs/reference/configuration/project-files#every-file) - Regenerated files: [`backend/billing.generated.ts`](https://nuxt-backend.dev/docs/reference/configuration/project-files#every-file), [`backend/_generated/`](https://nuxt-backend.dev/docs/reference/configuration/project-files#every-file) - Pages: [`/accept-invitation`](https://nuxt-backend.dev/docs/reference/backend/http-routes#in-the-nuxt-app), [`/legal/accessibility`](https://nuxt-backend.dev/docs/reference/backend/http-routes#in-the-nuxt-app), [`/admin`](https://nuxt-backend.dev/docs/reference/backend/http-routes#in-the-nuxt-app), [`/gifts`](https://nuxt-backend.dev/docs/reference/backend/http-routes#in-the-nuxt-app), [`/invite`](https://nuxt-backend.dev/docs/reference/backend/http-routes#in-the-nuxt-app), [`/account/keep`](https://nuxt-backend.dev/docs/reference/backend/http-routes#in-the-nuxt-app), [`/login`](https://nuxt-backend.dev/docs/reference/backend/http-routes#in-the-nuxt-app), [`/pricing`](https://nuxt-backend.dev/docs/reference/backend/http-routes#in-the-nuxt-app), [`/legal/privacy`](https://nuxt-backend.dev/docs/reference/backend/http-routes#in-the-nuxt-app), [`/profile`](https://nuxt-backend.dev/docs/reference/backend/http-routes#in-the-nuxt-app), [`/r/:code`](https://nuxt-backend.dev/docs/reference/backend/http-routes#in-the-nuxt-app), [`/report`](https://nuxt-backend.dev/docs/reference/backend/http-routes#in-the-nuxt-app), [`/security`](https://nuxt-backend.dev/docs/reference/backend/http-routes#in-the-nuxt-app), [`/settings`](https://nuxt-backend.dev/docs/reference/backend/http-routes#in-the-nuxt-app), [`/legal/subprocessors`](https://nuxt-backend.dev/docs/reference/backend/http-routes#in-the-nuxt-app), [`/legal/terms`](https://nuxt-backend.dev/docs/reference/backend/http-routes#in-the-nuxt-app), [`/unsubscribe`](https://nuxt-backend.dev/docs/reference/backend/http-routes#in-the-nuxt-app), [`/waitlist`](https://nuxt-backend.dev/docs/reference/backend/http-routes#in-the-nuxt-app), [`/welcome`](https://nuxt-backend.dev/docs/reference/backend/http-routes#in-the-nuxt-app) - Routes: [`/api/auth`](https://nuxt-backend.dev/docs/reference/backend/http-routes), [`/api/human-proof`](https://nuxt-backend.dev/docs/reference/backend/http-routes), [`/billing/events`](https://nuxt-backend.dev/docs/reference/backend/http-routes), [`/email/events`](https://nuxt-backend.dev/docs/reference/backend/http-routes), [`/ai/stream`](https://nuxt-backend.dev/docs/reference/backend/http-routes) - Composables: [`useAuth`](https://nuxt-backend.dev/docs/reference/api/use-auth), [`useConnectionState`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useBackendClient`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useLoginFlow`](https://nuxt-backend.dev/docs/reference/api/use-login-flow), [`useEmailChange`](https://nuxt-backend.dev/docs/reference/api/use-email-change), [`useWorkspace`](https://nuxt-backend.dev/docs/reference/api/use-workspace), [`useSearch`](https://nuxt-backend.dev/docs/reference/api/use-search), [`useBilling`](https://nuxt-backend.dev/docs/reference/api/use-billing), [`useFeatures`](https://nuxt-backend.dev/docs/reference/api/use-features), [`useCredits`](https://nuxt-backend.dev/docs/reference/api/use-credits), [`usePricing`](https://nuxt-backend.dev/docs/reference/api/use-pricing), [`usePlanChange`](https://nuxt-backend.dev/docs/reference/api/use-plan-change), [`useBillingSection`](https://nuxt-backend.dev/docs/reference/api/use-billing-section), [`useCampaign`](https://nuxt-backend.dev/docs/reference/api/use-campaign), [`useOrders`](https://nuxt-backend.dev/docs/reference/api/use-orders), [`useUsage`](https://nuxt-backend.dev/docs/reference/api/use-usage), [`useGifts`](https://nuxt-backend.dev/docs/reference/api/use-gifts), [`useGiftList`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useGiftForm`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useWithdrawal`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useReferrals`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useReferralInvite`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useReferralAdmin`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`usePasskeys`](https://nuxt-backend.dev/docs/reference/api/use-passkeys), [`useTwoFactor`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useRoomPresence`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useSessions`](https://nuxt-backend.dev/docs/reference/api/use-sessions), [`useSignInAlerts`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useReauthentication`](https://nuxt-backend.dev/docs/reference/api/use-reauthentication), [`useAuditLog`](https://nuxt-backend.dev/docs/reference/api/use-audit-log), [`useAccount`](https://nuxt-backend.dev/docs/reference/api/use-account), [`useConsents`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useAdmin`](https://nuxt-backend.dev/docs/reference/api/use-admin), [`useFlag`](https://nuxt-backend.dev/docs/reference/api/use-flags), [`useFlagAdmin`](https://nuxt-backend.dev/docs/reference/api/use-flags), [`useAccessPhase`](https://nuxt-backend.dev/docs/reference/api/use-access), [`useInvite`](https://nuxt-backend.dev/docs/reference/api/use-access), [`useMemberTicket`](https://nuxt-backend.dev/docs/reference/api/use-access), [`useAccessAdmin`](https://nuxt-backend.dev/docs/reference/api/use-access), [`useWaitlist`](https://nuxt-backend.dev/docs/reference/api/use-waitlist), [`useWaitlistAdmin`](https://nuxt-backend.dev/docs/reference/api/use-waitlist-admin), [`useShareLink`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useUploadField`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`preparePhoto`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`isPhotoFile`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`PhotoPrepError`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useNotifications`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useNotificationInbox`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useEmailPreferences`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useEmailLink`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`usePushSubscription`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useInstallPrompt`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useAnnouncements`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useAnnouncementsAdmin`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useContactForm`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useReportForm`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useReportAppeal`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useOnboarding`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useActivation`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useExperiment`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useAppShell`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useInboxAdmin`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`getBackendError`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`formatBillingAmount`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useBackendConfig`](https://nuxt-backend.dev/docs/reference/api/use-backend-config), [`useLabels`](https://nuxt-backend.dev/docs/reference/api/use-labels), [`useBackendPagePath`](https://nuxt-backend.dev/docs/reference/api/use-backend-page-path), [`useReturnPath`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useEmailStatus`](https://nuxt-backend.dev/docs/reference/api/use-email-status), [`useSandboxInbox`](https://nuxt-backend.dev/docs/reference/api/use-sandbox-inbox), [`useWorkflowStatus`](https://nuxt-backend.dev/docs/reference/api/use-workflow), [`useAiStream`](https://nuxt-backend.dev/docs/reference/api/use-ai-stream), [`useJob`](https://nuxt-backend.dev/docs/reference/api/use-job), [`useAiLabel`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useChat`](https://nuxt-backend.dev/docs/reference/nuxt/composables#at-a-glance), [`useHumanCheck`](https://nuxt-backend.dev/docs/reference/api/use-human-check) - Components: [``](https://nuxt-backend.dev/docs/reference/components/account#authform), [``](https://nuxt-backend.dev/docs/reference/components/account#waitlistform), [``](https://nuxt-backend.dev/docs/reference/components/account#reauthenticatedialog), [``](https://nuxt-backend.dev/docs/reference/components/account#profilesettings), [``](https://nuxt-backend.dev/docs/reference/components/account#securitysettings), [``](https://nuxt-backend.dev/docs/reference/components/account#consentprompt), [``](https://nuxt-backend.dev/docs/reference/components/account#onboardingflow), [``](https://nuxt-backend.dev/docs/reference/components/account#activationchecklist), [``](https://nuxt-backend.dev/docs/reference/components/account#howdidyouhear), [``](https://nuxt-backend.dev/docs/reference/components/account#accountdata), [``](https://nuxt-backend.dev/docs/reference/components/workspaces#workspacesettings), [``](https://nuxt-backend.dev/docs/reference/components/workspaces#acceptinvitation), [``](https://nuxt-backend.dev/docs/reference/components/workspaces#auditlog), [``](https://nuxt-backend.dev/docs/reference/components/billing#pricingtable), [``](https://nuxt-backend.dev/docs/reference/components/billing#billingcheckoutlink), [``](https://nuxt-backend.dev/docs/reference/components/billing#billingportallink), [``](https://nuxt-backend.dev/docs/reference/components/billing#billinghistory), [``](https://nuxt-backend.dev/docs/reference/components/billing#usagehistory), [``](https://nuxt-backend.dev/docs/reference/components/billing#upgradeprompt), [``](https://nuxt-backend.dev/docs/reference/components/billing#cancelflow), [``](https://nuxt-backend.dev/docs/reference/components/billing#withdrawalbutton), [``](https://nuxt-backend.dev/docs/reference/components/billing#giftform), [``](https://nuxt-backend.dev/docs/reference/components/billing#giftlist), [``](https://nuxt-backend.dev/docs/reference/components/billing#referralcard), [``](https://nuxt-backend.dev/docs/reference/components/workspaces#adminusers), [``](https://nuxt-backend.dev/docs/reference/components/workspaces#adminworkspaces), [``](https://nuxt-backend.dev/docs/reference/components/shell#gate), [``](https://nuxt-backend.dev/docs/reference/components/shell#backendnotices), [``](https://nuxt-backend.dev/docs/reference/components/shell#accessdenied), [``](https://nuxt-backend.dev/docs/reference/components/shell#connectionstatus), [``](https://nuxt-backend.dev/docs/reference/components/shell#uploadfield), [``](https://nuxt-backend.dev/docs/reference/components/shell#notificationinbox), [``](https://nuxt-backend.dev/docs/reference/components/shell#contactform), [``](https://nuxt-backend.dev/docs/reference/components/shell#appshell), [``](https://nuxt-backend.dev/docs/reference/components/shell#ailabel), [``](https://nuxt-backend.dev/docs/reference/components/shell#legalprocessors), [``](https://nuxt-backend.dev/docs/reference/components/shell#legalstorage), [``](https://nuxt-backend.dev/docs/reference/components/shell#legaldetail), [``](https://nuxt-backend.dev/docs/reference/components/shell#legalversion), [``](https://nuxt-backend.dev/docs/reference/components/shell#legalcontactpoints), [``](https://nuxt-backend.dev/docs/reference/components/shell#legalmoderation) - Env it sets: [`AUTH_SECRET`](https://nuxt-backend.dev/docs/reference/configuration/environment-variables#every-variable), [`SITE_URL`](https://nuxt-backend.dev/docs/reference/configuration/environment-variables#every-variable), [`BACKEND_ENVIRONMENT`](https://nuxt-backend.dev/docs/reference/configuration/environment-variables#every-variable), [`EMAIL_DEV_INBOX`](https://nuxt-backend.dev/docs/reference/configuration/environment-variables#every-variable) - Maintenance: [`sessions`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`verifications`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`rateLimits`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`aiRequests`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`invitations`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`auditEvents`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`notifications`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`announcements`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`lifecycleRuns`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`accountExports`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`failedErasures`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`waitlistJoins`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`memberTickets`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`waitlistMirror`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`files`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`expiredFiles`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`jobs`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`guestTries`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`aiCosts`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`aiFlags`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`aiCostDays`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`knownDevices`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`suppressions`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`monitoringAlerts`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`contactMessages`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`inboundMessages`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`replyAddresses`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`reports`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`reportDecisions`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`billingDeletions`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`billingConsents`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`billingWithdrawals`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`billingSaveOffers`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`billingLifecycleMarks`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`secretOutbox`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs), [`emailRecords`](https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs) ## Who owns what
Who writes it after the first run
Your files You. They were written once, npx nuxt-backend init --force is the only thing that rewrites them, and init or doctor --fix restores one that is gone. Commit them.
backend/billing.generated.ts npx nuxt-backend billing sync : the provider ids, one entry for the sandbox and one for production. Commit it too.
backend/_generated/ The platform's codegen, on every push of convex dev .
Pages and routes The module mounts them. A page of yours at the same path replaces the module's, a path in backend.pages moves one, and false turns one off ( Packaged pages ).
The deployment's env dev set AUTH_SECRET , SITE_URL and BACKEND_ENVIRONMENT , and never replaces a value. npx nuxt-backend env push forwards what you add to .env.local ( Environment variables ).
The backend's tables The backend component: it owns its tables and their maintenance, and your schema never lists them ( How it works ).
[Project files](https://nuxt-backend.dev/docs/reference/configuration/project-files) lists what each file exports and which exports `doctor` holds it to. ## What is live, and what turns the rest on Each part of the app is a [capability](https://nuxt-backend.dev/docs/start/concepts/capabilities), and each capability reads `live`, `test`, `missing` or `failing` from what is configured, never from a switch. On the local deployment the Quickstart made, data, jobs and auth read `test`, with codes in the terminal, and flags are live. Billing, email and AI read `missing` until you add their keys: [Develop on real sandboxes](https://nuxt-backend.dev/docs/develop/sandboxes) adds each one. ```bash npx nuxt-backend status ``` The command prints each capability's state, the env names it lacks and the `doctor --only` run that shows the fix. [Capabilities](https://nuxt-backend.dev/docs/reference/capabilities) says what turns each one live, the [Service map](https://nuxt-backend.dev/docs/services) connects each service, and [Run the dev loop](https://nuxt-backend.dev/docs/develop/dev-loop) what changes on a cloud deployment. ## The live version of this page Nuxt DevTools has a Backend tab: the deployment, each capability's light, the findings, the webhook deliveries and the maintenance passes, as they are right now. [Inspect the backend in DevTools](https://nuxt-backend.dev/docs/develop/devtools) walks through it. ## What this means for you - [Feature map](https://nuxt-backend.dev/docs/start/feature-map): everything else the package does, capability by capability, built and planned. - [Try everything](https://nuxt-backend.dev/docs/start/playground/try-everything): every feature, clicked through on your machine with seeded personas. - [Run the dev loop](https://nuxt-backend.dev/docs/develop/dev-loop): the daily loop, and what changes on a cloud deployment. - [Build a creative app](https://nuxt-backend.dev/docs/start/tutorial): the tutorial that turns this first run into Panels, a comic-strip maker. - [How it works](https://nuxt-backend.dev/docs/start/concepts/how-it-works): the two halves, and where each request goes. - [Auth](https://nuxt-backend.dev/docs/build/auth) and [Billing](https://nuxt-backend.dev/docs/build/billing): the two capabilities most apps change first. - [Diagnose your setup](https://nuxt-backend.dev/docs/develop/doctor): `doctor`, when something reads `missing` or `failing`. # Templates & examples > Create an app from the starter, Panels (the tutorial's app and the public demo) or the advanced example with create nuxt, run the starter in StackBlitz, and try unreleased builds from pkg.pr.new. Version: nuxt-backend 0.6.x · Tab: Start · Kind: how-to · Status: stable Every page: [llms.txt](https://nuxt-backend.dev/llms.txt) · Skill for coding agents: [nuxt-backend](https://nuxt-backend.dev/.well-known/skills/nuxt-backend/SKILL.md) Commands use npm; use your project's package manager. Create a ready-made app with Nuxt's own `create nuxt` command. Each one is a standalone app of the published package, with plain version ranges and no lockfile, so what you get is exactly what installs from npm. All of them run against a Convex deployment of your own. ## Starter The app to build on: a Nuxt app with the module installed and nothing else. Every file in `backend/` is byte-identical to what `npx nuxt-backend init` generates, and with zero custom backend code it has: - passwordless sign-in (``, passkeys and sign-in codes); - workspaces with emailed invitations (the module registers the `/accept-invitation` page); - transactional, delivery-tracked email (sign-in codes, invitations, gift notifications); - subscriptions, feature gating, prepaid credits and gifts, once `billing sync` creates the catalog. ```bash npm create nuxt@latest my-app -- -t gh:qruto/nuxt-backend/templates/starter ``` `create nuxt` downloads the template, installs it with the package manager you pick, and offers to add more Nuxt modules. Then start it: ```bash npm run dev ``` The first run sets up a Convex dev deployment (log in when asked, or start without an account), provisions its env, then runs Convex and Nuxt together. The `dev` script is [`nuxt-backend dev`](https://nuxt-backend.dev/docs/reference/cli#dev). Follow the [Quickstart](https://nuxt-backend.dev/docs/start/quickstart#sign-in-with-the-code-in-the-terminal) from the sign-in step: the code prints in the same terminal until you connect an email provider. The scaffolded `billing.catalog.ts` declares two plans and two credit packs, and `npx nuxt-backend billing sync` creates them in Polar's sandbox, as the Quickstart's [second checkpoint](https://nuxt-backend.dev/docs/start/quickstart#checkpoint-2-credits-bought-and-spent) shows. `backend/_generated` is not part of the template: `npm run dev` writes it against the installed package on the first run, and until then `#backend/*` imports are typed `any`. With pnpm, the template's `.pnpmfile.mjs` answers the build-script question (none of its dependencies needs its script, so none runs) and hoists the component definitions Convex bundles, the same settings [Installation](https://nuxt-backend.dev/docs/start/installation#using-strict-pnpm) gives strict-pnpm users. [View the source](https://github.com/qruto/nuxt-backend/tree/main/templates/starter). ## Panels Panels is the app the [tutorial](https://nuxt-backend.dev/docs/start/tutorial) builds: a comic-strip maker where people sign in with a code or a passkey, buy credits, add a photo, and turn an idea into a three-panel strip a model draws. They hear when it is ready, by email and in the app, and share it by a link. It is built only on the package's public APIs, and it is the code the [public demo](https://nuxt-backend.dev/docs/start/playground) runs in sandbox mode. Create it to read a finished app, or to run the demo on your own accounts: ```bash npm create nuxt@latest my-panels -- -t gh:qruto/nuxt-backend/templates/panels ``` The `gh:` form downloads the template from the repository. Then start it on a local deployment, with no Convex account: ```bash cd my-panels npx nuxt-backend dev --anonymous ``` Open `/login` and sign in: the code prints in the terminal until you connect an email provider. Each feature then waits for its service: credits for a Polar sandbox token and `npx nuxt-backend billing sync`, the strip-ready email for a Resend key and `npx nuxt-backend email sync`, drawing for the [AI gateway](https://nuxt-backend.dev/docs/services/ai-gateway). The [Service map](https://nuxt-backend.dev/docs/services) connects them in order, and `npx nuxt-backend doctor` says what is still missing. Billing runs on Polar until `BILLING_PROVIDER` names [Stripe, Dodo or Creem](https://nuxt-backend.dev/docs/services/merchants): put that provider's product ids in `backend/billing.products.ts`, and the same plans, packs and credits sell there. The template's README maps each file to the tutorial part that writes it. [View the source](https://github.com/qruto/nuxt-backend/tree/main/templates/panels). ## Example: advanced Every customization point at once, created the same way: ```bash npm create nuxt@latest my-app -- -t gh:qruto/nuxt-backend/examples/advanced ``` Start from the starter; each file in `advanced` changes exactly one thing from it:
Customization Where
A customized app definition: the backendEnv contract extended by an extra env var backend/convex.config.ts
Custom email templates (the sign-in code, the invitation and the gift ) without replacing the transport backend/email.ts → templates
A custom invitation path: emails link to /join , where the app's own page replaces the built-in one nuxt.config.ts ( pages: { acceptInvitation: '/join' } , carried to backend/paths.generated.ts ), app/pages/join.vue
Explicit billing config instead of env-var defaults backend/billing.ts ( accessToken , webhookSecret )
A billing webhook hook: order.paid writes to an app table, after the built-in refresh and gift fulfilment backend/billing.ts ( events ) + backend/schema.ts
Custom webhook paths ( /hooks/billing , /hooks/email ) backend/http.ts
A hand-rolled signup workflow: workflow.define calls the component's email module directly, instead of defineEmailSequence backend/workflows.ts
Gift claiming: useGifts() , with the claim notice in app/pages/app/index.vue
The packaged pages, components and emails in French: @nuxtjs/i18n with an fr locale whose backend.* messages translate the package's labels, and setupEmail({ messages: { fr }, localePaths }) so an account whose language is French gets the packaged emails in French, linking to the /fr/ pages (the three custom templates above are written in English only) nuxt.config.ts ( i18n ), i18n/locales/fr.json , backend/email.ts , app/app.vue , app/pages/login.vue
```ts [examples/advanced/nuxt.config.ts] export default defineNuxtConfig({ // CUSTOMIZATION: @nuxtjs/i18n translates the packaged pages and components. // i18n/locales/fr.json holds their `backend.*` messages; nuxt-backend // registers its English ones for `en` itself. modules: ['@nuxtjs/i18n', 'nuxt-backend'], devtools: { enabled: true }, css: ['~/assets/main.css'], compatibilityDate: '2026-10-14', telemetry: false, backend: { // CUSTOMIZATION: the invitation page lives at /join, the one place the // path is written: the module carries it to backend/paths.generated.ts, // which invitation emails link from. The app's own page there // (app/pages/join.vue) replaces the built-in one. pages: { acceptInvitation: '/join' }, }, i18n: { defaultLocale: 'en', strategy: 'prefix_except_default', locales: [ { code: 'en', language: 'en-US', file: 'en.json', name: 'English' }, { code: 'fr', language: 'fr-FR', file: 'fr.json', name: 'Français' }, ], }, }) ``` [View the source](https://github.com/qruto/nuxt-backend/tree/main/examples/advanced). ## Example: Convex auth [Convex Auth mode](https://nuxt-backend.dev/docs/build/auth/convex-auth) in a whole app: sign-in with a username and a password through `@convex-dev/auth`, sessions in httpOnly cookies, and an `/account` page the `convex-auth` middleware guards. ```bash npm create nuxt@latest my-app -- -t gh:qruto/nuxt-backend/examples/convex-auth ``` The mode is sign-in only, so the package's pages, workspaces, billing and AI credits are off in it; the other templates have them. [View the source](https://github.com/qruto/nuxt-backend/tree/main/examples/convex-auth). ## Run it in the browser Open the starter in StackBlitz. The sandbox runs `npm run dev`, which asks you to log in to Convex in its terminal (a device flow) and sets up a dev deployment of your own: [stackblitz.com/github/qruto/nuxt-backend/tree/main/templates/starter](https://stackblitz.com/github/qruto/nuxt-backend/tree/main/templates/starter) ## Preview builds (pkg.pr.new) Every pull request and every commit on `main` publishes a preview of the package through [pkg.pr.new](https://pkg.pr.new), so a fix can be tried before it is released: ```bash # a specific PR npm install https://pkg.pr.new/qruto/nuxt-backend@ # a specific commit npm install https://pkg.pr.new/qruto/nuxt-backend@ ``` The install URL is posted by the pkg.pr.new bot on each PR, next to an **Open in StackBlitz** link that runs the starter with that build wired in. Preview builds carry the exact `exports` map of the release they precede, so the [import tree](https://nuxt-backend.dev/docs/reference/entrypoints) is the same. ## Related - [Quickstart](https://nuxt-backend.dev/docs/start/quickstart): the starter, from create to credits spent. - [Build a creative app](https://nuxt-backend.dev/docs/start/tutorial): Panels, built part by part. - [Try the demo](https://nuxt-backend.dev/docs/start/playground): Panels running live on this site, in sandbox mode. - [Try everything](https://nuxt-backend.dev/docs/start/playground/try-everything): the whole playground on your machine, with seeded personas. - [Feature map](https://nuxt-backend.dev/docs/start/feature-map): every feature the module brings to a template, capability by capability. # Try the demo > Panels, the tutorial's comic-strip app, running live at /playground against this site's own deployment in sandbox mode, with nothing to install; what the demo refuses, and how to run it yourself. Version: nuxt-backend 0.6.x · Tab: Start · Kind: how-to · Status: stable Every page: [llms.txt](https://nuxt-backend.dev/llms.txt) · Skill for coding agents: [nuxt-backend](https://nuxt-backend.dev/.well-known/skills/nuxt-backend/SKILL.md) Commands use npm; use your project's package manager. - [Try it live in the playground](https://nuxt-backend.dev/playground) The [demo](https://nuxt-backend.dev/playground) is Panels, the comic-strip maker the [tutorial](https://nuxt-backend.dev/docs/start/tutorial) builds, running against this site's own deployment. People sign in, buy credits, add a photo, and turn an idea into a three-panel strip a model draws. The deployment runs in sandbox mode (`BACKEND_ENVIRONMENT=sandbox`): every provider stays in its test mode, so nobody is charged or mailed for real. Beside Panels' own pages, the module's pages mount under `/playground` too: [pricing](https://nuxt-backend.dev/playground/pricing), [settings](https://nuxt-backend.dev/playground/settings), [profile](https://nuxt-backend.dev/playground/profile), [security](https://nuxt-backend.dev/playground/security) and [gifts](https://nuxt-backend.dev/playground/gifts). ### Sign in with a sandbox address Open [/playground](https://nuxt-backend.dev/playground) and follow **Sign in to start a strip**. The sign-in page takes only a generated sandbox address: press **Create a sandbox identity** for one of the form `delivered+…@resend.dev`, with a long random label. The email provider accepts these in test mode, and no real inbox is involved. Once you ask for a code, it shows under the form, read back from the [dev inbox](https://nuxt-backend.dev/docs/develop/dev-inbox). This device remembers your last five addresses, and an address is the only way back into its account, so keep the one you use. ### Start a strip On [your strips](https://nuxt-backend.dev/playground/strips), pick one of the ideas under **Start from an idea**. An idea marked **(free)** was drawn once for the demo: your strip copies its panels at 0 credits, with no model call. Drawing anything else costs 30 credits. ### Pay with the test card Credits and plans come from the billing provider's sandbox: on the [pricing page](https://nuxt-backend.dev/playground/pricing), pay with `4242 4242 4242 4242`, any future expiry and any CVC. Nothing is charged. The Studio plan's `priority_queue` feature gives its strips a head start in the queue. ## What the demo refuses The demo is open to anyone, and its model calls are real. So Panels holds itself to a public demo when its deployment is a sandbox (`backend/demo.ts` in the template), and the package adds the rules of every sandbox deployment: - **Generated sandbox addresses only.** Sign-in, sign-up, workspace invitations and an email change accept only `delivered+