cabloy 5.1.61 → 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/skills/cabloy-backend-scaffold/SKILL.md +2 -0
- package/.claude/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +1 -1
- package/.claude/skills/cabloy-domain-planning/SKILL.md +212 -0
- package/.claude/skills/cabloy-frontend-scaffold/SKILL.md +2 -0
- package/CHANGELOG.md +42 -0
- package/CLAUDE.md +1 -0
- package/cabloy-docs/.vitepress/config.mjs +158 -12
- package/cabloy-docs/ai/docs-skills-rules-mapping.md +8 -0
- package/cabloy-docs/ai/future-skill-roadmap.md +2 -0
- package/cabloy-docs/ai/skills.md +1 -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 +12 -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 +12 -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 +13 -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 +2 -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 +7 -7
- 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 +4 -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 +1 -1
- package/cabloy-docs/frontend/behavior-guide.md +16 -16
- package/cabloy-docs/frontend/cli.md +5 -5
- package/cabloy-docs/frontend/command-scene-authoring.md +17 -8
- 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/filter-query-select-data-flow-guide.md +260 -0
- package/cabloy-docs/frontend/form-guide.md +19 -28
- package/cabloy-docs/frontend/form-scene-to-page-meta-guide.md +303 -0
- package/cabloy-docs/frontend/foundation.md +10 -6
- 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 +29 -7
- package/cabloy-docs/frontend/model-architecture.md +38 -2
- package/cabloy-docs/frontend/model-resource-cookbook.md +11 -8
- package/cabloy-docs/frontend/model-resource-internals-deep-dive.md +238 -0
- package/cabloy-docs/frontend/model-resource-owner-pattern.md +22 -2
- package/cabloy-docs/frontend/model-resource-usage-guide.md +22 -6
- package/cabloy-docs/frontend/model-state-guide.md +12 -9
- 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 +12 -4
- package/cabloy-docs/frontend/page-guide.md +9 -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 +14 -2
- 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 +2 -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 +7 -9
- package/cabloy-docs/frontend/zova-form-under-the-hood.md +5 -0
- package/cabloy-docs/frontend/zova-router-under-the-hood.md +561 -0
- package/cabloy-docs/frontend/zova-source-reading-map.md +101 -7
- 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/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 +8 -2
- package/cabloy-docs/fullstack/edition-collaboration-differences.md +6 -0
- package/cabloy-docs/fullstack/frontend-metadata-to-backend.md +181 -48
- package/cabloy-docs/fullstack/introduction.md +3 -0
- package/cabloy-docs/fullstack/openapi-to-sdk.md +116 -2
- 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 +4 -0
- package/cabloy-docs/fullstack/tutorial-4-custom-level-renderers.md +31 -19
- package/cabloy-docs/fullstack/tutorial-5-backend-contract-sharing.md +5 -0
- package/cabloy-docs/fullstack/tutorial-6-one-contract-four-uses.md +4 -0
- package/cabloy-docs/fullstack/tutorials-overview.md +1 -1
- package/cabloy-docs/reference/bean-scene-boilerplates.md +13 -13
- package/cabloy-docs/reference/package-map.md +4 -3
- package/package.json +1 -1
- package/vona/pnpm-lock.yaml +22 -258
- 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-zova/zova/package.json +2 -2
- package/zova/pnpm-lock.yaml +406 -680
- 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
|
@@ -1,89 +1,135 @@
|
|
|
1
1
|
# Frontend Metadata Back to Backend
|
|
2
2
|
|
|
3
|
-
This page is the **reverse chain** deep dive for Cabloy’s bidirectional contract loop
|
|
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
|
-
|
|
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
|
|
10
19
|
|
|
11
20
|
For the forward contract-bridge direction from backend OpenAPI to frontend consumption, also see [Backend OpenAPI to Frontend SDK](/fullstack/openapi-to-sdk).
|
|
12
21
|
|
|
13
|
-
|
|
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).
|
|
14
23
|
|
|
15
|
-
This
|
|
24
|
+
## This page’s role in the contract loop
|
|
25
|
+
|
|
26
|
+
A practical split is:
|
|
27
|
+
|
|
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.
|
|
18
34
|
|
|
19
|
-
|
|
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:
|
|
20
40
|
|
|
21
41
|
- routes
|
|
22
42
|
- components
|
|
23
43
|
- icons
|
|
24
|
-
-
|
|
44
|
+
- custom form-field renderers
|
|
45
|
+
- custom table-cell renderers
|
|
46
|
+
- generated frontend metadata that backend `ZovaRender.*(...)` references rely on
|
|
25
47
|
|
|
26
|
-
|
|
48
|
+
This is one of the unusual strengths of the Cabloy monorepo model.
|
|
27
49
|
|
|
28
|
-
|
|
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.
|
|
29
51
|
|
|
30
|
-
|
|
52
|
+
## Backend side: Vona consumes the refreshed handoff
|
|
31
53
|
|
|
32
|
-
|
|
54
|
+
On the backend side, Vona does not consume the raw frontend source tree directly.
|
|
33
55
|
|
|
34
|
-
|
|
35
|
-
- the backend workflows that consume or rely on it
|
|
36
|
-
- the docs and skills that explain the collaboration path
|
|
56
|
+
Instead, it consumes the refreshed handoff that the frontend generation/build path produces:
|
|
37
57
|
|
|
38
|
-
|
|
58
|
+
- generated metadata
|
|
59
|
+
- flavor build output
|
|
60
|
+
- refreshed local file dependency state after `npm run deps:vona`
|
|
39
61
|
|
|
40
|
-
|
|
62
|
+
That distinction matters.
|
|
41
63
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
3. let backend-side workflows, docs, or fullstack integration logic consume the generated information
|
|
45
|
-
4. verify the collaboration path still matches the active edition
|
|
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.
|
|
46
66
|
|
|
47
|
-
##
|
|
67
|
+
## Source-to-consumer reverse chain
|
|
48
68
|
|
|
49
|
-
|
|
69
|
+
If you want the shortest accurate mental model, use this reverse chain:
|
|
50
70
|
|
|
51
|
-
|
|
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
|
|
52
76
|
|
|
53
|
-
|
|
77
|
+
That means the reverse chain is not only “build frontend and hope backend notices.”
|
|
54
78
|
|
|
55
|
-
|
|
56
|
-
- which flavor is active
|
|
57
|
-
- which generated output belongs to that edition
|
|
58
|
-
- which concrete build and sync commands belong to that edition
|
|
79
|
+
It is a deliberate handoff path with a sync step and a verification step.
|
|
59
80
|
|
|
60
|
-
##
|
|
81
|
+
## Which page owns which question?
|
|
61
82
|
|
|
62
|
-
|
|
83
|
+
Use this split to avoid reading the wrong layer too deeply.
|
|
63
84
|
|
|
64
|
-
|
|
65
|
-
2. does backend-side tooling or fullstack integration rely on that metadata?
|
|
66
|
-
3. is this a Basic-specific or Start-specific workflow?
|
|
67
|
-
4. should the next action be generation and verification rather than only source edits?
|
|
85
|
+
### Reverse-chain bridge and regeneration workflow
|
|
68
86
|
|
|
69
|
-
|
|
87
|
+
Use **this page** when the real question is:
|
|
70
88
|
|
|
71
|
-
|
|
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
|
|
72
92
|
|
|
73
|
-
|
|
93
|
+
### Forward-chain bridge and regeneration workflow
|
|
74
94
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
-
|
|
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
|
|
106
|
+
|
|
107
|
+
### Concrete mixed metadata/action thread
|
|
108
|
+
|
|
109
|
+
Use [Backend Metadata to Frontend Table Actions](/fullstack/backend-metadata-to-frontend-table-actions) when the real question is:
|
|
110
|
+
|
|
111
|
+
- how backend metadata and frontend action resources cooperate in one visible table-action chain
|
|
78
112
|
|
|
79
|
-
|
|
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).
|
|
80
114
|
|
|
81
|
-
|
|
82
|
-
2. build the relevant frontend flavor output so the shared REST/type surface is refreshed
|
|
83
|
-
3. run `npm run deps:vona` so Vona re-syncs its local file dependencies
|
|
84
|
-
4. if generated `.zova-rest` output already contains the expected new keys or types but backend-side consumers still look stale, rebuild `vona/node_modules` and reinstall dependencies
|
|
115
|
+
### Concrete implementation steps
|
|
85
116
|
|
|
86
|
-
|
|
117
|
+
Use these when the real question is how to author the frontend resources themselves:
|
|
118
|
+
|
|
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)
|
|
121
|
+
|
|
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:
|
|
87
133
|
|
|
88
134
|
```bash
|
|
89
135
|
npm run zova :tools:metadata <module-name>
|
|
@@ -98,10 +144,97 @@ npm run build:zova:web
|
|
|
98
144
|
npm run deps:vona
|
|
99
145
|
```
|
|
100
146
|
|
|
101
|
-
|
|
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:
|
|
102
201
|
|
|
103
202
|
```bash
|
|
104
203
|
cd vona && rm -rf node_modules && pnpm install
|
|
105
204
|
```
|
|
106
205
|
|
|
107
|
-
|
|
206
|
+
This distinction is one of the most important practical diagnostics in the reverse chain.
|
|
207
|
+
|
|
208
|
+
## Edition awareness
|
|
209
|
+
|
|
210
|
+
The reverse-chain mental model applies to both Cabloy Basic and Cabloy Start.
|
|
211
|
+
|
|
212
|
+
This path is especially sensitive to edition differences because Basic and Start do not expose the same frontend module and UI shape.
|
|
213
|
+
|
|
214
|
+
So when AI or contributors reason about frontend-generated metadata, they should verify:
|
|
215
|
+
|
|
216
|
+
- which repo is active
|
|
217
|
+
- which flavor is active
|
|
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).
|
|
229
|
+
|
|
230
|
+
## Implementation checks for frontend-metadata changes
|
|
231
|
+
|
|
232
|
+
When changing frontend structural resources such as routes, renderers, or shared metadata, ask:
|
|
233
|
+
|
|
234
|
+
1. does metadata need regeneration?
|
|
235
|
+
2. does backend-side tooling or backend metadata rely on that handoff?
|
|
236
|
+
3. is this a Basic-specific or Start-specific workflow?
|
|
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?
|
|
239
|
+
|
|
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
|
|
|
@@ -6,6 +6,10 @@ This page is the **forward chain** deep dive for Cabloy’s bidirectional contra
|
|
|
6
6
|
|
|
7
7
|
In the bidirectional [Contract Loop Playbook](/fullstack/contract-loop-playbook), this page covers the **forward chain**:
|
|
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 forward-chain specimen.
|
|
12
|
+
|
|
9
13
|
1. Vona emits backend API metadata through Swagger/OpenAPI
|
|
10
14
|
2. Zova consumes that metadata to generate frontend SDKs and schema-aware helpers
|
|
11
15
|
3. frontend pages, models, and services build on those generated contracts instead of re-declaring everything manually
|
|
@@ -24,6 +28,8 @@ That means this page is the forward-chain bridge page, not the backend authoring
|
|
|
24
28
|
|
|
25
29
|
If the changed source is actually a frontend-owned resource that backend consumers later depend on, switch to the reverse-chain guide: [Frontend Metadata Back to Backend](/fullstack/frontend-metadata-to-backend).
|
|
26
30
|
|
|
31
|
+
If your real question is how one backend-owned row action becomes a visible frontend table action through metadata, page blocks, `tableCell` resources, and optionally generated API/model layers, continue with [Backend Metadata to Frontend Table Actions](/fullstack/backend-metadata-to-frontend-table-actions).
|
|
32
|
+
|
|
27
33
|
## Backend side: Vona emits the contract
|
|
28
34
|
|
|
29
35
|
On the backend side, OpenAPI metadata is driven by:
|
|
@@ -39,6 +45,7 @@ For the deeper backend perspective, see:
|
|
|
39
45
|
- [OpenAPI Guide](/backend/openapi-guide)
|
|
40
46
|
- [Validation Guide](/backend/validation-guide)
|
|
41
47
|
- [DTO Infer and Generation](/backend/dto-infer-generation)
|
|
48
|
+
- [Backend Resource/Module Contract Chain](/backend/backend-resource-module-contract-chain)
|
|
42
49
|
|
|
43
50
|
## Frontend side: Zova consumes the contract
|
|
44
51
|
|
|
@@ -56,6 +63,65 @@ For the deeper frontend perspective, see:
|
|
|
56
63
|
- [API Schema Guide](/frontend/api-schema-guide)
|
|
57
64
|
- [SDK Guide](/frontend/sdk-guide)
|
|
58
65
|
|
|
66
|
+
## Source-to-consumer chain
|
|
67
|
+
|
|
68
|
+
If you want the shortest accurate mental model, use this forward chain:
|
|
69
|
+
|
|
70
|
+
1. backend controller signatures define request and response entry surfaces
|
|
71
|
+
2. backend DTO and entity fields shape named and shared contract structure
|
|
72
|
+
3. validation rules and `v` helpers refine the machine-readable contract
|
|
73
|
+
4. Vona emits OpenAPI output from those backend declarations
|
|
74
|
+
5. Zova OpenAPI config decides which generated contract slice belongs to which frontend module
|
|
75
|
+
6. frontend generation produces SDK and rest/schema-related contract output
|
|
76
|
+
7. frontend code consumes the generated contract through:
|
|
77
|
+
- generated SDK methods
|
|
78
|
+
- schema-driven helpers
|
|
79
|
+
- `$sdk` and `$apiSchema`-adjacent runtime surfaces
|
|
80
|
+
- thin model facades and existing resource-owner consumers when the API belongs to an existing resource
|
|
81
|
+
|
|
82
|
+
That means this bridge is not only “generate the SDK.”
|
|
83
|
+
|
|
84
|
+
It is the whole path that moves backend-authored truth into frontend-usable contract material.
|
|
85
|
+
|
|
86
|
+
## Which page owns which question?
|
|
87
|
+
|
|
88
|
+
Use this split to avoid reading the wrong layer too deeply.
|
|
89
|
+
|
|
90
|
+
### Backend authoring semantics
|
|
91
|
+
|
|
92
|
+
Use these when the real question is how the backend contract is authored:
|
|
93
|
+
|
|
94
|
+
- [Controller Guide](/backend/controller-guide)
|
|
95
|
+
- [DTO Guide](/backend/dto-guide)
|
|
96
|
+
- [DTO Infer and Generation](/backend/dto-infer-generation)
|
|
97
|
+
- [OpenAPI Guide](/backend/openapi-guide)
|
|
98
|
+
- [Backend Resource/Module Contract Chain](/backend/backend-resource-module-contract-chain)
|
|
99
|
+
|
|
100
|
+
### Forward-chain bridge and regeneration workflow
|
|
101
|
+
|
|
102
|
+
Use **this page** when the real question is:
|
|
103
|
+
|
|
104
|
+
- how backend-authored truth crosses the stack boundary
|
|
105
|
+
- which generation steps to run
|
|
106
|
+
- where module ownership and regeneration decisions belong
|
|
107
|
+
- how to keep frontend follow-up thin after regeneration
|
|
108
|
+
|
|
109
|
+
### Frontend generation and usage setup
|
|
110
|
+
|
|
111
|
+
Use these when the generated contract has already crossed the boundary and you are configuring or consuming it in Zova:
|
|
112
|
+
|
|
113
|
+
- [OpenAPI SDK Guide](/frontend/openapi-sdk-guide)
|
|
114
|
+
- [API Schema Guide](/frontend/api-schema-guide)
|
|
115
|
+
- [SDK Guide](/frontend/sdk-guide)
|
|
116
|
+
|
|
117
|
+
### Frontend runtime and deeper consumption internals
|
|
118
|
+
|
|
119
|
+
Use these when the real question is how generated contract material is consumed inside Zova runtime layers:
|
|
120
|
+
|
|
121
|
+
- [A-OpenAPI Under the Hood](/frontend/a-openapi-under-the-hood)
|
|
122
|
+
- [ModelResource Internals Deep Dive](/frontend/model-resource-internals-deep-dive)
|
|
123
|
+
- [Rest Resource Source Reading Map](/frontend/rest-resource-source-reading-map)
|
|
124
|
+
|
|
59
125
|
## Cabloy Basic workflow
|
|
60
126
|
|
|
61
127
|
In the current public monorepo, Basic-specific Zova flavors include:
|
|
@@ -66,8 +132,8 @@ In the current public monorepo, Basic-specific Zova flavors include:
|
|
|
66
132
|
Representative frontend-side contract-generation commands include:
|
|
67
133
|
|
|
68
134
|
```bash
|
|
69
|
-
npm run zova :openapi:config
|
|
70
|
-
npm run zova :openapi:generate
|
|
135
|
+
npm run zova :openapi:config training-student
|
|
136
|
+
npm run zova :openapi:generate training-student
|
|
71
137
|
cd zova && npm run build:rest:cabloyBasicAdmin
|
|
72
138
|
cd zova && npm run build:rest:cabloyBasicWeb
|
|
73
139
|
```
|
|
@@ -98,6 +164,43 @@ A practical regeneration rule is:
|
|
|
98
164
|
- if `npm run zova :openapi:generate ...` fails because the local Swagger source is unavailable, first start the backend service and confirm `http://localhost:7102/swagger/json?version=V31` is reachable before treating generation as broken
|
|
99
165
|
- if the generated consumer path is already correct, but frontend behavior still looks stale, stop patching generated files and diagnose consumer drift or local dependency drift instead
|
|
100
166
|
|
|
167
|
+
## `training-student` as a compact forward-chain specimen
|
|
168
|
+
|
|
169
|
+
A compact specimen helps make the bridge more concrete.
|
|
170
|
+
|
|
171
|
+
A practical `training-student` forward chain looks like this:
|
|
172
|
+
|
|
173
|
+
1. backend contract truth changes in places such as:
|
|
174
|
+
- `controller/student.ts`
|
|
175
|
+
- `entity/student.tsx`
|
|
176
|
+
- `dto/studentCreate.tsx`
|
|
177
|
+
- `dto/studentUpdate.tsx`
|
|
178
|
+
- `dto/studentView.tsx`
|
|
179
|
+
- `dto/studentSelectReq.tsx`
|
|
180
|
+
2. backend OpenAPI output changes because those controller/DTO/entity/validation surfaces changed
|
|
181
|
+
3. frontend OpenAPI generation refreshes the module-owned consumer slice
|
|
182
|
+
4. flavor-specific rest output is rebuilt when the workflow depends on generated rest output
|
|
183
|
+
5. frontend code consumes the generated result through module-owned SDK/schema surfaces, then keeps follow-up thin with semantic wrappers or existing resource owners
|
|
184
|
+
|
|
185
|
+
This is the main point of the forward chain:
|
|
186
|
+
|
|
187
|
+
> backend contract truth moves first, generated handoff moves second, frontend consumers stay thin and downstream.
|
|
188
|
+
|
|
189
|
+
## Thin frontend follow-up after generation
|
|
190
|
+
|
|
191
|
+
After the generated contract crosses the boundary, the best frontend move is usually **not** to recreate the contract by hand.
|
|
192
|
+
|
|
193
|
+
A practical split is:
|
|
194
|
+
|
|
195
|
+
- use generated SDKs when the module already follows the OpenAPI-generated API-service path
|
|
196
|
+
- use schema-driven helpers when the workflow is contract/schema oriented
|
|
197
|
+
- use thin model facades when the UI needs business semantics over generated APIs
|
|
198
|
+
- reuse the existing resource-owner when the custom API still belongs to the same resource
|
|
199
|
+
|
|
200
|
+
That last point matters especially for resource-driven pages.
|
|
201
|
+
|
|
202
|
+
If the endpoint still belongs to an existing business resource, prefer keeping `ModelResource` or the existing resource-owner story as the stable state owner rather than introducing a competing second owner.
|
|
203
|
+
|
|
101
204
|
## Cabloy Start workflow
|
|
102
205
|
|
|
103
206
|
In the sibling private Start repo, the same collaboration idea applies, but the frontend flavor names differ.
|
|
@@ -113,6 +216,17 @@ Before documenting or automating this path for Start, confirm:
|
|
|
113
216
|
2. the Start repo’s `package.json`
|
|
114
217
|
3. the exact frontend flavor names and generated output paths
|
|
115
218
|
|
|
219
|
+
## Where to read next
|
|
220
|
+
|
|
221
|
+
- If your next question is still on the backend authoring side, continue with [OpenAPI Guide](/backend/openapi-guide), [Backend Contract Emission Specimen](/backend/backend-contract-emission-specimen), [Backend Contract Emission Output Inspection](/backend/backend-contract-emission-output-inspection), [DTO Guide](/backend/dto-guide), [DTO Infer and Generation](/backend/dto-infer-generation), and [Backend Resource/Module Contract Chain](/backend/backend-resource-module-contract-chain).
|
|
222
|
+
- If your next question is about frontend SDK setup and module ownership, continue with [OpenAPI SDK Guide](/frontend/openapi-sdk-guide).
|
|
223
|
+
- If your next question is about what generated contract consumption looks like in one practical frontend path, continue with [Generated Contract Consumption Specimen](/frontend/generated-contract-consumption-specimen), then choose [Generated Contract Consumption: List Branch](/frontend/generated-contract-consumption-list-branch) or [Generated Contract Consumption: Entry Branch](/frontend/generated-contract-consumption-entry-branch) as needed.
|
|
224
|
+
- If your next question becomes one mixed Student row-action thread spanning backend metadata, generated contract follow-up, and frontend action resources, continue with [Backend Metadata to Frontend Table Actions Source Reading Map](/fullstack/backend-metadata-to-frontend-table-actions-source-reading-map).
|
|
225
|
+
- If your next question is about schema-driven frontend consumption, continue with [API Schema Guide](/frontend/api-schema-guide).
|
|
226
|
+
- If your next question is about the lower-level frontend runtime under generated OpenAPI/schema usage, continue with [A-OpenAPI Under the Hood](/frontend/a-openapi-under-the-hood).
|
|
227
|
+
- If your next question is about resource-owner or model-level consumption after regeneration, continue with [ModelResource Internals Deep Dive](/frontend/model-resource-internals-deep-dive) and [Rest Resource Source Reading Map](/frontend/rest-resource-source-reading-map).
|
|
228
|
+
- If the problem is actually about deciding which direction the contract loop is moving, return to [Contract Loop Playbook](/fullstack/contract-loop-playbook).
|
|
229
|
+
|
|
116
230
|
## Implementation checks for backend-to-frontend contract changes
|
|
117
231
|
|
|
118
232
|
When changing a backend API contract, ask:
|