app/: Nuxt app (pages, layouts, components, assets, middleware).server/: APIs (server/api), database (server/databasevia Drizzle), utils, emails, workers, and Nitro tasks.shared/shemas/: Zod schemas shared between client/server.types/: TypeScript ambient types.public/: Static assets.- Root configs:
nuxt.config.ts,drizzle.config.ts,tsconfig.json,eslint.config.mjs.
pnpm dev: Run the Nuxt dev server athttp://localhost:3000.pnpm build: Production build (server and client bundles).pnpm preview: Serve the production build locally.pnpm generate: Pre-rendered output (for static hosting paths where applicable).pnpm db:generate: Generate Drizzle migrations fromserver/database/schema.ts.pnpm db:push(aliaspnpm migrate): Apply migrations to the database.pnpm db:seed: Run Nitro taskdb:seedto populate sample data.pnpm lint/pnpm lint:fix: Check/fix code style with ESLint.
- Language: TypeScript, Vue 3 (Nuxt 4). Use
<script setup>in SFCs. - ESLint: Antfu + Nuxt config (
eslint.config.mjs). Runpnpm lintbefore PRs. - Indentation: 2 spaces; keep imports ordered (handled by ESLint config).
- Naming: Vue components in
PascalCase(e.g.,PasswordField.vue); pages/routes in lowercase directory names (e.g.,app/pages/auth/login.vue).
- Framework:
@nuxt/test-utilsis installed; Vitest is recommended. - Placement:
tests/or feature‑adjacent*.spec.ts. - Status: No test script yet. If you add tests, include
vitestand apnpm testscript.
- Commits: Follow Conventional Commits (e.g.,
feat:,fix:,chore:,refactor:). Examples in history:fix: ...,chore: upgrade .... - PRs: Provide a clear description, link related issues, include screenshots/GIFs for UI changes, list steps to verify, and ensure
pnpm lintpasses.
- Copy
.env.exampleto.env. SetDATABASE_URL,JWT_SECRET, mail settings (seenuxt.config.tsruntimeConfig), andappUrl. - Drizzle uses
DATABASE_URL(seedrizzle.config.ts). Never commit secrets or production DB credentials.