cabloy 5.1.60 → 5.1.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/hooks/contract-loop-gate.ts +296 -0
- package/.claude/settings.json +16 -0
- package/.claude/skills/cabloy-backend-scaffold/SKILL.md +2 -0
- package/.claude/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +1 -0
- package/.claude/skills/cabloy-contract-loop/SKILL.md +89 -16
- package/.claude/skills/cabloy-contract-loop/references/contract-loop-map.md +102 -14
- package/.claude/skills/cabloy-contract-loop/references/resource-custom-state-pattern.md +4 -0
- package/.claude/skills/cabloy-contract-loop/references/verification-checklist.md +32 -14
- package/.claude/skills/cabloy-domain-planning/SKILL.md +212 -0
- package/.claude/skills/cabloy-frontend-scaffold/SKILL.md +13 -0
- package/.claude/skills/cabloy-frontend-scaffold/references/follow-up-checklist.md +2 -0
- package/.claude/skills/cabloy-module-removal/SKILL.md +144 -0
- package/.claude/skills/cabloy-resource-field-update/SKILL.md +7 -0
- package/.claude/skills/cabloy-zova-source-reading/SKILL.md +221 -0
- package/.claude/skills/cabloy-zova-source-reading/references/analysis-modes.md +91 -0
- package/.claude/skills/cabloy-zova-source-reading/references/core-reading-paths.md +117 -0
- package/CHANGELOG.md +64 -0
- package/CLAUDE.md +11 -0
- package/cabloy-docs/.vitepress/config.mjs +197 -5
- package/cabloy-docs/ai/cli-to-skill-map.md +7 -0
- package/cabloy-docs/ai/docs-skills-rules-mapping.md +22 -0
- package/cabloy-docs/ai/future-skill-roadmap.md +12 -7
- package/cabloy-docs/ai/introduction.md +1 -0
- package/cabloy-docs/ai/playbook-backend-module.md +6 -0
- package/cabloy-docs/ai/playbook-module-removal.md +164 -0
- package/cabloy-docs/ai/skills.md +12 -0
- package/cabloy-docs/backend/backend-contract-emission-output-inspection.md +189 -0
- package/cabloy-docs/backend/backend-contract-emission-source-reading-map.md +160 -0
- package/cabloy-docs/backend/backend-contract-emission-specimen.md +170 -0
- package/cabloy-docs/backend/backend-resource-module-contract-chain.md +323 -0
- package/cabloy-docs/backend/backend-source-reading-debug-checklist.md +173 -0
- package/cabloy-docs/backend/backend-source-reading-roadmap.md +129 -0
- package/cabloy-docs/backend/backend-source-reading-verify-playbook.md +166 -0
- package/cabloy-docs/backend/bean-scene-authoring.md +4 -4
- package/cabloy-docs/backend/broadcast-guide.md +3 -3
- package/cabloy-docs/backend/cli.md +20 -11
- package/cabloy-docs/backend/config-guide.md +4 -4
- package/cabloy-docs/backend/controller-aop-guide.md +10 -10
- package/cabloy-docs/backend/controller-guide.md +12 -2
- package/cabloy-docs/backend/crud-workflow.md +7 -3
- package/cabloy-docs/backend/dto-guide.md +18 -2
- package/cabloy-docs/backend/dto-infer-generation.md +201 -25
- package/cabloy-docs/backend/election-guide.md +2 -2
- package/cabloy-docs/backend/entity-guide.md +30 -3
- package/cabloy-docs/backend/error-guide.md +3 -3
- package/cabloy-docs/backend/event-guide.md +4 -4
- package/cabloy-docs/backend/external-aop-guide.md +2 -2
- package/cabloy-docs/backend/field-indexes.md +9 -3
- package/cabloy-docs/backend/foundation.md +8 -8
- package/cabloy-docs/backend/i18n-guide.md +6 -6
- package/cabloy-docs/backend/internal-aop-guide.md +2 -2
- package/cabloy-docs/backend/introduction.md +15 -0
- package/cabloy-docs/backend/migration-and-changes.md +3 -3
- package/cabloy-docs/backend/model-guide.md +16 -6
- package/cabloy-docs/backend/openapi-guide.md +3 -0
- package/cabloy-docs/backend/queue-guide.md +3 -3
- package/cabloy-docs/backend/redlock-guide.md +2 -2
- package/cabloy-docs/backend/schedule-guide.md +2 -2
- package/cabloy-docs/backend/scripts.md +8 -0
- package/cabloy-docs/backend/serialization-guide.md +12 -2
- package/cabloy-docs/backend/service-guide.md +18 -9
- package/cabloy-docs/backend/startup-guide.md +5 -5
- package/cabloy-docs/backend/status-guide.md +271 -0
- package/cabloy-docs/backend/unit-testing.md +3 -3
- package/cabloy-docs/backend/vona-source-reading-map.md +157 -0
- package/cabloy-docs/backend/websocket-protocol-guide.md +5 -5
- package/cabloy-docs/backend/websocket-usage-guide.md +15 -8
- package/cabloy-docs/frontend/a-model-under-the-hood.md +281 -0
- package/cabloy-docs/frontend/a-openapi-under-the-hood.md +248 -0
- package/cabloy-docs/frontend/a-router-guide.md +307 -0
- package/cabloy-docs/frontend/api-guide.md +6 -4
- package/cabloy-docs/frontend/api-schema-guide.md +1 -0
- package/cabloy-docs/frontend/app-startup-guide.md +7 -4
- package/cabloy-docs/frontend/bean-scene-authoring.md +3 -1
- package/cabloy-docs/frontend/behavior-guide.md +16 -16
- package/cabloy-docs/frontend/cli.md +14 -2
- package/cabloy-docs/frontend/command-scene-authoring.md +504 -0
- package/cabloy-docs/frontend/component-guide.md +5 -5
- package/cabloy-docs/frontend/component-props-guide.md +1 -1
- package/cabloy-docs/frontend/component-v-model-guide.md +2 -2
- package/cabloy-docs/frontend/design-principles.md +6 -0
- package/cabloy-docs/frontend/fetch-interceptor-guide.md +440 -0
- package/cabloy-docs/frontend/filter-query-select-data-flow-guide.md +260 -0
- package/cabloy-docs/frontend/form-guide.md +786 -0
- package/cabloy-docs/frontend/form-scene-to-page-meta-guide.md +303 -0
- package/cabloy-docs/frontend/foundation.md +33 -0
- package/cabloy-docs/frontend/frontend-source-reading-roadmap.md +249 -0
- package/cabloy-docs/frontend/generated-contract-consumption-debug-checklist.md +190 -0
- package/cabloy-docs/frontend/generated-contract-consumption-entry-branch.md +205 -0
- package/cabloy-docs/frontend/generated-contract-consumption-list-branch.md +157 -0
- package/cabloy-docs/frontend/generated-contract-consumption-specimen.md +203 -0
- package/cabloy-docs/frontend/generated-contract-consumption-verify-playbook.md +189 -0
- package/cabloy-docs/frontend/generic-component-guide.md +1 -1
- package/cabloy-docs/frontend/introduction.md +38 -5
- package/cabloy-docs/frontend/ioc-and-beans.md +6 -0
- package/cabloy-docs/frontend/mock-guide.md +1 -0
- package/cabloy-docs/frontend/model-architecture.md +288 -39
- package/cabloy-docs/frontend/model-resource-best-practices.md +379 -0
- package/cabloy-docs/frontend/model-resource-cookbook.md +508 -0
- package/cabloy-docs/frontend/model-resource-internals-deep-dive.md +238 -0
- package/cabloy-docs/frontend/model-resource-owner-pattern.md +402 -0
- package/cabloy-docs/frontend/model-resource-usage-guide.md +334 -0
- package/cabloy-docs/frontend/model-state-guide.md +371 -15
- package/cabloy-docs/frontend/module-scope.md +8 -8
- package/cabloy-docs/frontend/modules-and-suites.md +2 -1
- package/cabloy-docs/frontend/navigation-guards-guide.md +7 -0
- package/cabloy-docs/frontend/openapi-sdk-guide.md +17 -6
- package/cabloy-docs/frontend/page-guide.md +15 -9
- package/cabloy-docs/frontend/page-meta-guide.md +466 -0
- package/cabloy-docs/frontend/page-params-guide.md +3 -3
- package/cabloy-docs/frontend/page-query-guide.md +2 -2
- package/cabloy-docs/frontend/page-route-guide.md +6 -0
- package/cabloy-docs/frontend/permission-formscene-action-visibility-guide.md +263 -0
- package/cabloy-docs/frontend/quickstart.md +18 -2
- package/cabloy-docs/frontend/reading-zova-for-vue-developers.md +266 -0
- package/cabloy-docs/frontend/resource-entry-page-deep-dive.md +271 -0
- package/cabloy-docs/frontend/resource-list-page-deep-dive.md +279 -0
- package/cabloy-docs/frontend/rest-resource-source-reading-map.md +522 -0
- package/cabloy-docs/frontend/rest-resource-under-the-hood.md +622 -0
- package/cabloy-docs/frontend/root-behaviors-guide.md +282 -0
- package/cabloy-docs/frontend/route-alias-guide.md +6 -0
- package/cabloy-docs/frontend/router-stack-guide.md +229 -0
- package/cabloy-docs/frontend/router-tabs-introduction.md +26 -3
- package/cabloy-docs/frontend/router-tabs-layout-integration.md +367 -0
- package/cabloy-docs/frontend/router-tabs-mechanism.md +6 -0
- package/cabloy-docs/frontend/router-tabs-route-meta-cookbook.md +7 -0
- package/cabloy-docs/frontend/router-tabs-vs-stack.md +167 -0
- package/cabloy-docs/frontend/router-view-hosts-guide.md +450 -0
- package/cabloy-docs/frontend/server-data.md +4 -1
- package/cabloy-docs/frontend/system-startup-guide.md +2 -2
- package/cabloy-docs/frontend/table-action-visibility-permission-flow-guide.md +263 -0
- package/cabloy-docs/frontend/table-cell-cookbook.md +568 -0
- package/cabloy-docs/frontend/table-guide.md +373 -0
- package/cabloy-docs/frontend/table-resource-crud-cookbook.md +496 -0
- package/cabloy-docs/frontend/zova-app-guide.md +251 -0
- package/cabloy-docs/frontend/zova-form-source-reading-map.md +293 -0
- package/cabloy-docs/frontend/zova-form-under-the-hood.md +561 -0
- package/cabloy-docs/frontend/zova-reactivity-under-the-hood.md +320 -0
- package/cabloy-docs/frontend/zova-router-under-the-hood.md +561 -0
- package/cabloy-docs/frontend/zova-source-reading-map.md +421 -0
- package/cabloy-docs/frontend/zova-table-controller-render-supplement.md +225 -0
- package/cabloy-docs/frontend/zova-table-source-reading-map.md +317 -0
- package/cabloy-docs/frontend/zova-table-under-the-hood.md +532 -0
- package/cabloy-docs/frontend/zova-vs-vue3-comparison.md +308 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-debug-checklist.md +245 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-source-reading-map.md +139 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-verify-playbook.md +248 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions.md +511 -0
- package/cabloy-docs/fullstack/contract-loop-playbook.md +356 -0
- package/cabloy-docs/fullstack/edition-collaboration-differences.md +6 -0
- package/cabloy-docs/fullstack/frontend-metadata-to-backend.md +199 -23
- package/cabloy-docs/fullstack/introduction.md +15 -1
- package/cabloy-docs/fullstack/openapi-to-sdk.md +135 -11
- package/cabloy-docs/fullstack/suites-and-modules.md +333 -0
- package/cabloy-docs/fullstack/tutorial-1-first-module.md +3 -0
- package/cabloy-docs/fullstack/tutorial-2-first-crud.md +4 -0
- package/cabloy-docs/fullstack/tutorial-3-frontend-metadata-sharing.md +6 -2
- package/cabloy-docs/fullstack/tutorial-4-custom-level-renderers.md +60 -23
- package/cabloy-docs/fullstack/tutorial-5-backend-contract-sharing.md +14 -7
- package/cabloy-docs/fullstack/tutorial-6-one-contract-four-uses.md +6 -0
- package/cabloy-docs/fullstack/tutorials-overview.md +17 -4
- package/cabloy-docs/reference/bean-scene-boilerplates.md +15 -13
- package/cabloy-docs/reference/package-map.md +4 -3
- package/package.json +2 -1
- package/scripts/init.ts +2 -18
- package/scripts/initTestData.ts +25 -0
- package/scripts/upgrade.ts +17 -2
- package/vona/pnpm-lock.yaml +48 -194
- package/vona/src/suite/a-training/modules/training-student/package.json +53 -0
- package/vona/src/suite/a-training/modules/training-student/src/.metadata/index.ts +400 -0
- package/vona/src/suite/a-training/modules/training-student/src/.metadata/locales.ts +18 -0
- package/vona/src/suite/a-training/modules/training-student/src/.metadata/this.ts +2 -0
- package/vona/src/suite/a-training/modules/training-student/src/bean/meta.index.ts +12 -0
- package/vona/src/suite/a-training/modules/training-student/src/bean/meta.version.ts +21 -0
- package/vona/src/suite/a-training/modules/training-student/src/bean/ssrMenu.student.ts +29 -0
- package/vona/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +15 -0
- package/vona/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +15 -0
- package/vona/src/suite/a-training/modules/training-student/src/controller/student.ts +74 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentCreate.tsx +28 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectReq.tsx +44 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectRes.tsx +11 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectResItem.tsx +45 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSummary.tsx +42 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentUpdate.tsx +28 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentView.tsx +25 -0
- package/vona/src/suite/a-training/modules/training-student/src/entity/student.tsx +84 -0
- package/vona/src/suite/a-training/modules/training-student/src/index.ts +2 -0
- package/vona/src/suite/a-training/modules/training-student/src/model/student.ts +10 -0
- package/vona/src/suite/a-training/modules/training-student/src/service/student.ts +57 -0
- package/vona/src/suite/a-training/modules/training-student/test/student.test.ts +173 -0
- package/vona/src/suite/a-training/modules/training-student/tsconfig.build.json +11 -0
- package/vona/src/suite/a-training/modules/training-student/tsconfig.json +7 -0
- package/vona/src/suite/a-training/package.json +12 -0
- package/vona/src/suite/a-training/tsconfig.base.json +4 -0
- package/vona/src/suite/a-training/tsconfig.json +10 -0
- package/zova/packages-cli/cli/package.json +2 -2
- package/zova/packages-cli/cli-set-front/cli/templates/openapi/config/boilerplate/module/openapi.config.ts +6 -1
- package/zova/packages-cli/cli-set-front/package.json +1 -1
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.openapi.generate.ts +34 -4
- package/zova/packages-zova/zova/package.json +2 -2
- package/zova/pnpm-lock.yaml +416 -690
- package/zova/src/suite/a-training/modules/training-student/cli/openapi.config.ts +9 -0
- package/zova/src/suite/a-training/modules/training-student/package.json +52 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/component/formFieldLevel.ts +31 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/index.ts +258 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/locales.ts +7 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/this.ts +2 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/baseURL.ts +5 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/index.ts +3 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/schemas.ts +196 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/types.ts +4146 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/trainingStudent.ts +151 -0
- package/zova/src/suite/a-training/modules/training-student/src/apiSchema/trainingStudent.ts +43 -0
- package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionDeleteForce.tsx +51 -0
- package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionSummary.tsx +56 -0
- package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.level.tsx +63 -0
- package/zova/src/suite/a-training/modules/training-student/src/component/formFieldLevel/controller.tsx +117 -0
- package/zova/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +9 -0
- package/zova/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +9 -0
- package/zova/src/suite/a-training/modules/training-student/src/index.ts +2 -0
- package/zova/src/suite/a-training/modules/training-student/src/model/student.ts +42 -0
- package/zova/src/suite/a-training/modules/training-student/tsconfig.build.json +13 -0
- package/zova/src/suite/a-training/modules/training-student/tsconfig.json +5 -0
- package/zova/src/suite/a-training/package.json +12 -0
- package/zova/src/suite/a-training/tsconfig.base.json +4 -0
- package/zova/src/suite/a-training/tsconfig.json +4 -0
- package/zova/src/suite/cabloy-basic/modules/basic-select/src/component/formFieldSelect/controller.tsx +29 -7
- package/zova/src/suite/cabloy-basic/modules/basic-select/src/component/select/controller.tsx +34 -11
- package/zova/src/suite-vendor/a-zova/modules/a-table/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-table/src/component/table/controller.tsx +3 -3
- package/zova/src/suite-vendor/a-zova/modules/a-table/src/lib/tableCell.ts +1 -1
- package/zova/src/suite-vendor/a-zova/package.json +2 -2
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
# Contract Loop Playbook
|
|
2
|
+
|
|
3
|
+
This page is the canonical playbook for Cabloy’s bidirectional fullstack contract loop.
|
|
4
|
+
|
|
5
|
+
Use it when you need to decide:
|
|
6
|
+
|
|
7
|
+
- where source truth lives for a change
|
|
8
|
+
- which generated handoff should be refreshed
|
|
9
|
+
- which side is actually stale
|
|
10
|
+
- whether the problem is source drift, generated-output drift, consumer drift, or local dependency drift
|
|
11
|
+
|
|
12
|
+
## Why this playbook exists
|
|
13
|
+
|
|
14
|
+
Cabloy’s fullstack collaboration is not only backend-to-frontend.
|
|
15
|
+
|
|
16
|
+
The same monorepo supports two symmetric chains:
|
|
17
|
+
|
|
18
|
+
- **forward chain** — backend contract emission and frontend consumption
|
|
19
|
+
- **reverse chain** — frontend metadata or resource handoff and backend consumption
|
|
20
|
+
|
|
21
|
+
The core model applies to both **Cabloy Basic** and **Cabloy Start**.
|
|
22
|
+
|
|
23
|
+
What changes by edition is not the model itself, but the operational branch:
|
|
24
|
+
|
|
25
|
+
- flavor names
|
|
26
|
+
- UI-resource examples
|
|
27
|
+
- generated-output paths
|
|
28
|
+
- build commands
|
|
29
|
+
|
|
30
|
+
So the first question is always:
|
|
31
|
+
|
|
32
|
+
1. which chain am I in?
|
|
33
|
+
2. which edition is active?
|
|
34
|
+
|
|
35
|
+
## Shared vocabulary
|
|
36
|
+
|
|
37
|
+
Use these terms consistently:
|
|
38
|
+
|
|
39
|
+
- **contract loop** — the full bidirectional Vona↔Zova collaboration model
|
|
40
|
+
- **forward chain** — backend contract truth flows into generated frontend consumers
|
|
41
|
+
- **reverse chain** — frontend-owned metadata or resources flow into backend consumers
|
|
42
|
+
- **contract source** — the authored layer that currently owns truth
|
|
43
|
+
- **generated handoff** — the generated output that carries truth to the other side
|
|
44
|
+
- **consumer drift** — downstream consumers no longer match current truth
|
|
45
|
+
- **local dependency drift** — generated artifacts are already correct, but installed local file dependencies are still stale
|
|
46
|
+
|
|
47
|
+
## The two chains
|
|
48
|
+
|
|
49
|
+
### Forward chain
|
|
50
|
+
|
|
51
|
+
Use the forward chain when backend-authored contract surfaces changed.
|
|
52
|
+
|
|
53
|
+
Typical contract sources:
|
|
54
|
+
|
|
55
|
+
- controller request or response signatures
|
|
56
|
+
- DTOs
|
|
57
|
+
- entity field metadata
|
|
58
|
+
- validation rules
|
|
59
|
+
- OpenAPI metadata
|
|
60
|
+
|
|
61
|
+
Typical handoff:
|
|
62
|
+
|
|
63
|
+
- Swagger or OpenAPI output
|
|
64
|
+
- generated Zova SDK or schema-aware helpers
|
|
65
|
+
- flavor-built REST output when the workflow depends on it
|
|
66
|
+
|
|
67
|
+
Typical consumers:
|
|
68
|
+
|
|
69
|
+
- generated frontend API files
|
|
70
|
+
- thin frontend model facades
|
|
71
|
+
- schema-driven UI
|
|
72
|
+
- custom row or page actions
|
|
73
|
+
|
|
74
|
+
If your issue becomes one mixed Student row-action chain rather than a pure direction question, first continue with [Backend Metadata to Frontend Table Actions](/fullstack/backend-metadata-to-frontend-table-actions), then [Backend Metadata to Frontend Table Actions Source Reading Map](/fullstack/backend-metadata-to-frontend-table-actions-source-reading-map).
|
|
75
|
+
|
|
76
|
+
If the family root and source-reading map already match your case and the visible result is still wrong, continue with [Backend Metadata to Frontend Table Actions Debug Checklist](/fullstack/backend-metadata-to-frontend-table-actions-debug-checklist).
|
|
77
|
+
|
|
78
|
+
If you have already changed that mixed chain and now want to prove it layer by layer rather than diagnose a failure, continue with [Backend Metadata to Frontend Table Actions Verify Playbook](/fullstack/backend-metadata-to-frontend-table-actions-verify-playbook).
|
|
79
|
+
|
|
80
|
+
### Reverse chain
|
|
81
|
+
|
|
82
|
+
Use the reverse chain when frontend-owned metadata or resources changed and backend-side tooling or metadata will consume them.
|
|
83
|
+
|
|
84
|
+
Typical contract sources:
|
|
85
|
+
|
|
86
|
+
- frontend routes
|
|
87
|
+
- frontend components
|
|
88
|
+
- frontend icons
|
|
89
|
+
- custom form-field or table-cell resources
|
|
90
|
+
- module metadata consumed by backend `ZovaRender.*(...)` references
|
|
91
|
+
|
|
92
|
+
Typical handoff:
|
|
93
|
+
|
|
94
|
+
- generated metadata
|
|
95
|
+
- flavor build output
|
|
96
|
+
- local file dependency sync into Vona
|
|
97
|
+
|
|
98
|
+
Typical consumers:
|
|
99
|
+
|
|
100
|
+
- backend metadata that references frontend resources
|
|
101
|
+
- backend-side tooling and type hints
|
|
102
|
+
- SSR or integration paths that depend on refreshed frontend output
|
|
103
|
+
|
|
104
|
+
## Decision tree
|
|
105
|
+
|
|
106
|
+
Use this decision tree before editing or regenerating anything.
|
|
107
|
+
|
|
108
|
+
### 1. Did backend contract truth change?
|
|
109
|
+
|
|
110
|
+
Examples:
|
|
111
|
+
|
|
112
|
+
- DTO shape changed
|
|
113
|
+
- controller request or response changed
|
|
114
|
+
- validation changed
|
|
115
|
+
- OpenAPI metadata changed
|
|
116
|
+
|
|
117
|
+
Then use the **forward chain**:
|
|
118
|
+
|
|
119
|
+
1. change backend truth first
|
|
120
|
+
2. prove emitted contract output is correct
|
|
121
|
+
3. regenerate frontend consumers
|
|
122
|
+
4. keep frontend follow-up thin
|
|
123
|
+
5. verify consumer alignment
|
|
124
|
+
|
|
125
|
+
See [Backend OpenAPI to Frontend SDK](/fullstack/openapi-to-sdk) for the end-to-end forward-chain bridge from backend-authored contract truth to generated frontend consumers.
|
|
126
|
+
|
|
127
|
+
### 2. Did frontend-owned metadata or resource truth change?
|
|
128
|
+
|
|
129
|
+
Examples:
|
|
130
|
+
|
|
131
|
+
- a custom table cell was added
|
|
132
|
+
- a custom form field was added
|
|
133
|
+
- routes, components, or icons changed
|
|
134
|
+
- backend metadata now references new frontend resources
|
|
135
|
+
|
|
136
|
+
Then use the **reverse chain**:
|
|
137
|
+
|
|
138
|
+
1. change frontend source truth
|
|
139
|
+
2. regenerate metadata when applicable
|
|
140
|
+
3. build the relevant frontend flavor output
|
|
141
|
+
4. run `npm run deps:vona`
|
|
142
|
+
5. verify backend consumers can see the refreshed handoff
|
|
143
|
+
|
|
144
|
+
See [Frontend Metadata Back to Backend](/fullstack/frontend-metadata-to-backend) for the end-to-end reverse-chain bridge from frontend-owned truth to backend-visible shared handoff.
|
|
145
|
+
|
|
146
|
+
### 3. Do generated artifacts look stale?
|
|
147
|
+
|
|
148
|
+
Examples:
|
|
149
|
+
|
|
150
|
+
- generated SDK still reflects an old endpoint shape
|
|
151
|
+
- generated metadata is missing a new resource
|
|
152
|
+
- rest output did not pick up the latest source change
|
|
153
|
+
|
|
154
|
+
Then diagnose **generated-output drift**:
|
|
155
|
+
|
|
156
|
+
1. confirm the source layer was changed in the right place
|
|
157
|
+
2. confirm the correct generation path was used
|
|
158
|
+
3. regenerate instead of hand-patching
|
|
159
|
+
4. verify the generated output itself before debugging downstream code
|
|
160
|
+
|
|
161
|
+
### 4. Do generated artifacts already look correct, but consumers still behave stale?
|
|
162
|
+
|
|
163
|
+
Examples:
|
|
164
|
+
|
|
165
|
+
- generated `.zova-rest` output already contains the new keys or types
|
|
166
|
+
- generated SDK already contains the new method
|
|
167
|
+
- backend or frontend still behaves as if old local file packages are installed
|
|
168
|
+
|
|
169
|
+
Then suspect **local dependency drift**:
|
|
170
|
+
|
|
171
|
+
1. stop editing source files
|
|
172
|
+
2. prove the generated handoff is already correct
|
|
173
|
+
3. rerun the normal sync flow
|
|
174
|
+
4. only then repair the local install state if consumers still look stale
|
|
175
|
+
|
|
176
|
+
## Forward chain playbook
|
|
177
|
+
|
|
178
|
+
### Stage 1: Backend contract source
|
|
179
|
+
|
|
180
|
+
Author the truth in Vona first.
|
|
181
|
+
|
|
182
|
+
Typical layers:
|
|
183
|
+
|
|
184
|
+
- controllers
|
|
185
|
+
- DTOs
|
|
186
|
+
- entities
|
|
187
|
+
- validation helpers
|
|
188
|
+
- OpenAPI annotations
|
|
189
|
+
|
|
190
|
+
Rule:
|
|
191
|
+
|
|
192
|
+
- do **not** patch generated frontend consumers first when the backend owns truth
|
|
193
|
+
|
|
194
|
+
### Stage 2: Emitted contract proof
|
|
195
|
+
|
|
196
|
+
Before regeneration, verify the backend output is actually correct.
|
|
197
|
+
|
|
198
|
+
Typical checks:
|
|
199
|
+
|
|
200
|
+
- controller contract matches intent
|
|
201
|
+
- DTO and validation align
|
|
202
|
+
- OpenAPI output reflects the intended shape
|
|
203
|
+
|
|
204
|
+
If the emitted contract is wrong, regeneration will only spread the mistake.
|
|
205
|
+
|
|
206
|
+
### Stage 3: Module ownership and generation
|
|
207
|
+
|
|
208
|
+
Regenerate the frontend consumer path deliberately.
|
|
209
|
+
|
|
210
|
+
Typical commands include:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
npm run zova :openapi:config <module-name>
|
|
214
|
+
npm run zova :openapi:generate <module-name>
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
When the target is a module-local SDK, keep ownership constrained with `operations.match` so the module only generates the API surface it actually owns.
|
|
218
|
+
|
|
219
|
+
### Stage 4: Thin frontend follow-up
|
|
220
|
+
|
|
221
|
+
After regeneration, keep frontend follow-up thin.
|
|
222
|
+
|
|
223
|
+
That means:
|
|
224
|
+
|
|
225
|
+
- prefer generated contract consumers over hand-written duplicates
|
|
226
|
+
- use **thin model facades** as semantic wrappers over generated APIs
|
|
227
|
+
- **reuse the existing resource-owner** when the custom API still belongs to an existing resource
|
|
228
|
+
|
|
229
|
+
For resource-bound custom endpoints, prefer `rest-resource.model.resource` as the state owner. A module-local model may still exist, but it should remain a semantic facade instead of becoming a second cache owner.
|
|
230
|
+
|
|
231
|
+
See the downstream pattern in `.claude/skills/cabloy-contract-loop/references/resource-custom-state-pattern.md`.
|
|
232
|
+
|
|
233
|
+
### Stage 5: Consumer verification
|
|
234
|
+
|
|
235
|
+
Verify that generated output and frontend consumers agree.
|
|
236
|
+
|
|
237
|
+
Typical checks:
|
|
238
|
+
|
|
239
|
+
- generated API contains the intended methods
|
|
240
|
+
- model or schema consumers still typecheck
|
|
241
|
+
- UI behavior now matches the regenerated contract
|
|
242
|
+
|
|
243
|
+
## Reverse chain playbook
|
|
244
|
+
|
|
245
|
+
### Stage 1: Frontend-owned source truth
|
|
246
|
+
|
|
247
|
+
Start from the frontend resource or metadata that actually changed.
|
|
248
|
+
|
|
249
|
+
Typical layers:
|
|
250
|
+
|
|
251
|
+
- bean resources
|
|
252
|
+
- components
|
|
253
|
+
- metadata wrappers
|
|
254
|
+
- routes
|
|
255
|
+
- icons
|
|
256
|
+
|
|
257
|
+
Rule:
|
|
258
|
+
|
|
259
|
+
- do **not** treat a frontend-owned resource handoff as frontend-only cleanup if backend consumers depend on it
|
|
260
|
+
|
|
261
|
+
### Stage 2: Generated handoff
|
|
262
|
+
|
|
263
|
+
Refresh the generated metadata or build output that carries the change across the boundary.
|
|
264
|
+
|
|
265
|
+
Typical commands may include:
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
npm run zova :tools:metadata <module-name>
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
and then the relevant build path for the active edition and flavor.
|
|
272
|
+
|
|
273
|
+
### Stage 3: Vona sync handoff
|
|
274
|
+
|
|
275
|
+
After the frontend-generated handoff is ready, re-sync Vona’s local file dependencies.
|
|
276
|
+
|
|
277
|
+
For the current **Cabloy Basic Admin** branch, the representative sequence is:
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
npm run build:zova:admin
|
|
281
|
+
npm run deps:vona
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
If the same resource path must also be available to Web, also refresh the Web branch.
|
|
285
|
+
|
|
286
|
+
For **Cabloy Start**, use the same reverse-chain logic, but resolve the Start-specific flavor names and output paths from the active Start repo before recommending commands.
|
|
287
|
+
|
|
288
|
+
### Stage 4: Consumer verification
|
|
289
|
+
|
|
290
|
+
Verify that backend consumers can now resolve the refreshed frontend-generated handoff.
|
|
291
|
+
|
|
292
|
+
Typical checks:
|
|
293
|
+
|
|
294
|
+
- backend metadata resolves the new frontend resource names
|
|
295
|
+
- generated shared types now appear in backend-side consumers
|
|
296
|
+
- SSR or integration behavior sees the refreshed output
|
|
297
|
+
|
|
298
|
+
## Recovery path for local dependency drift
|
|
299
|
+
|
|
300
|
+
Use this branch only when all of these are already true:
|
|
301
|
+
|
|
302
|
+
- source truth was edited in the right place
|
|
303
|
+
- generation or build output already contains the intended change
|
|
304
|
+
- the normal sync flow already ran
|
|
305
|
+
- consumers still behave stale
|
|
306
|
+
|
|
307
|
+
Then treat the problem as **local dependency drift**.
|
|
308
|
+
|
|
309
|
+
Representative recovery path:
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
cd vona && rm -rf node_modules && pnpm install
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
This is a recovery step, not the first response.
|
|
316
|
+
|
|
317
|
+
## Verification by branch
|
|
318
|
+
|
|
319
|
+
### Forward chain
|
|
320
|
+
|
|
321
|
+
- backend source truth is correct
|
|
322
|
+
- emitted OpenAPI or contract output is correct
|
|
323
|
+
- module ownership is constrained
|
|
324
|
+
- generated frontend consumer output is refreshed
|
|
325
|
+
- frontend consumers and UI behavior align
|
|
326
|
+
|
|
327
|
+
### Reverse chain
|
|
328
|
+
|
|
329
|
+
- frontend source truth is correct
|
|
330
|
+
- metadata or build output is refreshed
|
|
331
|
+
- Vona dependency sync completed
|
|
332
|
+
- backend consumers resolve the updated frontend-generated handoff
|
|
333
|
+
|
|
334
|
+
### Local dependency drift
|
|
335
|
+
|
|
336
|
+
- generated artifacts already prove the change exists
|
|
337
|
+
- sync flow already ran
|
|
338
|
+
- reinstall is justified only because consumers still behave stale
|
|
339
|
+
|
|
340
|
+
## Tutorial map
|
|
341
|
+
|
|
342
|
+
Use the tutorial series as examples of the two chains:
|
|
343
|
+
|
|
344
|
+
- [Tutorial 3: Frontend Metadata Sharing](/fullstack/tutorial-3-frontend-metadata-sharing) — reverse chain, built-in metadata branch
|
|
345
|
+
- [Tutorial 4: Custom Form/Table Renderers for Level](/fullstack/tutorial-4-custom-level-renderers) — reverse chain, custom resource handoff branch
|
|
346
|
+
- [Tutorial 5: Backend Contract Sharing](/fullstack/tutorial-5-backend-contract-sharing) — forward chain, backend-emitted contract branch
|
|
347
|
+
- [Tutorial 6: One Contract Surface, Four Uses](/fullstack/tutorial-6-one-contract-four-uses) — one field story spanning multiple contract surfaces
|
|
348
|
+
|
|
349
|
+
## Related docs
|
|
350
|
+
|
|
351
|
+
- [Fullstack Introduction](/fullstack/introduction)
|
|
352
|
+
- [Backend OpenAPI to Frontend SDK](/fullstack/openapi-to-sdk)
|
|
353
|
+
- [Frontend Metadata Back to Backend](/fullstack/frontend-metadata-to-backend)
|
|
354
|
+
- [Vona + Zova Integration](/fullstack/vona-zova-integration)
|
|
355
|
+
- [OpenAPI SDK Guide](/frontend/openapi-sdk-guide)
|
|
356
|
+
- [API Schema Guide](/frontend/api-schema-guide)
|
|
@@ -60,3 +60,9 @@ This rule prevents a common failure mode:
|
|
|
60
60
|
- but gives the wrong operational example because it assumes the wrong edition
|
|
61
61
|
|
|
62
62
|
That is exactly the kind of mistake good fullstack docs should prevent.
|
|
63
|
+
|
|
64
|
+
## Where to read next
|
|
65
|
+
|
|
66
|
+
- If you want the shared bidirectional model first, continue with [Contract Loop Playbook](/fullstack/contract-loop-playbook).
|
|
67
|
+
- If your current task is the forward contract bridge, continue with [Backend OpenAPI to Frontend SDK](/fullstack/openapi-to-sdk).
|
|
68
|
+
- If your current task is the reverse metadata/resource bridge, continue with [Frontend Metadata Back to Backend](/fullstack/frontend-metadata-to-backend).
|
|
@@ -1,64 +1,240 @@
|
|
|
1
1
|
# Frontend Metadata Back to Backend
|
|
2
2
|
|
|
3
|
-
This page
|
|
3
|
+
This page is the **reverse chain** deep dive for Cabloy’s bidirectional contract loop.
|
|
4
4
|
|
|
5
5
|
## Why this path matters
|
|
6
6
|
|
|
7
7
|
The fullstack collaboration loop in Cabloy is not one-way.
|
|
8
8
|
|
|
9
|
+
> [!NOTE]
|
|
10
|
+
> The fullstack tutorial series intentionally uses a standalone `demo-student` sandbox so readers can experiment without colliding with the repo's real suite-owned `a-training/training-student` implementation.
|
|
11
|
+
> This guide focuses on the current repo implementation as its reverse-chain specimen.
|
|
12
|
+
|
|
13
|
+
In the bidirectional [Contract Loop Playbook](/fullstack/contract-loop-playbook), this page covers the **reverse chain**:
|
|
14
|
+
|
|
15
|
+
1. frontend-owned truth changes first
|
|
16
|
+
2. frontend metadata or flavor build output refreshes the generated handoff
|
|
17
|
+
3. Vona syncs that refreshed handoff through local dependency flow
|
|
18
|
+
4. backend-side metadata, tooling, or type surfaces consume the result
|
|
19
|
+
|
|
9
20
|
For the forward contract-bridge direction from backend OpenAPI to frontend consumption, also see [Backend OpenAPI to Frontend SDK](/fullstack/openapi-to-sdk).
|
|
10
21
|
|
|
11
|
-
|
|
22
|
+
If your real question is the full row-action chain from backend metadata to visible frontend table actions, including when forward-generated API consumers and reverse-shared render resources cooperate, also see [Backend Metadata to Frontend Table Actions](/fullstack/backend-metadata-to-frontend-table-actions).
|
|
12
23
|
|
|
13
|
-
This
|
|
24
|
+
## This page’s role in the contract loop
|
|
25
|
+
|
|
26
|
+
A practical split is:
|
|
14
27
|
|
|
15
|
-
|
|
28
|
+
- fullstack docs classify which direction the contract loop is moving
|
|
29
|
+
- this page explains the **reverse bridge** from frontend-owned truth to backend-visible handoff
|
|
30
|
+
- frontend docs explain how to author the relevant frontend resources
|
|
31
|
+
- tutorials show concrete implementation flows for specific cases
|
|
16
32
|
|
|
17
|
-
|
|
33
|
+
That means this page is the reverse-chain bridge page, not a frontend authoring cookbook and not a backend table-action runtime page.
|
|
34
|
+
|
|
35
|
+
## Frontend side: Zova owns the source truth
|
|
36
|
+
|
|
37
|
+
The reverse chain starts when the source of truth lives on the frontend side.
|
|
38
|
+
|
|
39
|
+
Typical frontend-owned truth includes:
|
|
18
40
|
|
|
19
41
|
- routes
|
|
20
42
|
- components
|
|
21
43
|
- icons
|
|
22
|
-
-
|
|
44
|
+
- custom form-field renderers
|
|
45
|
+
- custom table-cell renderers
|
|
46
|
+
- generated frontend metadata that backend `ZovaRender.*(...)` references rely on
|
|
47
|
+
|
|
48
|
+
This is one of the unusual strengths of the Cabloy monorepo model.
|
|
49
|
+
|
|
50
|
+
The frontend does not only consume backend contract truth through OpenAPI. It can also generate metadata and build output that improves backend-side development, tooling, and integration confidence.
|
|
51
|
+
|
|
52
|
+
## Backend side: Vona consumes the refreshed handoff
|
|
53
|
+
|
|
54
|
+
On the backend side, Vona does not consume the raw frontend source tree directly.
|
|
55
|
+
|
|
56
|
+
Instead, it consumes the refreshed handoff that the frontend generation/build path produces:
|
|
57
|
+
|
|
58
|
+
- generated metadata
|
|
59
|
+
- flavor build output
|
|
60
|
+
- refreshed local file dependency state after `npm run deps:vona`
|
|
61
|
+
|
|
62
|
+
That distinction matters.
|
|
63
|
+
|
|
64
|
+
The reverse chain is not complete when the frontend source file is saved.
|
|
65
|
+
It is complete only when the generated/shared handoff is refreshed and the backend side can actually see it.
|
|
66
|
+
|
|
67
|
+
## Source-to-consumer reverse chain
|
|
68
|
+
|
|
69
|
+
If you want the shortest accurate mental model, use this reverse chain:
|
|
70
|
+
|
|
71
|
+
1. frontend-owned truth changes in resources such as table cells, form fields, routes, or related metadata
|
|
72
|
+
2. frontend metadata or flavor build output refreshes the generated handoff
|
|
73
|
+
3. `npm run deps:vona` refreshes the Vona-side local dependency view
|
|
74
|
+
4. backend-side metadata, tooling, and type surfaces consume the refreshed handoff
|
|
75
|
+
5. if generated output already looks correct but backend consumers still behave stale, suspect **local dependency drift** rather than source-truth drift
|
|
76
|
+
|
|
77
|
+
That means the reverse chain is not only “build frontend and hope backend notices.”
|
|
78
|
+
|
|
79
|
+
It is a deliberate handoff path with a sync step and a verification step.
|
|
80
|
+
|
|
81
|
+
## Which page owns which question?
|
|
82
|
+
|
|
83
|
+
Use this split to avoid reading the wrong layer too deeply.
|
|
84
|
+
|
|
85
|
+
### Reverse-chain bridge and regeneration workflow
|
|
86
|
+
|
|
87
|
+
Use **this page** when the real question is:
|
|
88
|
+
|
|
89
|
+
- how frontend-owned truth crosses into backend-visible shared output
|
|
90
|
+
- which generation/build/sync steps belong to the reverse chain
|
|
91
|
+
- how to diagnose generated-output drift vs local dependency drift
|
|
92
|
+
|
|
93
|
+
### Forward-chain bridge and regeneration workflow
|
|
94
|
+
|
|
95
|
+
Use [Backend OpenAPI to Frontend SDK](/fullstack/openapi-to-sdk) when the real question is:
|
|
96
|
+
|
|
97
|
+
- how backend-authored truth becomes generated frontend contract material
|
|
98
|
+
- which OpenAPI generation and rest-build steps belong to that path
|
|
99
|
+
|
|
100
|
+
### Full chain classification and drift diagnosis
|
|
101
|
+
|
|
102
|
+
Use [Contract Loop Playbook](/fullstack/contract-loop-playbook) when the real question is:
|
|
103
|
+
|
|
104
|
+
- which direction the contract loop is moving
|
|
105
|
+
- whether the problem is source drift, generated-output drift, consumer drift, or local dependency drift
|
|
23
106
|
|
|
24
|
-
|
|
107
|
+
### Concrete mixed metadata/action thread
|
|
25
108
|
|
|
26
|
-
|
|
109
|
+
Use [Backend Metadata to Frontend Table Actions](/fullstack/backend-metadata-to-frontend-table-actions) when the real question is:
|
|
27
110
|
|
|
28
|
-
|
|
111
|
+
- how backend metadata and frontend action resources cooperate in one visible table-action chain
|
|
29
112
|
|
|
30
|
-
|
|
113
|
+
If you then want the shortest file-order path through that same Student row-action thread across both sides, continue with [Backend Metadata to Frontend Table Actions Source Reading Map](/fullstack/backend-metadata-to-frontend-table-actions-source-reading-map).
|
|
31
114
|
|
|
32
|
-
|
|
33
|
-
- the backend workflows that consume or rely on it
|
|
34
|
-
- the docs and skills that explain the collaboration path
|
|
115
|
+
### Concrete implementation steps
|
|
35
116
|
|
|
36
|
-
|
|
117
|
+
Use these when the real question is how to author the frontend resources themselves:
|
|
37
118
|
|
|
38
|
-
|
|
119
|
+
- [Tutorial 3: Frontend Metadata Sharing](/fullstack/tutorial-3-frontend-metadata-sharing)
|
|
120
|
+
- [Tutorial 4: Custom Form/Table Renderers for Level](/fullstack/tutorial-4-custom-level-renderers)
|
|
39
121
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
122
|
+
## Cabloy Basic workflow
|
|
123
|
+
|
|
124
|
+
For Cabloy Basic, the representative reverse-chain path is:
|
|
125
|
+
|
|
126
|
+
1. change the frontend-owned truth
|
|
127
|
+
2. regenerate frontend metadata when applicable
|
|
128
|
+
3. build the relevant frontend flavor output so the shared handoff is refreshed
|
|
129
|
+
4. run `npm run deps:vona`
|
|
130
|
+
5. verify backend-side consumers can now see the refreshed handoff
|
|
131
|
+
|
|
132
|
+
Representative commands for the current Basic admin path are:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
npm run zova :tools:metadata <module-name>
|
|
136
|
+
npm run build:zova:admin
|
|
137
|
+
npm run deps:vona
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
If the same resource path must also be available for Web, add:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
npm run build:zova:web
|
|
144
|
+
npm run deps:vona
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
A practical rule is:
|
|
148
|
+
|
|
149
|
+
- treat metadata generation, flavor build, and `deps:vona` as one reverse-chain handoff
|
|
150
|
+
- do not stop after the frontend source edit alone
|
|
151
|
+
|
|
152
|
+
## `training-student` as a compact reverse-chain specimen
|
|
153
|
+
|
|
154
|
+
A compact specimen helps make the reverse chain concrete without replaying the full tutorials.
|
|
155
|
+
|
|
156
|
+
A practical example thread looks like this:
|
|
157
|
+
|
|
158
|
+
1. frontend-owned truth lives in module resources such as:
|
|
159
|
+
- `zova/src/suite/a-training/modules/training-student/src/bean/tableCell.level.tsx`
|
|
160
|
+
- `zova/src/suite/a-training/modules/training-student/src/component/formFieldLevel/controller.tsx`
|
|
161
|
+
2. frontend-generated metadata is refreshed and the relevant flavor build output is rebuilt
|
|
162
|
+
3. `npm run deps:vona` refreshes what Vona can see from the frontend side
|
|
163
|
+
4. backend-side metadata such as `vona/src/suite/a-training/modules/training-student/src/entity/student.tsx` can safely reference the refreshed frontend resource identities through `ZovaRender.*(...)`
|
|
164
|
+
5. if the generated/shared output already contains the right resource keys but Vona still behaves stale, the next suspect is local dependency drift instead of missing source edits
|
|
165
|
+
|
|
166
|
+
The key point is simple:
|
|
167
|
+
|
|
168
|
+
> frontend-owned renderer and metadata resources become backend-visible only after the reverse-chain handoff is refreshed.
|
|
169
|
+
|
|
170
|
+
## Generated-output drift vs local dependency drift
|
|
171
|
+
|
|
172
|
+
A useful distinction is:
|
|
173
|
+
|
|
174
|
+
### Generated-output drift
|
|
175
|
+
|
|
176
|
+
This is the problem when:
|
|
177
|
+
|
|
178
|
+
- the correct frontend source changed
|
|
179
|
+
- but the generated metadata or flavor build output was never refreshed
|
|
180
|
+
|
|
181
|
+
Typical fix:
|
|
182
|
+
|
|
183
|
+
1. regenerate metadata when applicable
|
|
184
|
+
2. rebuild the relevant frontend flavor output
|
|
185
|
+
3. verify the generated/shared output itself before debugging Vona consumers
|
|
186
|
+
|
|
187
|
+
### Local dependency drift
|
|
188
|
+
|
|
189
|
+
This is the problem when:
|
|
190
|
+
|
|
191
|
+
- generated `.zova-rest` or related shared output already contains the expected keys or types
|
|
192
|
+
- but backend-side consumers still behave as if the old handoff is installed
|
|
193
|
+
|
|
194
|
+
Typical fix:
|
|
195
|
+
|
|
196
|
+
1. stop editing source files
|
|
197
|
+
2. run the normal sync flow with `npm run deps:vona`
|
|
198
|
+
3. if needed, rebuild `vona/node_modules` and reinstall dependencies
|
|
199
|
+
|
|
200
|
+
Representative recovery path:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
cd vona && rm -rf node_modules && pnpm install
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
This distinction is one of the most important practical diagnostics in the reverse chain.
|
|
44
207
|
|
|
45
208
|
## Edition awareness
|
|
46
209
|
|
|
210
|
+
The reverse-chain mental model applies to both Cabloy Basic and Cabloy Start.
|
|
211
|
+
|
|
47
212
|
This path is especially sensitive to edition differences because Basic and Start do not expose the same frontend module and UI shape.
|
|
48
213
|
|
|
49
|
-
So when AI
|
|
214
|
+
So when AI or contributors reason about frontend-generated metadata, they should verify:
|
|
50
215
|
|
|
51
216
|
- which repo is active
|
|
52
217
|
- which flavor is active
|
|
53
218
|
- which generated output belongs to that edition
|
|
219
|
+
- which concrete build and sync commands belong to that edition
|
|
220
|
+
|
|
221
|
+
For this public repo, use Cabloy Basic examples as the default operational path.
|
|
222
|
+
|
|
223
|
+
## Where to read next
|
|
224
|
+
|
|
225
|
+
- If your next question is about classifying the contract direction first, return to [Contract Loop Playbook](/fullstack/contract-loop-playbook).
|
|
226
|
+
- If your next question is the opposite direction, continue with [Backend OpenAPI to Frontend SDK](/fullstack/openapi-to-sdk).
|
|
227
|
+
- If your next question is about concrete mixed metadata/action collaboration, continue with [Backend Metadata to Frontend Table Actions](/fullstack/backend-metadata-to-frontend-table-actions).
|
|
228
|
+
- If your next question is about the concrete frontend authoring flows behind this handoff, continue with [Tutorial 3: Frontend Metadata Sharing](/fullstack/tutorial-3-frontend-metadata-sharing) and [Tutorial 4: Custom Form/Table Renderers for Level](/fullstack/tutorial-4-custom-level-renderers).
|
|
54
229
|
|
|
55
230
|
## Implementation checks for frontend-metadata changes
|
|
56
231
|
|
|
57
|
-
When changing frontend structural resources such as routes or
|
|
232
|
+
When changing frontend structural resources such as routes, renderers, or shared metadata, ask:
|
|
58
233
|
|
|
59
234
|
1. does metadata need regeneration?
|
|
60
|
-
2. does backend-side tooling or
|
|
235
|
+
2. does backend-side tooling or backend metadata rely on that handoff?
|
|
61
236
|
3. is this a Basic-specific or Start-specific workflow?
|
|
62
|
-
4. should the next action be generation and
|
|
237
|
+
4. should the next action be generation, flavor build, and `deps:vona` rather than only source edits?
|
|
238
|
+
5. if backend still looks stale, is the problem generated-output drift or local dependency drift?
|
|
63
239
|
|
|
64
240
|
That keeps the reverse contract loop visible instead of accidental.
|
|
@@ -33,6 +33,7 @@ Use this page as the main fullstack hub, then choose the path that matches your
|
|
|
33
33
|
Start here when you want the shortest route to a working monorepo mental model:
|
|
34
34
|
|
|
35
35
|
- [Quickstart](/fullstack/quickstart)
|
|
36
|
+
- [Suites and Modules](/fullstack/suites-and-modules)
|
|
36
37
|
- [CLI](/fullstack/cli)
|
|
37
38
|
- [VS Code Extensions](/fullstack/vscode-extensions)
|
|
38
39
|
|
|
@@ -43,6 +44,8 @@ Use this path when the task is about how backend and frontend stay aligned insid
|
|
|
43
44
|
- [Comparison with Other Frameworks](/fullstack/comparison-with-other-frameworks)
|
|
44
45
|
- [Framework Performance](/fullstack/framework-performance)
|
|
45
46
|
- [Vona + Zova Integration](/fullstack/vona-zova-integration)
|
|
47
|
+
- [Contract Loop Playbook](/fullstack/contract-loop-playbook)
|
|
48
|
+
- [Backend Metadata to Frontend Table Actions](/fullstack/backend-metadata-to-frontend-table-actions)
|
|
46
49
|
- [Backend OpenAPI to Frontend SDK](/fullstack/openapi-to-sdk)
|
|
47
50
|
- [Frontend Metadata Back to Backend](/fullstack/frontend-metadata-to-backend)
|
|
48
51
|
|
|
@@ -89,7 +92,18 @@ Cabloy does not treat type sharing as backend-to-frontend only. The collaboratio
|
|
|
89
92
|
|
|
90
93
|
This two-way contract loop reduces duplicate declarations and lets backend and frontend evolve from generated source truth instead of hand-maintained memory.
|
|
91
94
|
|
|
92
|
-
|
|
95
|
+
Start with the canonical [Contract Loop Playbook](/fullstack/contract-loop-playbook), then use the directional deep dives [Backend OpenAPI to Frontend SDK](/fullstack/openapi-to-sdk) and [Frontend Metadata Back to Backend](/fullstack/frontend-metadata-to-backend).
|
|
96
|
+
|
|
97
|
+
Use the playbook to distinguish four cases clearly:
|
|
98
|
+
|
|
99
|
+
- forward chain
|
|
100
|
+
- reverse chain
|
|
101
|
+
- consumer drift
|
|
102
|
+
- local dependency drift
|
|
103
|
+
|
|
104
|
+
The contract-loop model is shared across Cabloy Basic and Cabloy Start. Detect the edition to choose concrete flavor commands and generated-output paths, not to redefine the workflow model.
|
|
105
|
+
|
|
106
|
+
When the reverse direction involves newly added frontend resources that backend tooling or backend metadata will consume, treat that as an operational handoff rather than a conceptual one: refresh generated frontend output, run the relevant flavor build, run `npm run deps:vona`, and if Vona still sees stale shared types, rebuild `vona/node_modules` and reinstall dependencies.
|
|
93
107
|
|
|
94
108
|
## How the fullstack system stays connected
|
|
95
109
|
|