From b5765221bbbd88d03c7dad048e5ff88cb2c2ab65 Mon Sep 17 00:00:00 2001 From: "bert.hausmans" Date: Sun, 10 May 2026 22:50:10 +0200 Subject: [PATCH] docs(claude): point UI-framework conventions to PRIMEVUE_COMPONENTS.md; document migration-phase guidance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CLAUDE.md updated for the Vuetify→PrimeVue migration phase per RFC-WS-FRONTEND-PRIMEVUE F2: - Stack line: notes PrimeVue + Tailwind v4 as target, Vuetify still present on un-migrated surfaces - Replaced "Vuexy reference source" + "Vuexy-first strategy" sections with a single "UI framework strategy (migration-aware)" section that splits guidance into migrated / un-migrated / new surfaces and forwards to PRIMEVUE_COMPONENTS.md - Forms section now documents both target (@primevue/forms + Zod resolver via FormField) and legacy (ref + VForm + :rules) patterns, with the surface-level-consistency rule - UI section reframed: PrimeVue + Tailwind on migrated surfaces, Vuetify utilities on legacy surfaces, three-state pattern preserved on both - Order of work: framework note added for new pages during F4 Framework-agnostic sections (database, multi-tenancy, ULID, controllers, models, security, testing) untouched. Co-Authored-By: Claude Opus 4.7 (1M context) --- CLAUDE.md | 113 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 62 insertions(+), 51 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 4c68aec1..ea5bf617 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -11,7 +11,7 @@ Design document: `/dev-docs/design-document.md` ## Tech stack - Backend: PHP 8.2+, Laravel 12, Sanctum, Spatie Permission, MySQL 8, Redis -- Frontend: TypeScript, Vue 3 (Composition API), Vuexy/Vuetify, Pinia, TanStack Query +- Frontend: TypeScript, Vue 3 (Composition API), PrimeVue + Tailwind v4 (target state, migration in progress per [RFC-WS-FRONTEND-PRIMEVUE](./dev-docs/RFC-WS-FRONTEND-PRIMEVUE.md)) — Vuetify/Vuexy still present on un-migrated surfaces during F4; see [`PRIMEVUE_COMPONENTS.md`](./dev-docs/PRIMEVUE_COMPONENTS.md). Pinia, TanStack Query. - Testing: PHPUnit (backend), Vitest (frontend) ## Quality gates @@ -166,54 +166,47 @@ right tier per the decision tree there before adding new tests. ## Frontend rules (strict) -### Vuexy reference source (mandatory) +### UI framework strategy (migration-aware) -When referencing Vuexy demo pages, components, or patterns, ALWAYS use the TypeScript Vue version at: +The SPA is migrating Vuetify/Vuexy → PrimeVue + Tailwind v4 per +[RFC-WS-FRONTEND-PRIMEVUE](./dev-docs/RFC-WS-FRONTEND-PRIMEVUE.md). +During F4 (sub-packages F4a–F4d), both frameworks ship in the same build +on different surfaces. The component-selection rules depend on which side +of the migration the surface is on. -``` -resources/vuexy-admin-v10.11.1/vue-version/typescript-version/full-version/ -``` +**Always read [`PRIMEVUE_COMPONENTS.md`](./dev-docs/PRIMEVUE_COMPONENTS.md) +before any frontend task** — it is the authoritative reference for +component selection, theming, forms, and DataTable conventions across +both phases. -This is the **ONLY** valid reference path. Never use: -- `javascript-version/` — wrong language -- `starter-kit/` — incomplete, missing components -- Any other variant or version +#### On migrated surfaces (target state) -Before implementing any Vuexy-based page or component, read the reference implementation from this path first: -```bash -# Example: find auth page references -find resources/vuexy-admin-v10.11.1/vue-version/typescript-version/full-version/src/pages -name "*.vue" | grep -i "login\|auth" -``` +PrimeVue is the framework. Follow [`PRIMEVUE_COMPONENTS.md`](./dev-docs/PRIMEVUE_COMPONENTS.md): -### Vuexy-first strategy +1. **Can a Tailwind utility do this?** (layout, spacing, typography) → use it. +2. **Does PrimeVue provide a component?** → use it (see §3 component mapping). +3. **Forms** → `@primevue/forms` + Zod resolver via `` (§5; full API in [RFC Appendix A](./dev-docs/RFC-WS-FRONTEND-PRIMEVUE.md#appendix-a--formfield-api-specification)). +4. **DataTables** → `` with `:lazy="true"` for server-side (§6). +5. **None of the above?** → cross-reference https://primevue.org/ for the closest match. Add a note in `PRIMEVUE_COMPONENTS.md` §3 if it's a recurring need. -Before writing ANY frontend component, consult `/dev-docs/VUEXY_COMPONENTS.md` and follow this decision tree: +Customization order: Tailwind utilities (layout) → `pt` API (component-internal) → Aura preset extension (brand-wide) → `