Nuxt Starter Kit 3.0: Pick Your Modules, Keep Your Code

When we announced Nuxt Starter Kit we promised a foundation you could pick from. Version 2 did let you pick, but what you got didn't fully match what you picked. A project without authentication still carried authentication code, and every project came with nsk marker comments that meant nothing to you and that you would delete anyway.

Version 3.0 fixes that at the root. Every optional feature is now a Nuxt layer, and the CLI that builds your project has been rewritten from scratch.

What changed

Every module is a layer

The kit is now a small base app plus twelve layers in layers/<id>/. Each layer owns its own pages, components, server routes, database tables, translations and dependencies.

ModuleWhat it adds
authSessions, password and OAuth sign-in, account pages, dashboard shell
auth-2faTOTP second factor with single-use backup codes
auth-passkeysPasswordless sign-in with WebAuthn passkeys
auth-email-verificationVerification notice, confirmation link and resend
adminAdmin area shell, route guards and the seed endpoint
admin-usersList, edit, lock and delete users
admin-kvBrowse and edit Workers KV entries
feature-flagsOpenFeature flags backed by KV, with an admin panel
contentDocumentation, blog, search, RSS and Nuxt Studio
pwaInstallable app, service worker and offline fallback
databaseCloudflare D1 through NuxtHub and Drizzle ORM
server-coreAPI response envelope, KV and cache bindings, error reporting

When you create a project, the CLI copies the base app and only the layers you selected. Required modules come along automatically: pick admin-users and you get admin, auth, database and server-core too. Unselected layers are never copied, and their packages, scripts, environment variables and Cloudflare bindings are removed from package.json, .env.example and wrangler.jsonc.

A base-only project is about 450 files. With every module it is about 900.

No more markers

Instead of marker comments, the base app now has a few typed extension points: a header actions slot, a home hero slot, navigation menus, and on the server, hooks for login policies and post-registration steps. Layers register into them. Your code reads like ordinary Nuxt code, because it is.

A CLI that keeps your changes

create-nuxt-saas 3.0 is a rewrite. It is smaller (about 1,700 lines, down from about 3,000) and has more than 400 tests.

Inside a project you can now change your mind later:

Upgrades are a three-way merge between the kit version you started from, the new kit version, and your project. If you edited a file the kit also changed, both edits are kept. When they really clash you get normal conflict markers, the command exits with an error, and the CLI won't run another change until you resolve them. Your .env files, migrations, lockfile and content/ folder are never overwritten.

The project's state lives in one small file, .nuxt-saas.json: the kit commit, your modules, and any unresolved conflicts. Commit it.

Security fixes

While splitting the kit we audited every endpoint we moved. 3.0 fixes:

  • The admin users endpoint returned password hashes. It now returns an explicit safe projection.
  • The passkey sign-in endpoints returned more credential data than the browser needs. They now return only the credential IDs and transports.
  • The lock-screen endpoint could turn off two-factor authentication without a password.
  • 2FA backup codes never worked: they were 8 characters, but every check required 6 digits. They now work, each code works only once even under concurrent requests, and codes are generated with a cryptographic random source.
  • Passkeys were blocked in browsers by a too-strict Permissions-Policy header. The passkeys layer now allows WebAuthn.
  • Projects with passkeys crashed on Cloudflare Workers at startup (tsyringe requires a reflect polyfill). The passkeys layer now loads the polyfill.

Smaller changes you might notice

  • pnpm deploy no longer applies migrations. Run pnpm deploy:db after it.
  • pnpm db:seed works again.
  • 33 missing English and Vietnamese translations were added, and a test now fails the build when a used key is missing.
  • A locked account calling an admin API now gets ACCOUNT_LOCKED instead of ADMIN_REQUIRED.

Upgrading from 2.x

3.0 is a clean break. The CLI cannot upgrade a project generated by 2.x, and it tells you so instead of guessing. Create a fresh 3.0 project with the modules you use, then move your own code across. Most app code moves over unchanged.

We did exactly that with this website: it is now a 3.0 project with the content module.

Get involved

If something breaks when you try 3.0, we want to know.


Built with ❤️ by No Name Studio. Pick what you need. Ship the rest later.