|
| 1 | +# AGENTS.md |
| 2 | + |
| 3 | +## Project overview |
| 4 | + |
| 5 | +Nuxt 4 documentation site with a built-in shadcn-vue component registry for distributing custom blocks. |
| 6 | + |
| 7 | +## Commands |
| 8 | + |
| 9 | +- `pnpm dev` — dev server |
| 10 | +- `pnpm lint` — ESLint (`@nuxt/eslint`-based, stylistic enabled: double quotes, semi) |
| 11 | +- `pnpm lint:fix` — auto-fix |
| 12 | +- `pnpm typecheck` — `nuxt typecheck` |
| 13 | +- `pnpm registry:build` — generate registry JSON files into `public/r/` |
| 14 | + |
| 15 | +CI order: **lint → typecheck** (no tests) |
| 16 | + |
| 17 | +## Architecture |
| 18 | + |
| 19 | +- **Nuxt 4 compat mode** (`future.compatibilityVersion: 4`) — app code lives under `app/` |
| 20 | +- `app/components/ui/` — shadcn-vue UI primitives (`shadcn-nuxt` module, no prefix) |
| 21 | +- `app/components/content/` — global MDC components (`pathPrefix: false`) |
| 22 | +- `app/components/_internal/`, `app/components/examples/` — excluded from Nuxt auto-imports |
| 23 | +- `app/registry/blocks/` — distributable components; each block = directory with `index.ts` + `.vue` |
| 24 | +- `content/docs/` — Markdown docs (`@nuxt/content` v3, D1 database) |
| 25 | +- `public/r/` — generated output from `registry:build` (should be gitignored) |
| 26 | + |
| 27 | +## Registry build |
| 28 | + |
| 29 | +`pnpm registry:build` runs `scripts/registry-build.ts`: |
| 30 | +1. `shadcn-vue-registry` generates registry.json from `app/registry/` |
| 31 | +2. `shadcn-vue build` outputs per-item JSON to `public/r/*.json` |
| 32 | +3. Intermediate file `app/registry/registry.json` is auto-deleted |
| 33 | + |
| 34 | +Config: `registry.config.ts` and `components.json` `registries` field. |
| 35 | + |
| 36 | +## Style conventions |
| 37 | + |
| 38 | +- ESLint stylistic: **double quotes**, **semicolons** |
| 39 | +- Tailwind v4 via `@tailwindcss/vite` plugin — no `tailwind.config` file |
| 40 | +- shadcn-vue style: `new-york`, baseColor: `neutral`, CSS variables enabled |
| 41 | +- Icons: `lucide-vue-next` |
| 42 | + |
| 43 | +## Content |
| 44 | + |
| 45 | +- `content.config.ts` defines the docs collection with `category` field: `element | chat | overview` |
| 46 | +- `@nuxt/content` v3 with D1 database (`content.database.type: "d1"`) |
| 47 | +- Markdown highlight disabled; `nuxt-shiki` module handles syntax highlighting instead |
| 48 | + |
| 49 | +## Infrastructure |
| 50 | + |
| 51 | +- **NuxtHub** (`@nuxthub/core`) — Cloudflare D1/SQLite bindings |
| 52 | +- `hub.db: "sqlite"` — uses SQLite for local development |
0 commit comments