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>
This commit is contained in:
19
.cursorrules
19
.cursorrules
@@ -1,7 +1,11 @@
|
|||||||
# Crewli Cursor Rules
|
# 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
|
## Stack
|
||||||
PHP 8.2 + Laravel 12 | TypeScript + Vue 3 + Vuexy/Vuetify | Pinia + TanStack Query
|
PHP 8.2 + Laravel 12 | TypeScript + Vue 3 + PrimeVue + Tailwind v4 (target) / Vuetify (legacy, un-migrated surfaces) | Pinia + TanStack Query
|
||||||
|
|
||||||
## Laravel
|
## Laravel
|
||||||
- Resource controllers, form requests, API resources — always
|
- Resource controllers, form requests, API resources — always
|
||||||
@@ -9,15 +13,22 @@ PHP 8.2 + Laravel 12 | TypeScript + Vue 3 + Vuexy/Vuetify | Pinia + TanStack Que
|
|||||||
- Global scope `OrganisationScope` on event-related models
|
- Global scope `OrganisationScope` on event-related models
|
||||||
- Policies for authorization — never inline role checks
|
- Policies for authorization — never inline role checks
|
||||||
|
|
||||||
## Vuexy reference path (mandatory)
|
## UI framework strategy (migration-aware)
|
||||||
- When looking at Vuexy examples, demos, or patterns, ALWAYS reference:
|
- 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/`
|
`resources/vuexy-admin-v10.11.1/vue-version/typescript-version/full-version/`
|
||||||
- Never reference `javascript-version/` or `starter-kit/` variants
|
- Never reference `javascript-version/` or `starter-kit/` variants
|
||||||
|
|
||||||
## Vue 3
|
## Vue 3
|
||||||
- `<script setup lang="ts">` always
|
- `<script setup lang="ts">` always
|
||||||
- TanStack Query for API state, Pinia for UI state
|
- TanStack Query for API state, Pinia for UI state
|
||||||
- Vuetify components first; custom CSS only as a last resort
|
- 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
|
## Naming
|
||||||
- snake_case DB | camelCase JS | PascalCase Vue | `use*` composables | `use*Store` Pinia
|
- snake_case DB | camelCase JS | PascalCase Vue | `use*` composables | `use*Store` Pinia
|
||||||
|
|||||||
Reference in New Issue
Block a user