Tech Stack and Repository Structure
The starter kit is one Nuxt app built from Nuxt 4 layers, in a small pnpm workspace.
Core Technologies
- Nuxt 4+ - The Vue.js framework for building web applications
- Nuxt UI - UI component library with beautiful pre-built components
- Better-auth - Modern authentication library with support for email/password, social login and passkeys
- Drizzle ORM - TypeScript-first ORM with excellent developer experience
- PostgreSQL - Reliable, powerful relational database
- Polar - Payments with Merchant of Record
- Tailwind CSS - Utility-first CSS framework
- Zod - Schemas for forms and the runtime config
- Vitest and Playwright - Unit, API and e2e tests
- pnpm - Fast, disk space efficient package manager
Repository Structure
apps/web/ Nuxt app: composition, app pages, routeRules
apps/web/layers/* Nuxt layers, registered automatically
apps/web/test/ Shared test setup (fixtures, mock services) and tests of the app pages
packages/site-config/ Site name, domain, logos, social links
deployment/ Docker and Coolify notes
There is no build orchestrator. Nuxt registers every folder in apps/web/layers/ as a layer, so there is no extends in nuxt.config.ts and the layers have no package.json of their own. All app dependencies are in apps/web/package.json. Their versions live in the catalog of pnpm-workspace.yaml, and packages reference them as "catalog:".
Scripts
Key commands (run from the repository root):
pnpm dev # Dev server on http://localhost:9009
pnpm build # Production build of apps/web
pnpm preview # Preview the production build
pnpm lint # ESLint
pnpm lint:fix # Auto-fix linting issues
pnpm typecheck # nuxt typecheck, covers all layers
pnpm test # Unit, API and e2e tests
pnpm test:unit # Vitest, no server or database needed
pnpm db:generate # Generate DB migrations
pnpm db:migrate # Apply DB migrations
pnpm db:studio # Open Drizzle Studio
Runtime Config
Environment variables are declared as Zod schemas in the runtimeConfig of the layer that owns them. The server refuses to start when a required value is missing (error NUXT_E8014). See Setup.
Rendering
Marketing and content pages are prerendered. /dashboard/** is client-only (ssr: false). Each layer sets the routeRules for its own routes.
Layers
| Layer | Required | Owns |
|---|---|---|
core | yes | Shared modules (Nuxt UI, Content, i18n, SEO, image, fonts, security, Umami), loggers, toasts, extension points |
emails | yes | Email providers, useEmail(), shared email components |
auth | yes | better-auth, Polar plugin, auth middleware, useDb(), 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 |
Read Layers to learn how optional features plug in and how to remove them.
Going to production
Checklist before launch: rename and rebrand the app, replace the intruder redirects, adapt the email templates, switch Polar to production and check SEO.
Layers
I use Nuxt Layers to structure my application. Optional features live in their own layer, so you can remove one by deleting its folder.