---
title: "Module options"
description: "Every option of the Nuxt module's backend key with its default, including css and turning a packaged page off, the paths file the backend reads them from, the options 0.2.0 removes, the runtime config the module publishes, and its ModuleOptions interface."
canonical_url: "https://nuxt-backend.dev/docs/reference/configuration/module-options"
---
# Module options

> Every option of the Nuxt module's backend key with its default, including css and turning a packaged page off, the paths file the backend reads them from, the options 0.2.0 removes, the runtime config the module publishes, and its ModuleOptions interface.

Version: nuxt-backend 0.6.x · Tab: Reference · Kind: reference · 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 `backend` key in `nuxt.config.ts` takes the options below. Each has a default, and `url` is derived, so most apps set none. This page lists each option with its default, the paths file that carries them to the backend, the options the release removes and what replaces them, the runtime config the module publishes, and the `ModuleOptions` interface.

## Options

Every option is optional. The deployment's URL is found in this order, so in practice you set it nowhere:

1. `url`, here.
2. `NUXT_PUBLIC_BACKEND_URL` in the env.
3. Derived from `CONVEX_DEPLOYMENT`, which the Convex CLI writes to `.env.local`.

The module hands the result to the base module as a default, so the base module's own `convex.url`, or `NUXT_PUBLIC_CONVEX_URL`, wins when you set one.

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  modules: ['nuxt-backend'],
  backend: {
    pages: { login: '/sign-in', pricing: false },
    redirects: { afterSignIn: '/app' },
  },
})
```

<field-group>
<field name="url" type="string">

The deployment's URL (the `.convex.cloud` origin), found in the order above. The HTTP-routes origin (`.convex.site`) the auth proxy and the AI stream talk to is derived from it. A custom domain in front of the HTTP routes goes in `NUXT_PUBLIC_CONVEX_SITE_URL`, the base module's own variable.

</field>

<field name="auth" type="'better-auth' | 'convex-auth'" default-value="'better-auth'">

Which auth the app runs. Better Auth is the package's own: passwordless sign-in, the pages, the page guard, workspaces, billing, AI credits and the account features. `'convex-auth'` runs the base module's Convex Auth integration instead, sign-in only, with all of those off. Experimental ([Sign in with Convex Auth](https://nuxt-backend.dev/docs/build/auth/convex-auth)).

</field>

<field name="authRoute" type="string" default-value="'/api/auth'">

The path of the same-origin auth proxy, and of the auth routes behind it. This is the one place it is written: the backend's auth routes and the Convex auth config read it from the [paths file](#the-paths-file) ([Auth setup](https://nuxt-backend.dev/docs/build/auth/setup#auth-route-and-options)).

</field>

<field name="pages" type="ModulePagesOptions" default-value="every page at its default path">

Where the ready-made pages mount. Every page is on at its default path; give a key a path to move it, or `false` to turn it off. A signed-out visitor to a guarded page goes to `pages.login`. To replace a page, put an app page at its path: an app page always wins. A value that is neither a path nor `false` stops the build. Each path is declared here once: the guards read it from the runtime config, and the emails that link to a page read it from the [paths file](#the-paths-file). See [Packaged pages](https://nuxt-backend.dev/docs/build/ui/pages).

</field>

<field name="redirects" type="ModuleRedirectsOptions" default-value="{ afterSignIn: '/' }">

Where the ready-made pages send a person once they are done. `afterSignIn` is where the sign-in page sends someone whose `?redirect=` names no page of this site: a path, such as `/app`. See [When the session ends](https://nuxt-backend.dev/docs/build/auth/access/pages#when-the-session-ends).

</field>

<field name="devtools" type="boolean" default-value="true">

The Backend tab in Nuxt DevTools, in development only. See [DevTools](https://nuxt-backend.dev/docs/develop/devtools).

</field>

<field name="css" type="boolean" default-value="true">

The package's stylesheets. On, the module loads the tokens and the styles of each detected capability's components, inside `@layer nuxt-backend`, so any rule of yours wins. `false` loads no package CSS at all: the components render their markup, `data-*` hooks and accessibility attributes, unstyled. See [Customize the UI](https://nuxt-backend.dev/docs/build/ui/customize).

</field>

<field name="installable" type="InstallableOptions | false">

The web app manifest the module serves once `public/` holds two icons and app config names the brand: `themeColor` (one colour, or `{ light, dark }`, which the pages also carry as `theme-color` meta tags), `backgroundColor`, `description`, `id` (the app's identity, a path on the site), `lang`, `orientation`, `icons` (the two icons' paths), `maskable`, and `browserBanner` (`false` stops Chrome's own install banner, so your button offers the install). `false` serves no manifest. See [Make the app installable](https://nuxt-backend.dev/docs/build/email/notifications/installable).

</field>

<field name="chunkRecovery" type="boolean" default-value="true">

One reload for a page whose code failed to load before the app started, that is before its first page rendered in full, hydration included: a module script or stylesheet from `app.buildAssetsDir` that fails before the page has loaded, or a dynamic import that fails before that first render resolves. A flaky connection does that, and so does a deploy that replaced the chunks under an open page, and it leaves a page that looks finished and does nothing, or Nuxt's error page in place of a good one. A production build puts an inline script first in every server-rendered page, with the request's nonce, and a client plugin tells it once the app has started (Nuxt's `app:suspense:resolve`). It writes no DOM sink, so Trusted Types has nothing to refuse, and it keeps a guard of its own in `sessionStorage`, so a page reloads once, never in a loop, and Nuxt's `nuxt:reload` stays Nuxt's. A failure after the app started keeps Nuxt's own handling, a stylesheet that a lazy component's import adds included. `false` leaves the script out. With `security: false` the script carries no nonce: a Content-Security-Policy of your own must allow it (`'unsafe-inline'`, or a nonce of yours on every script in the head), or set `chunkRecovery: false`. See [Content Security Policy](https://nuxt-backend.dev/docs/ship/security#content-security-policy).

</field>
</field-group>

Auth is always on, and so is every [capability](https://nuxt-backend.dev/docs/start/concepts/capabilities): a capability lights up when its env or catalog exists, never through an option.

### Removed options

`0.2.0` removes four options. Each one stops the build with an error that names it and what replaces it:

<table>
<thead>
  <tr>
    <th>
      Option
    </th>
    
    <th>
      Replaced by
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        siteUrl
      </code>
    </td>
    
    <td>
      Derived from <code>
        url
      </code>
      
      , the <code>
        .convex.site
      </code>
      
       twin of the <code>
        .convex.cloud
      </code>
      
       origin. A self-hosted backend or a custom domain sets <code>
        NUXT_PUBLIC_CONVEX_SITE_URL
      </code>
      
      , the base module's own variable
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        autoEnv
      </code>
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/cli#dev">
        <code>
          npx nuxt-backend dev
        </code>
      </a>
      
      , which provisions a new dev deployment's env once, and <a href="https://nuxt-backend.dev/docs/reference/cli#env-push">
        <code>
          env push
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        scaffold
      </code>
    </td>
    
    <td>
      <a href="https://nuxt-backend.dev/docs/reference/cli#init">
        <code>
          npx nuxt-backend init
        </code>
      </a>
      
      , and <code>
        dev
      </code>
      
      , which scaffolds an app with no functions directory
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        mcp
      </code>
    </td>
    
    <td>
      Nothing yet: the end-user MCP endpoint waits for a later release (<a href="https://nuxt-backend.dev/docs/start/roadmap">
        Roadmap
      </a>
      
      )
    </td>
  </tr>
</tbody>
</table>

`loginPath`, removed earlier in 0.2, stops the build the same way: it is `pages.login` now. Two settings an earlier 0.2 preview removed are back: `css: false`, and `false` on a page key. A page key set to `true` still stops the build, since every page is on unless you turn it off.

### Page keys

`pages` takes one key per ready-made page. A key left out keeps its default path:

<table>
<thead>
  <tr>
    <th>
      Key
    </th>
    
    <th>
      Default path
    </th>
    
    <th>
      Access
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        login
      </code>
    </td>
    
    <td>
      <code>
        /login
      </code>
    </td>
    
    <td>
      Public
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        pricing
      </code>
    </td>
    
    <td>
      <code>
        /pricing
      </code>
    </td>
    
    <td>
      Public
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        settings
      </code>
    </td>
    
    <td>
      <code>
        /settings
      </code>
    </td>
    
    <td>
      Signed in
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        profile
      </code>
    </td>
    
    <td>
      <code>
        /profile
      </code>
    </td>
    
    <td>
      Signed in
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        security
      </code>
    </td>
    
    <td>
      <code>
        /security
      </code>
    </td>
    
    <td>
      Signed in
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        acceptInvitation
      </code>
    </td>
    
    <td>
      <code>
        /accept-invitation
      </code>
    </td>
    
    <td>
      Signed in
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        keepAccount
      </code>
    </td>
    
    <td>
      <code>
        /account/keep
      </code>
    </td>
    
    <td>
      Public, never indexed: keeps an account whose deletion is scheduled, by the link in its email
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        admin
      </code>
    </td>
    
    <td>
      <code>
        /admin
      </code>
    </td>
    
    <td>
      The <code>
        admin
      </code>
      
       role
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        invite
      </code>
    </td>
    
    <td>
      <code>
        /invite
      </code>
    </td>
    
    <td>
      Public, never indexed: redeems an access link or an invite code
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        waitlist
      </code>
    </td>
    
    <td>
      <code>
        /waitlist
      </code>
    </td>
    
    <td>
      Public, never indexed: a place on the waitlist, by its signed status link
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        gifts
      </code>
    </td>
    
    <td>
      <code>
        /gifts
      </code>
    </td>
    
    <td>
      Signed in: gifts sent and received
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        unsubscribe
      </code>
    </td>
    
    <td>
      <code>
        /unsubscribe
      </code>
    </td>
    
    <td>
      Public, never indexed: unsubscribing from an email topic by its signed link
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        welcome
      </code>
    </td>
    
    <td>
      <code>
        /welcome
      </code>
    </td>
    
    <td>
      Signed in: the onboarding steps
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        report
      </code>
    </td>
    
    <td>
      <code>
        /report
      </code>
    </td>
    
    <td>
      Public: the notice form for reporting content
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        privacy
      </code>
    </td>
    
    <td>
      <code>
        /legal/privacy
      </code>
    </td>
    
    <td>
      Public: the privacy policy, filled from <code>
        appConfig.backend.legal
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        terms
      </code>
    </td>
    
    <td>
      <code>
        /legal/terms
      </code>
    </td>
    
    <td>
      Public: the terms of service
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        subprocessors
      </code>
    </td>
    
    <td>
      <code>
        /legal/subprocessors
      </code>
    </td>
    
    <td>
      Public: the generated subprocessor list
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        accessibility
      </code>
    </td>
    
    <td>
      <code>
        /legal/accessibility
      </code>
    </td>
    
    <td>
      Public: the accessibility statement
    </td>
  </tr>
</tbody>
</table>

Every private page, and every public one that reads a token from its link, is kept out of search indexes, sitemaps and caches at its path. A page whose capability is not set up yet, such as `/gifts` before billing has a token, still mounts and says what it needs. `false` on a key turns its page off: nothing mounts at its path, and the components that link to it hide the link.

## The paths file

The backend needs some of these paths too: the auth routes are served under `authRoute`, and its emails link to pages. You still write each path once, here. On every `nuxt prepare`, `dev` and `build`, the module writes the ones the backend needs to `paths.generated.ts` in the functions directory, and rewrites the file only when `nuxt.config` moves one. No env var is involved, and the paths deploy with the code that reads them:

```ts [backend/paths.generated.ts]
/* Generated by nuxt-backend from nuxt.config (`backend.authRoute`, `backend.pages`) — do not edit. */
// The Nuxt module rewrites this file whenever nuxt.config moves a path, and the
// backend reads it: auth.config.ts, auth.ts, account.ts, email.ts, billing.ts, waitlist.ts and access.ts pass `paths` on. Commit it.
export const paths = {
  authRoute: '/api/auth',
  acceptInvitation: '/accept-invitation',
  keepAccount: '/account/keep',
  security: '/security',
  waitlist: '/waitlist',
  login: '/login',
  unsubscribe: '/unsubscribe',
  report: '/report',
  settings: '/settings',
  privacy: '/legal/privacy',
} as const
```

<table>
<thead>
  <tr>
    <th>
      Key
    </th>
    
    <th>
      From
    </th>
    
    <th>
      What reads it
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        authRoute
      </code>
    </td>
    
    <td>
      <code>
        authRoute
      </code>
    </td>
    
    <td>
      The auth routes and the Convex auth config (<code>
        defineBackendAuthConfig
      </code>
      
      , <code>
        setupAuth
      </code>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        acceptInvitation
      </code>
    </td>
    
    <td>
      <code>
        pages.acceptInvitation
      </code>
    </td>
    
    <td>
      The workspace invitation email (<code>
        setupAuth
      </code>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        keepAccount
      </code>
    </td>
    
    <td>
      <code>
        pages.keepAccount
      </code>
    </td>
    
    <td>
      The "keep my account" link of a scheduled deletion (<code>
        setupAccount
      </code>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        security
      </code>
    </td>
    
    <td>
      <code>
        pages.security
      </code>
    </td>
    
    <td>
      The email to a passkey-only account that its recovery code signed in (<code>
        setupAuth
      </code>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        waitlist
      </code>
    </td>
    
    <td>
      <code>
        pages.waitlist
      </code>
    </td>
    
    <td>
      The waitlist confirmation's status link (<code>
        setupAuth
      </code>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        login
      </code>
    </td>
    
    <td>
      <code>
        pages.login
      </code>
    </td>
    
    <td>
      The "You're in" email to a person admitted from the waitlist (<code>
        setupWaitlist
      </code>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        unsubscribe
      </code>
    </td>
    
    <td>
      <code>
        pages.unsubscribe
      </code>
    </td>
    
    <td>
      The page a topic email's unsubscribe and confirmation links open, and an announcement broadcast's (<code>
        setupEmail
      </code>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        report
      </code>
    </td>
    
    <td>
      <code>
        pages.report
      </code>
    </td>
    
    <td>
      The notice form a statement of reasons' appeal link opens (<code>
        setupAdmin
      </code>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        settings
      </code>
    </td>
    
    <td>
      <code>
        pages.settings
      </code>
    </td>
    
    <td>
      The settings page the plan-pass and renewal emails link to (<code>
        setupBilling
      </code>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        privacy
      </code>
    </td>
    
    <td>
      <code>
        pages.privacy
      </code>
    </td>
    
    <td>
      The privacy policy an access invitation email ("Email them") links to (<code>
        setupAccess
      </code>
      
      )
    </td>
  </tr>
</tbody>
</table>

The scaffold passes the file's `paths` on: `defineBackendAuthConfig({ paths })` in `auth.config.ts`, `setupAuth(components, query, { paths, … })` in `auth.ts` and `setupAccount(components, { paths, … })` in `account.ts`. A `waitlist.ts` passes them to `setupWaitlist(components, { paths, … })`. `npx nuxt-backend init` and `dev` write it with the default paths before the module first runs, so a new functions directory deploys. A page turned off with `false` keeps its default path in the file. Commit the file: a build that pushes functions without running Nuxt first deploys the paths it holds.

`npx nuxt-backend doctor` checks both ends. [`paths-file`](https://nuxt-backend.dev/docs/reference/cli/diagnostics#paths-file) warns when the file is missing or holds other paths than `nuxt.config`, and `doctor --fix` rewrites it. [`page-paths`](https://nuxt-backend.dev/docs/reference/cli/diagnostics#page-paths) fails when the deployment links to other paths, which happens when the deployed code predates the file or does not pass `paths` on.

## Runtime config

The module publishes three keys under `runtimeConfig.public.backend`, typed through `@nuxt/schema`:

- **pages**: the resolved mount path per page key, or `false` for a page turned off. The shipped components cross-link through it, and yours can too.
- **authRoute**: the same-origin auth route (`backend.authRoute`).
- **redirects**: `backend.redirects` with its default filled in, `{ afterSignIn }`.

The deployment URLs are not on `backend`: the module forwards `url` to the base module, which exposes it as `runtimeConfig.public.convex.url`, with the derived `runtimeConfig.public.convex.siteUrl` beside it.

## The interface

```ts
import nuxtBackendModule, { type ModuleOptions } from 'nuxt-backend'

interface ModuleOptions {
  url?: string                        // the deployment's URL (.convex.cloud);
                                      // else NUXT_PUBLIC_BACKEND_URL, else
                                      // derived from CONVEX_DEPLOYMENT
  auth?: 'better-auth' | 'convex-auth'  // default 'better-auth'; 'convex-auth'
                                      // is sign-in only (experimental)
  authRoute?: string                  // default '/api/auth'
  pages?: ModulePagesOptions          // where the ready-made pages mount
  redirects?: ModuleRedirectsOptions  // where they send a person when done
  devtools?: boolean                  // default true: the Backend tab
  css?: boolean                       // default true; false loads no package CSS
  installable?: InstallableOptions | false  // the web app manifest; false serves none
  chunkRecovery?: boolean             // default true: one reload for a page
                                      // whose code failed before it started
}

interface InstallableOptions {
  themeColor?: string | { light: string, dark: string }
  backgroundColor?: string            // default: the theme colour, its light one
  description?: string
  icons?: { 192: string, 512: string }  // default: icon-192.png and icon-512.png,
                                      // else RealFaviconGenerator's names
  maskable?: boolean | { 192: string, 512: string }  // default: icon-maskable-*.png when present
}

interface ModuleRedirectsOptions {
  afterSignIn?: string  // default '/': when ?redirect= names no page here
}

// A path moves the page; false turns it off.
type PagePath = string | false

interface ModulePagesOptions {
  login?: PagePath             // default '/login'
  pricing?: PagePath           // default '/pricing'
  settings?: PagePath          // default '/settings'
  profile?: PagePath           // default '/profile'
  security?: PagePath          // default '/security'
  acceptInvitation?: PagePath  // default '/accept-invitation'; invitation
                               // emails link to it (the paths file)
  keepAccount?: PagePath       // default '/account/keep' (GRACE)
  admin?: PagePath             // default '/admin'
  invite?: PagePath            // default '/invite' (ACCESS)
  waitlist?: PagePath          // default '/waitlist'
  gifts?: PagePath             // default '/gifts'
  unsubscribe?: PagePath       // default '/unsubscribe' (PREFS)
  welcome?: PagePath           // default '/welcome'
  report?: PagePath            // default '/report' (SAFETY)
  privacy?: PagePath           // default '/legal/privacy'
  terms?: PagePath             // default '/legal/terms'
  subprocessors?: PagePath     // default '/legal/subprocessors'
  accessibility?: PagePath     // default '/legal/accessibility'
}
```

The interface in the code declares no `siteUrl`, `autoEnv` or `scaffold`, and the module stops the build on one.

`url` is forwarded to the base module as a default, so an explicit `convex.url` in `nuxt.config` still wins over it.

Per page key, a path moves the page there, `false` turns it off, and a key left out keeps its default path. **An app page at the same path always wins**: the module detects it, skips its own and logs the override, so you never fight the router to replace a built-in page.

The module also augments the runtime config and the app config:

- **PublicRuntimeConfig.backend**: `pages`, `authRoute` and `redirects`, as above.
- **AppConfig.backend**: the [content layer](https://nuxt-backend.dev/docs/build/ui/customize/labels), with the plan catalog, the labels and the brand ([App config](https://nuxt-backend.dev/docs/reference/configuration/app-config)).

## What the module adds to an app

`nuxt-backend` ships working pages and a neutral stylesheet, and keeps every one of them replaceable without ejecting:

<table>
<thead>
  <tr>
    <th>
      Capability (Nuxt Kit)
    </th>
    
    <th>
      In <code>
        nuxt-backend
      </code>
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Module options · <code>
        defineNuxtModule({ configKey })
      </code>
    </td>
    
    <td>
      <code>
        backend.url
      </code>
      
      , <code>
        authRoute
      </code>
      
      , <code>
        pages
      </code>
      
      , <code>
        redirects
      </code>
      
      , <code>
        devtools
      </code>
      
      , <code>
        css
      </code>
      
      , <code>
        installable
      </code>
      
      , <code>
        chunkRecovery
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Runtime config · <code>
        options.runtimeConfig
      </code>
    </td>
    
    <td>
      Public <code>
        backend
      </code>
      
       keys, with the resolved page paths
    </td>
  </tr>
  
  <tr>
    <td>
      App config · <code>
        options.appConfig
      </code>
    </td>
    
    <td>
      The <code>
        appConfig.backend
      </code>
      
       content layer: plans, labels and brand
    </td>
  </tr>
  
  <tr>
    <td>
      App plugins · <code>
        addPlugin
      </code>
    </td>
    
    <td>
      Client and server plugins that inject <code>
        $convex
      </code>
      
      . A client plugin sends a person to sign in when the session ends on a guarded page (the <code>
        backend:session-ended
      </code>
      
       hook), and, in a production build, another tells the chunk-load recovery the app has started
    </td>
  </tr>
  
  <tr>
    <td>
      Auto-imported composables · <code>
        addImports
      </code>
    </td>
    
    <td>
      The <a href="https://nuxt-backend.dev/docs/reference/nuxt/composables">
        composables
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Auto-imported components · <code>
        addComponent
      </code>
    </td>
    
    <td>
      The <a href="https://nuxt-backend.dev/docs/reference/components">
        components
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Server routes · <code>
        addServerHandler
      </code>
    </td>
    
    <td>
      The auth proxy at <code>
        authRoute/**
      </code>
      
      , and the health route
    </td>
  </tr>
  
  <tr>
    <td>
      Server auto-imports · <code>
        addServerImports
      </code>
    </td>
    
    <td>
      <code>
        backendAuth
      </code>
      
      , beside the base module's <code>
        fetchQuery
      </code>
      
       and <code>
        preloadQuery
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Import aliases · <code>
        options.alias
      </code>
      
       (and <code>
        nitro.alias
      </code>
      
      )
    </td>
    
    <td>
      <code>
        #backend
      </code>
      
      , <code>
        #backend/api
      </code>
      
      , <code>
        #backend/server
      </code>
      
      , <code>
        #backend/dataModel
      </code>
      
      , <code>
        #backend/_generated
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      Type augmentation · <code>
        declare module
      </code>
    </td>
    
    <td>
      Runtime config, app config, page meta (<code>
        auth
      </code>
      
      ) and generated declarations
    </td>
  </tr>
  
  <tr>
    <td>
      Package entrypoints · <code>
        exports
      </code>
      
       map
    </td>
    
    <td>
      The module, the setup helpers and the component (<a href="https://nuxt-backend.dev/docs/reference/entrypoints">
        Package entrypoints
      </a>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      Pages · <code>
        extendPages
      </code>
    </td>
    
    <td>
      The ready-made pages (<code>
        pages
      </code>
      
      ), each movable and replaceable by a page of yours. None is prerendered, and private ones stay out of indexes and caches
    </td>
  </tr>
  
  <tr>
    <td>
      Global CSS · <code>
        options.css
      </code>
    </td>
    
    <td>
      The tokens on <code>
        :root
      </code>
      
       and the styles of each detected capability's components, inside <code>
        @layer nuxt-backend
      </code>
      
      , so any app rule wins. <code>
        css: false
      </code>
      
       adds none
    </td>
  </tr>
  
  <tr>
    <td>
      DevTools · <code>
        devtools:customTabs
      </code>
      
      , <code>
        extendServerRpc
      </code>
    </td>
    
    <td>
      The Backend tab with its own RPC, and an activity log on the Vue DevTools timeline (<code>
        devtools: false
      </code>
      
       turns both off)
    </td>
  </tr>
  
  <tr>
    <td>
      Route rules · <code>
        extendRouteRules
      </code>
    </td>
    
    <td>
      <code>
        prerender: false
      </code>
      
       at every page's path. At a private page's path, and at each of your pages with <code>
        auth
      </code>
      
       rules, also <code>
        robots: false
      </code>
      
      , <code>
        sitemap: false
      </code>
      
      , and caching off with <code>
        cache-control: private, no-store
      </code>
      
      . A page of yours without <code>
        auth
      </code>
      
       rules in place of a private one keeps the caching rules and loses <code>
        robots
      </code>
      
       and <code>
        sitemap
      </code>
      
       (<a href="https://nuxt-backend.dev/docs/build/ui/pages#search-engines">
        search engines
      </a>
      
      , <a href="https://nuxt-backend.dev/docs/build/ui/pages#caches">
        caches
      </a>
      
      ). A rule you set for the same path wins, key by key
    </td>
  </tr>
  
  <tr>
    <td>
      Global route middleware · <code>
        addRouteMiddleware({ global: true })
      </code>
    </td>
    
    <td>
      <code>
        backend-access
      </code>
      
      , the <a href="https://nuxt-backend.dev/docs/build/auth/access/pages">
        page guard
      </a>
      
      : it acts only on a page with <code>
        definePageMeta({ auth })
      </code>
      
       rules
    </td>
  </tr>
  
  <tr>
    <td>
      Error page · <code>
        app:resolve
      </code>
    </td>
    
    <td>
      When neither the app nor a layer has an <code>
        error.vue
      </code>
      
      : a 403 shows <code>
        <AccessDenied>
      </code>
      
      , anything else Nuxt's own page
    </td>
  </tr>
  
  <tr>
    <td>
      Layouts · <code>
        addLayout
      </code>
    </td>
    
    <td>
      None: layouts are the app's
    </td>
  </tr>
  
  <tr>
    <td>
      Nitro plugins · <code>
        addNitroPlugin
      </code>
    </td>
    
    <td>
      The deployment's URLs at start, the Content Security Policy's additions, and, in a production build, the chunk-load recovery script first in each page's head (<code>
        chunkRecovery
      </code>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      Development defaults
    </td>
    
    <td>
      On <code>
        nuxt dev
      </code>
      
      : modules served from <code>
        /_dev/
      </code>
      
       with <code>
        Cache-Control: no-cache
      </code>
      
      , and <code>
        nuxt-security
      </code>
      
      's rate limiter, HSTS and <code>
        upgrade-insecure-requests
      </code>
      
       off unless set under <code>
        $development
      </code>
      
       (<a href="https://nuxt-backend.dev/docs/develop/dev-loop#what-the-dev-server-keeps-out-of-the-browser">
        Run the dev loop
      </a>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      Bundler plugins, <code>
        extends
      </code>
    </td>
    
    <td>
      None
    </td>
  </tr>
</tbody>
</table>

There is no named `auth` route middleware: the page guard is the one way to protect a page.

<note>

Everything the module mounts is replaceable step by step, the [customization ladder](https://nuxt-backend.dev/docs/build/ui/customize): mount it as it is, restyle it with `--bk-*` tokens, change its labels, fill its slots, swap a part by name, build your own markup on the headless composables, or eject the source with `npx nuxt-backend eject`.

</note>


## Sitemap

See the full [sitemap](https://nuxt-backend.dev/sitemap.md) for all pages.
