From 831c4b467db60a4fb542149b0f7a5c33a5f9e375 Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Wed, 12 Aug 2026 01:19:29 +0900 Subject: [PATCH] docs: Update frontend routing & serving with KBX Foundation v4 operational navigation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace generic frontend structure with registry-driven architecture - Add KBX Contracts (@kbx/contracts) formal screen definitions - Integrate design token system (compact, comfortable, touch density) - Define UI adapter mandatory boundary (PrimeVue/AG Grid) - Document app initialization lifecycle (installKbx.ts) - Add screen component structure (ScreenHeader, QueryStateBoundary, AgGridShell) - Implement permission enforcement (registry-driven RBAC) - Add help system integration (registry context) - Include contract enforcement CI/CD gate - Update state management rules (registry-linked) - Add route registration flow (registry → router build) - Document serving architecture (component contracts) Reference: docs/Design/kbx-foundation-v52-fe-operational-navigation-screen-anatomy AGENTS.md v16.0: Simplicity (registry single source of truth), Necessity (formal contracts), Traceability (registry linking) Co-Authored-By: Claude Haiku 4.5 --- CLAUDE.md | 466 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 429 insertions(+), 37 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index d042e918..ec321501 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -294,58 +294,238 @@ Features// - **Evidence & Audit:** Update/delete are blocked; new state appended as new revision. - **Migrations:** `src/KArtSell.DbMigrator` uses DbUp; file naming: `NNNN_description.sql`. Each module has ordered, checksummed migrations. -### Frontend: Vue 3 + Vite + Modular Feature Structure +### Frontend: Vue 3 + Vite + KBX Foundation v4 (Operational Navigation) -#### Directory Layout +#### Directory Layout (Registry-Driven) ``` frontend/src/ - app/ # Core app initialization, routing, config - features/ # Feature modules (one per business capability) + app/ + router.ts # Vue Router setup (page-level only) + installKbx.ts # KBX system initialization (registry, contracts, permissions) + features/ / - components/ # Scoped to this feature - pages/ # Route-level pages - stores/ # Pinia stores (state management) - composables/ # Reusable logic (Vue 3 hooks) - types/ # TS interfaces for this feature + routes.ts # Feature route definitions (lazy-loaded) + registry.ts # Screen registry entry (@kbx/contracts.ScreenDefinition) + pages/ + .vue # Page component (matches registry.screenId) + components/ # Feature-scoped components (not shared) + stores/ # Pinia stores (feature state) + composables/ # Reusable hooks (feature logic) + types/ # TS interfaces for this feature shared/ ui/ - adapter/ # PrimeVue/AG Grid wrappers (mandatory boundary) - components/ # Common components (QueryStateBoundary, PermissionGuard, CrudForm, etc.) - layouts/ # Page layout templates - crud/ # Generic CRUD form logic - composables/ # Global composables (useFetch, useAuth, etc.) - types/ # Global types, contracts - stores/ # Global Pinia stores (auth, user, preferences) - design-system/ # Design tokens, typography, color scales (PrimeVue theme overrides) + adapter/ # MANDATORY boundary: PrimeVue/AG Grid wrappers + PrimeVueAdapter.ts #