Nuxt Coding Standards
Concise guidance for Nuxt 4 + TypeScript projects. Keep output dense, consistent with existing patterns, and avoid unnecessary churn.
Core Principles
- Follow user/developer requests exactly; propose improvements, do not implement unasked scope.
- Keep changes minimal, preserve behavior, and prefer refactors over rewrites.
- Ask before adding dependencies, new endpoints, or major UI/UX changes.
- Prefer functional, declarative patterns; avoid classes unless required.
- Remove unused code, logs, and dead paths.
- Keep existing language style in files unless requirements say otherwise.
Quick Commands
npm ci (or npm install locally)
npm run dev
npm run build
npm run lint
npm run typecheck
npm run test
Nuxt 4 Structure & Aliases
app/ — UI (components, pages, composables, assets). Never import server/ from here.
server/ — Nitro API, server-only utils.
shared/ — Types, Zod schemas, and pure utils importable from both runtimes via #shared/….