|
| 1 | +# Repository Guidelines |
| 2 | + |
| 3 | +## Project Structure & Module Organization |
| 4 | +- Core application lives under `pages/`, with supporting UI atoms in `components/`. |
| 5 | +- Shared state and utilities are in `store/`, `composables/`, and `lib/`. |
| 6 | +- Configuration lives in `app.config.ts`, `nuxt.config.ts`, and `config/`. |
| 7 | +- Tests belong in `tests/`, and static assets in `public/` or `assets/`. |
| 8 | + |
| 9 | +## Build, Test, and Development Commands |
| 10 | +- `pnpm dev` – start the Nuxt development server with hot reload. |
| 11 | +- `pnpm build` – create a production build. |
| 12 | +- `pnpm preview` – run the production bundle locally. |
| 13 | +- `pnpm test:run` – execute the Vitest suite once. |
| 14 | +- `pnpm vue-tsc --noEmit` – perform a strict type check. |
| 15 | +- `pnpm lint` – run `vue-tsc` and Prettier (format check only). |
| 16 | + |
| 17 | +## Coding Style & Naming Conventions |
| 18 | +- Use Prettier defaults (see `.prettierrc.ts`); run `pnpm lint` or `pnpm lint:fix`. |
| 19 | +- Vue files use `<script setup>` with TypeScript; prefer composables for shared logic. |
| 20 | +- Component files use **kebab-case** (e.g. `bucket-selector.vue`), but reference them using **StudlyCase** in templates (e.g. `<BucketSelector />`). |
| 21 | +- Override shadcn primitives **outside** `components/ui/`; never edit files in that directory directly. |
| 22 | +- Render tabular data with the shared `DataTable` + `useDataTable` utilities unless a specific requirement makes them unsuitable. |
| 23 | +- Language pack files should exclude test directories when processing translation keys. |
| 24 | + |
| 25 | +## Testing Guidelines |
| 26 | +- Vitest is the primary framework; add new suites under `tests/`. |
| 27 | +- Name files `*.spec.ts` or `*.test.ts` and mirror source structure. |
| 28 | +- Keep tests deterministic; mock network calls through provided composables. |
| 29 | +- Run `pnpm test:run` before submitting major changes. |
| 30 | + |
| 31 | +## Commit & Pull Request Guidelines |
| 32 | +- Follow conventional, action-oriented commit subjects (e.g. `feat: add bucket selector`). |
| 33 | +- Each pull request should include: a concise summary, linked issue or task, screenshots for UI work, and testing notes (`pnpm test:run`, `pnpm vue-tsc`, etc.). |
| 34 | +- Keep PRs scoped; large refactors should be coordinated in advance. |
| 35 | + |
| 36 | +## UI Theme Overrides |
| 37 | +- Apply visual tweaks (e.g., removing shadows, altering colors) at usage sites via classes such as `class="shadow-none"`. |
| 38 | +- When extending shadcn components, create wrapper utilities (e.g., `BucketSelector.vue`) instead of forking primitives. |
0 commit comments