Nuxt Starter Kit v3: Delete the Features You Don't Need

When you start a new project with my Nuxt Starter Kit, you rarely need everything it ships. Maybe your app has no blog, or you don't need a waitlist because you launch right away. In v2, removing such a feature was more work than it should be. The banner, for example, had its database table in the auth layer, its admin page in the dashboard layer and its API route in the app itself. To get rid of it, you had to find and delete code in three places and hope you didn't miss one.
I wanted removing a feature to be as simple as deleting a folder. My second goal was a simpler architecture. I maintain the kit alone, and every tool in the repository is one more thing I have to update, configure and explain to buyers. So I removed everything a single Nuxt app doesn't need. Both goals led to v3.0.0, which I released on December 2, 2026. In this article, I want to show you what changed, how the new layer structure works and what you need to do to upgrade an existing project.
From Turborepo to Auto-Registered Layers
The kit was always built from Nuxt layers. In v2, each layer was its own workspace package in packages/layer-*, with its own package.json, ESLint config, tsconfig.json and .nuxtrc. Turborepo ran the scripts across these packages, and dotenv-cli loaded the .env file.
That's a lot of tooling for one Nuxt app, and each of these config files needed updates and broke from time to time. In v3, the layers live in apps/web/layers/<name>, and Nuxt registers every folder there automatically. There is no extends in nuxt.config.ts any more, and no Turborepo:
apps/web/ Nuxt app: composition, app pages, routeRules
apps/web/layers/* Nuxt layers, registered automatically
packages/site-config/ Site name, domain, logos, social links
All dependencies are now in apps/web/package.json. While cleaning up, I also removed packages that the kit didn't need: uuid and nanoid became node:crypto, the revenue chart in the dashboard is now a plain SVG component instead of Unovis, and Nuxt Content uses Node's built-in node:sqlite instead of better-sqlite3. The app went from 1,838 to 1,733 installed packages, and the Docker build no longer needs python3, make and g++.
Required and Optional Layers
v3 splits the layers into two groups:
| Layer | Required | Owns |
|---|---|---|
core | yes | Shared modules, loggers, toasts, extension points |
emails | yes | Email providers and useEmail() |
auth | yes | better-auth, the Polar plugin, auth tables, all migrations |
payment | yes | Polar products and pricing |
dashboard | yes | Dashboard layout, settings, billing, user admin |
blog, docs, waitlist, testimonials, banner, storage | no | One feature each |
An optional layer owns everything of its feature: pages, components, API routes, admin pages, database schema, types, i18n messages, routeRules and tests. banner is a new layer. Before, its code was the example of a feature spread over three places.
The important rule is the other direction: required code never references an optional layer. So how does the header show a "Blog" link, or the admin dashboard a "Waitlist" page, if the core doesn't know these features exist?
Extension Points
The core layer defines a few extension points in its app.config.ts. Each optional layer fills them in its own app.config.ts, and Nuxt merges the arrays of all layers. Let's take a look at the waitlist layer:
export default defineAppConfig({
extensions: {
adminLinks: [
{ labelKey: 'pages.admin.links.waitlist', order: 20, to: '/dashboard/admin/waitlist' },
],
slots: {
'footer': [
{ component: 'WaitlistFooter', order: 10 },
],
'landing-sections': [
{ component: 'WaitlistLandingSection', order: 20 },
],
},
},
})
adminLinks adds the waitlist page to the admin navigation. slots puts two global components into places that required code renders with <ExtensionSlot name="...">: the footer and the sections of the landing page. order decides the position when several layers fill the same slot.
When you delete the waitlist folder, these entries are gone, and the footer and landing page render without them. That's it! The Layers docs list all slots and how to register your own features.
Removing a Feature
Removing an optional feature now takes three steps:
- Delete
apps/web/layers/<feature>. - Run
pnpm db:generate. It creates a migration that drops the feature's tables. - Remove npm dependencies that only this feature used, e.g.
@aws-sdk/client-s3andioredisforstorage.
Of course, a promise like "delete the folder" breaks easily. One forgotten import in the dashboard, and the build fails. That's why the CI pipeline has a matrix job that deletes each optional layer, one at a time, and then runs pnpm typecheck, the unit tests and pnpm build. If a change in a required layer starts to depend on an optional one, CI fails.
Runtime Config with Zod Schemas
In v2, validate-env.ts with @t3-oss/env-nuxt checked the environment variables. Nuxt 4.7 lets you declare the values of runtimeConfig as schemas, so each layer now declares the values it owns:
export default defineNuxtConfig({
// Validated when the server starts: a missing required value stops it.
runtimeConfig: {
betterAuthSecret: z.string(), // NUXT_BETTER_AUTH_SECRET
private: {
databaseUrl: z.string(),
polarAccessToken: z.string(),
polarServer: z.enum(['production', 'sandbox']).default('sandbox'),
// ...
},
},
})
The server doesn't start when a required value is missing and lists the missing ones (error NUXT_E8014). And because the schema lives in the layer, deleting a layer also deletes its environment variables.
More Changes
Besides the new structure, v3 contains a few fixes and improvements:
- Session in sync across tabs:
useAuth()now creates one better-auth client per app and follows better-auth's session store. When a user signs out in one tab, the other tabs go to the login page on their next navigation. - Admin API checks: every admin API handler calls
await requireAdmin(event)in addition to the admin middleware. A unit test fails for handlers without it. - Safer uploads: the upload API detects the file type from the file content instead of trusting the MIME type the client sends. Only PNG, JPEG, GIF, WebP, AVIF and PDF are allowed, with a 10 MB default limit.
- Central error logging: a Nitro plugin logs every 5xx response, so the API handlers no longer need
try/catchblocks that only log and rethrow. - One email helper:
sendTemplate()sends any email component from any layer. - German translations: every layer's
de.jsonnow has the same keys as itsen.json. - Real tests: API and e2e tests run against a production build and a real Postgres database. Only external services like Polar are mocked. The tests live in the layer they test, so they go away with it.
How I Tested v3 with an AI Agent
I did this refactoring together with Claude Opus 5.5 as a coding agent, and most v3 commits are co-authored by it. Moving 359 files by hand and fixing every import would have taken me much longer.
But a green CI pipeline doesn't prove that an existing project survives the upgrade. So before the release, I asked the agent a simple question: "What can we do to make this safer? We can start and test everything locally." It came back with a test plan and then ran it on my machine, with v2 and v3 side by side and a real Postgres database:
- Upgrade with real data: it created users, sessions, testimonials, a banner, uploads and waitlist entries with the v2 server. Then it changed the
.envfile exactly as the upgrade guide says and started v3 on the same database. All 14 checks passed: existing sessions stayed valid, and even a waitlist confirmation link from v2 still worked.pnpm db:migratehad nothing to apply. - Forgotten environment variable: without the renamed
NUXT_BETTER_AUTH_SECRET, the server refuses to start with a clear error, so the health check keeps the old version running. - Before and after: CSP and security headers, meta tags, the sitemap and the API routes are the same as in v2. Screenshots of 24 pages in light mode, dark mode and on mobile showed only one difference: the new SVG revenue chart.
- Feature removal down to the database: it deleted the waitlist layer, generated the drop migration and ran it on a copy of the upgraded database. Only the waitlist table was gone, and the remaining 46 API and e2e tests passed.
- Docker and external services: the image builds without root and without build tools, and S3 uploads and the Redis upload limit work against real services.
The test plan found two real bugs. A sign-out no longer reached other open tabs, and the links in /llms.txt had no https://. Both are fixed in v3.0.0. I don't think I would have tested this much without the agent, simply because writing all these one-off scripts by hand takes too long for a solo maintainer.
How to Upgrade
If your project is based on v2, the upgrade is mostly moving files. Your end users won't notice it: page and API URLs, the database schema and its migrations, and the better-auth and Polar setup stay the same. There is no new migration.
BETTER_AUTH_SECRET to NUXT_BETTER_AUTH_SECRET in your deployment, both as a runtime variable and as a Docker build secret. Without the new name, the server doesn't start. The .env file also moves to apps/web/.env.Almost every file moved, so a git merge of v3 into your fork produces conflicts in every file you touched. I recommend starting from v3 and moving your own code in. The upgrade guide has tables for every moved file, renamed variable and removed dependency. Do it on a branch and deploy to a staging environment first.
Conclusion
v3 is the biggest change to the kit since I built it, but most of it is invisible in the running app. What changed is how it feels to work on the code: one Nuxt app, plain pnpm scripts, and each feature in one folder that you can keep or delete. Fewer tools also mean less maintenance, for me and for you.
The downside is the upgrade for existing projects. Because almost every file moved, there is no simple merge, and you have to spend some time on it. I think it's worth it, because every future update will be easier to pull in.
Skip the setup. Ship the product.
- One-time payment
- Lifetime updates
- You own the code
Best Nuxt SaaS Boilerplate in 2026 - What Actually Matters
The checklist I use to judge a Nuxt SaaS boilerplate (auth, payments, architecture, security and maintenance), based on the kits I tried before I built my own.
Polar Checkout and Customer Portal in Nuxt with the better-auth Plugin
How I sell subscriptions and lifetime deals in Nuxt 4 with Polar's better-auth plugin, and why my app checks access without a single webhook handler.