Files
crewli/.cursorrules
bert.hausmans 1701e32fdf docs(cursor): update .cursorrules for PrimeVue migration phase
Mirrors CLAUDE.md changes in B3:

- Stack line notes PrimeVue + Tailwind v4 as target, Vuetify as legacy
- New "UI framework strategy (migration-aware)" section forwards to
  PRIMEVUE_COMPONENTS.md with surface-level guidance
- Vuexy reference-path section retained but scoped to legacy surfaces
- Vue 3 section split: Tailwind + pt on migrated, Vuetify-first on
  legacy
- Top blockquote signals this file evolves as F4 progresses

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 22:50:40 +02:00

48 lines
2.3 KiB
Plaintext

# Crewli Cursor Rules
> Migration phase: this file is updated in F2 of RFC-WS-FRONTEND-PRIMEVUE
> and continues to evolve as F4 progresses. Authoritative UI-framework
> reference is `dev-docs/PRIMEVUE_COMPONENTS.md`.
## Stack
PHP 8.2 + Laravel 12 | TypeScript + Vue 3 + PrimeVue + Tailwind v4 (target) / Vuetify (legacy, un-migrated surfaces) | Pinia + TanStack Query
## Laravel
- Resource controllers, form requests, API resources — always
- `HasUlids` on business models, `HasFactory`, `SoftDeletes` where documented
- Global scope `OrganisationScope` on event-related models
- Policies for authorization — never inline role checks
## UI framework strategy (migration-aware)
- Always read `dev-docs/PRIMEVUE_COMPONENTS.md` first — it's the authoritative reference for component selection, theming, forms, and DataTable conventions
- On migrated / new surfaces: PrimeVue + Tailwind v4; forms via `@primevue/forms` + Zod resolver through `<FormField>` (RFC-WS-FRONTEND-PRIMEVUE Appendix A)
- On un-migrated surfaces (during F4): match surrounding Vuetify code; pre-F2 Vuexy reference recoverable via `git show 1c449ff6204cae6371da08c34ea8934d6b2ffcb8:dev-docs/VUEXY_COMPONENTS.md`
- Never mix PrimeVue and Vuetify inside one form or one surface ("no back-porting")
## Vuexy reference path (legacy surfaces only)
- When extending an un-migrated surface, the Vuexy template reference is at:
`resources/vuexy-admin-v10.11.1/vue-version/typescript-version/full-version/`
- Never reference `javascript-version/` or `starter-kit/` variants
## Vue 3
- `<script setup lang="ts">` always
- TanStack Query for API state, Pinia for UI state
- On migrated surfaces: Tailwind utilities for layout, PrimeVue components, `pt` API for component-internal styling
- On legacy surfaces: Vuetify components first; custom CSS only as a last resort
## Naming
- snake_case DB | camelCase JS | PascalCase Vue | `use*` composables | `use*Store` Pinia
## Tests
- PHPUnit feature test per controller, minimum: 200 + 401 + 403
## Formatter
ESLint is the ONLY formatter for TS/Vue/JS files in this repo. Prettier
is intentionally disabled — `pnpm lint:fix` (or save-on-format with
ESLint extension) is the single source of truth for formatting.
Save-on-format requires the `dbaeumer.vscode-eslint` extension to be
installed and the editor's default formatter set to it (configured in
`.vscode/settings.json`).