cabloy 5.1.59 → 5.1.61

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.
Files changed (149) hide show
  1. package/.claude/hooks/contract-loop-gate.ts +296 -0
  2. package/.claude/settings.json +16 -0
  3. package/.claude/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +1 -0
  4. package/.claude/skills/cabloy-contract-loop/SKILL.md +103 -14
  5. package/.claude/skills/cabloy-contract-loop/references/contract-loop-map.md +126 -12
  6. package/.claude/skills/cabloy-contract-loop/references/resource-custom-state-pattern.md +148 -0
  7. package/.claude/skills/cabloy-contract-loop/references/verification-checklist.md +49 -13
  8. package/.claude/skills/cabloy-frontend-scaffold/SKILL.md +11 -0
  9. package/.claude/skills/cabloy-frontend-scaffold/references/follow-up-checklist.md +2 -0
  10. package/.claude/skills/cabloy-module-removal/SKILL.md +144 -0
  11. package/.claude/skills/cabloy-resource-field-update/SKILL.md +274 -0
  12. package/.claude/skills/cabloy-resource-field-update/evals/evals.json +53 -0
  13. package/.claude/skills/cabloy-resource-field-update/references/custom-renderer-demo-checklist.md +102 -0
  14. package/.claude/skills/cabloy-resource-field-update/references/field-update-decision-tree.md +120 -0
  15. package/.claude/skills/cabloy-resource-field-update/references/follow-up-checklist.md +80 -0
  16. package/.claude/skills/cabloy-resource-field-update/references/verification-checklist.md +97 -0
  17. package/.claude/skills/cabloy-zova-source-reading/SKILL.md +221 -0
  18. package/.claude/skills/cabloy-zova-source-reading/references/analysis-modes.md +91 -0
  19. package/.claude/skills/cabloy-zova-source-reading/references/core-reading-paths.md +117 -0
  20. package/.github/workflows/docs-pages.yml +2 -0
  21. package/.github/workflows/vona-cov-pg.yml +2 -0
  22. package/.github/workflows/vona-test-crud.yml +4 -2
  23. package/.github/workflows/vona-test-mysql.yml +2 -0
  24. package/.github/workflows/vona-test-pg.yml +2 -0
  25. package/.github/workflows/vona-test-sqlite3.yml +2 -0
  26. package/.github/workflows/vona-tsc.yml +2 -0
  27. package/.github/workflows/zova-ui.yml +2 -0
  28. package/.gitignore +0 -4
  29. package/CHANGELOG.md +52 -0
  30. package/CLAUDE.md +12 -0
  31. package/README.md +15 -0
  32. package/cabloy-docs/.vitepress/config.mjs +89 -0
  33. package/cabloy-docs/ai/class-placement-rule.md +2 -0
  34. package/cabloy-docs/ai/cli-to-skill-map.md +14 -0
  35. package/cabloy-docs/ai/docs-skills-rules-mapping.md +14 -0
  36. package/cabloy-docs/ai/future-skill-roadmap.md +27 -9
  37. package/cabloy-docs/ai/introduction.md +1 -0
  38. package/cabloy-docs/ai/playbook-backend-module.md +6 -0
  39. package/cabloy-docs/ai/playbook-module-removal.md +164 -0
  40. package/cabloy-docs/ai/skills.md +11 -0
  41. package/cabloy-docs/backend/bean-scene-authoring.md +350 -0
  42. package/cabloy-docs/backend/cli.md +26 -1
  43. package/cabloy-docs/backend/dto-guide.md +6 -0
  44. package/cabloy-docs/backend/entity-guide.md +18 -0
  45. package/cabloy-docs/backend/foundation.md +28 -3
  46. package/cabloy-docs/backend/introduction.md +10 -0
  47. package/cabloy-docs/backend/serialization-guide.md +10 -0
  48. package/cabloy-docs/backend/service-guide.md +2 -0
  49. package/cabloy-docs/backend/status-guide.md +271 -0
  50. package/cabloy-docs/backend/websocket-call-flow.md +435 -0
  51. package/cabloy-docs/backend/websocket-guide.md +455 -0
  52. package/cabloy-docs/backend/websocket-protocol-guide.md +381 -0
  53. package/cabloy-docs/backend/websocket-usage-guide.md +356 -0
  54. package/cabloy-docs/frontend/api-guide.md +2 -0
  55. package/cabloy-docs/frontend/bean-scene-authoring.md +374 -0
  56. package/cabloy-docs/frontend/behavior-guide.md +449 -0
  57. package/cabloy-docs/frontend/cli.md +24 -0
  58. package/cabloy-docs/frontend/command-scene-authoring.md +495 -0
  59. package/cabloy-docs/frontend/design-principles.md +6 -0
  60. package/cabloy-docs/frontend/fetch-interceptor-guide.md +440 -0
  61. package/cabloy-docs/frontend/form-guide.md +795 -0
  62. package/cabloy-docs/frontend/foundation.md +29 -0
  63. package/cabloy-docs/frontend/introduction.md +17 -1
  64. package/cabloy-docs/frontend/ioc-and-beans.md +16 -9
  65. package/cabloy-docs/frontend/mock-guide.md +1 -0
  66. package/cabloy-docs/frontend/model-architecture.md +252 -39
  67. package/cabloy-docs/frontend/model-resource-best-practices.md +379 -0
  68. package/cabloy-docs/frontend/model-resource-cookbook.md +505 -0
  69. package/cabloy-docs/frontend/model-resource-owner-pattern.md +382 -0
  70. package/cabloy-docs/frontend/model-resource-usage-guide.md +318 -0
  71. package/cabloy-docs/frontend/model-state-guide.md +366 -13
  72. package/cabloy-docs/frontend/openapi-sdk-guide.md +5 -2
  73. package/cabloy-docs/frontend/page-guide.md +6 -0
  74. package/cabloy-docs/frontend/quickstart.md +4 -0
  75. package/cabloy-docs/frontend/reading-zova-for-vue-developers.md +266 -0
  76. package/cabloy-docs/frontend/router-tabs-admin-web-comparison.md +206 -0
  77. package/cabloy-docs/frontend/router-tabs-introduction.md +106 -0
  78. package/cabloy-docs/frontend/router-tabs-mechanism.md +469 -0
  79. package/cabloy-docs/frontend/router-tabs-overview.md +227 -0
  80. package/cabloy-docs/frontend/router-tabs-route-meta-cookbook.md +343 -0
  81. package/cabloy-docs/frontend/server-data.md +2 -0
  82. package/cabloy-docs/frontend/ssr-architecture-overview.md +211 -0
  83. package/cabloy-docs/frontend/ssr-build-deploy-guide.md +308 -0
  84. package/cabloy-docs/frontend/ssr-review-checklist.md +184 -0
  85. package/cabloy-docs/frontend/ssr-troubleshooting-guide.md +301 -0
  86. package/cabloy-docs/frontend/zova-form-source-reading-map.md +295 -0
  87. package/cabloy-docs/frontend/zova-form-under-the-hood.md +556 -0
  88. package/cabloy-docs/frontend/zova-reactivity-under-the-hood.md +320 -0
  89. package/cabloy-docs/frontend/zova-source-reading-map.md +327 -0
  90. package/cabloy-docs/frontend/zova-vs-vue3-comparison.md +308 -0
  91. package/cabloy-docs/fullstack/contract-loop-playbook.md +350 -0
  92. package/cabloy-docs/fullstack/framework-performance.md +3 -3
  93. package/cabloy-docs/fullstack/frontend-metadata-to-backend.md +44 -1
  94. package/cabloy-docs/fullstack/introduction.md +40 -0
  95. package/cabloy-docs/fullstack/openapi-to-sdk.md +19 -9
  96. package/cabloy-docs/fullstack/quickstart.md +7 -1
  97. package/cabloy-docs/fullstack/tutorial-1-first-module.md +111 -0
  98. package/cabloy-docs/fullstack/tutorial-2-first-crud.md +122 -0
  99. package/cabloy-docs/fullstack/tutorial-3-frontend-metadata-sharing.md +131 -0
  100. package/cabloy-docs/fullstack/tutorial-4-custom-level-renderers.md +144 -0
  101. package/cabloy-docs/fullstack/tutorial-5-backend-contract-sharing.md +146 -0
  102. package/cabloy-docs/fullstack/tutorial-6-one-contract-four-uses.md +170 -0
  103. package/cabloy-docs/fullstack/tutorials-overview.md +192 -0
  104. package/cabloy-docs/index.md +4 -3
  105. package/cabloy-docs/reference/bean-scene-boilerplates.md +75 -0
  106. package/cabloy-docs/reference/cli-reference.md +2 -0
  107. package/package.json +7 -2
  108. package/scripts/initTestData.ts +25 -0
  109. package/scripts/upgrade.ts +17 -2
  110. package/vona/packages-cli/cabloy-cli/package.json +2 -2
  111. package/vona/packages-cli/cli/package.json +1 -1
  112. package/vona/packages-cli/cli-set-api/package.json +1 -1
  113. package/vona/packages-cli/cli-set-api/src/lib/bean/cli.create.module.ts +4 -0
  114. package/vona/packages-vona/vona/package.json +1 -1
  115. package/vona/pnpm-lock.yaml +226 -1091
  116. package/vona/pnpm-workspace.yaml +0 -1
  117. package/vona/src/suite-vendor/a-vona/modules/a-core/assets/static/img/vona.svg +1 -1
  118. package/vona/src/suite-vendor/a-vona/modules/a-core/package.json +1 -1
  119. package/vona/src/suite-vendor/a-vona/modules/a-permission/package.json +1 -1
  120. package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/bean.permission.ts +1 -1
  121. package/vona/src/suite-vendor/a-vona/modules/a-upload/package.json +2 -2
  122. package/vona/src/suite-vendor/a-vona/package.json +1 -1
  123. package/zova/package.original.json +1 -1
  124. package/zova/packages-cli/cli/package.json +3 -3
  125. package/zova/packages-cli/cli-set-front/cli/templates/init/icon/boilerplate/icons/default/zova.svg +1 -1
  126. package/zova/packages-cli/cli-set-front/cli/templates/openapi/config/boilerplate/module/openapi.config.ts +6 -1
  127. package/zova/packages-cli/cli-set-front/package.json +3 -3
  128. package/zova/packages-cli/cli-set-front/src/lib/bean/cli.create.module.ts +4 -0
  129. package/zova/packages-cli/cli-set-front/src/lib/bean/cli.openapi.generate.ts +34 -4
  130. package/zova/packages-cli/cli-set-front/src/lib/command/create.bean.ts +5 -1
  131. package/zova/packages-utils/zova-vite/package.json +2 -2
  132. package/zova/packages-zova/zova/package.json +2 -2
  133. package/zova/pnpm-lock.yaml +282 -1311
  134. package/zova/pnpm-workspace.yaml +0 -1
  135. package/zova/src/suite/a-home/modules/home-icon/icons/social/cabloy.svg +1 -1
  136. package/zova/src/suite/a-home/modules/home-icon/icons/social/vona.svg +1 -1
  137. package/zova/src/suite/a-home/modules/home-icon/icons/social/zova.svg +1 -1
  138. package/zova/src/suite/a-home/modules/home-icon/src/.metadata/icons/groups/social.svg +3 -3
  139. package/zova/src/suite/cabloy-basic/modules/basic-select/src/component/formFieldSelect/controller.tsx +9 -0
  140. package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/package.json +1 -1
  141. package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/model/resource.ts +66 -16
  142. package/zova/src/suite-vendor/a-cabloy/package.json +2 -2
  143. package/zova/src/suite-vendor/a-zova/modules/a-routertabs/package.json +1 -1
  144. package/zova/src/suite-vendor/a-zova/modules/a-routertabs/src/model/tabs.ts +60 -18
  145. package/zova/src/suite-vendor/a-zova/modules/a-table/cli/tableActionRow/boilerplate/{{sceneName}}.{{beanName}}.tsx_ +6 -1
  146. package/zova/src/suite-vendor/a-zova/modules/a-table/cli/tableCell/boilerplate/{{sceneName}}.{{beanName}}.tsx_ +6 -1
  147. package/zova/src/suite-vendor/a-zova/modules/a-table/package.json +1 -1
  148. package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +2 -2
  149. package/zova/src/suite-vendor/a-zova/package.json +4 -4
@@ -0,0 +1,301 @@
1
+ # SSR Troubleshooting Guide
2
+
3
+ This guide explains how to debug common SSR problems in Zova within the Cabloy monorepo.
4
+
5
+ ## Why this page exists
6
+
7
+ The other SSR pages explain how the SSR model is supposed to work.
8
+
9
+ This page answers a different question:
10
+
11
+ - when SSR behavior is wrong, where should you look first?
12
+
13
+ That matters because SSR issues are easy to misclassify.
14
+
15
+ A symptom that looks like “frontend rendering is broken” can actually come from:
16
+
17
+ - SSR site routing on the backend side
18
+ - a missing or stale frontend bundle
19
+ - SSR-only route or data-loading behavior
20
+ - hydration mismatch on the client
21
+ - edition-specific theme assumptions
22
+
23
+ A good troubleshooting flow starts by identifying **which layer is failing** before trying to patch the symptom directly.
24
+
25
+ ## Start with the four-layer model
26
+
27
+ Use the [SSR Architecture Overview](/frontend/ssr-architecture-overview) as the first mental model.
28
+
29
+ For troubleshooting, the practical layer split is:
30
+
31
+ 1. **Vona SSR orchestration**
32
+ - request entry
33
+ - SSR site matching
34
+ - dev proxy versus built asset versus SSR render
35
+ 2. **frontend build output**
36
+ - SSR entry
37
+ - manifest
38
+ - client assets
39
+ 3. **Zova SSR server render**
40
+ - route resolution
41
+ - HTML render
42
+ - state/meta/preload generation
43
+ 4. **client hydration**
44
+ - initial state reuse
45
+ - browser-only behavior
46
+ - final theme and DOM state
47
+
48
+ If you identify the failing layer first, most SSR debugging becomes much faster.
49
+
50
+ ## Fast symptom-to-layer map
51
+
52
+ Use this quick map before diving deeper.
53
+
54
+ | Symptom | Start here |
55
+ | --- | --- |
56
+ | request does not hit the expected SSR page | Vona SSR orchestration |
57
+ | dev works but prod fails | frontend build output + SSR env/runtime |
58
+ | HTML appears but hydration is wrong | client hydration |
59
+ | server-rendered data is missing or refetched unexpectedly | Zova SSR server render + init data flow |
60
+ | SEO/meta output is missing | Zova SSR server render + meta flow |
61
+ | first paint theme is wrong | SSR env + theme rules |
62
+ | static assets 404 after SSR deploy | frontend build output |
63
+
64
+ ## Symptom 1: the request does not hit the expected SSR page
65
+
66
+ Typical signs:
67
+
68
+ - a page that should be SSR-rendered falls through to another route
69
+ - a URL returns the wrong site
70
+ - SSR works for one path prefix but not another
71
+
72
+ Start with these questions:
73
+
74
+ 1. is the request entering the correct SSR site at all?
75
+ 2. is the path prefix/site selection correct?
76
+ 3. are you expecting SSR where the route is actually a normal backend or static path?
77
+
78
+ A practical debugging order is:
79
+
80
+ - confirm the target URL and SSR site assumptions
81
+ - re-check the SSR architecture split in [SSR Architecture Overview](/frontend/ssr-architecture-overview)
82
+ - verify whether the problem is a site-entry issue rather than a page-render issue
83
+
84
+ If the request never reaches the intended SSR site, do **not** start by changing page components or hydration logic.
85
+
86
+ ## Symptom 2: dev works but prod fails
87
+
88
+ Typical signs:
89
+
90
+ - SSR works through the dev server but breaks after build
91
+ - dev shows the page, while prod returns missing asset or render errors
92
+ - only built deployments show the problem
93
+
94
+ This usually means the issue is not only “SSR logic.”
95
+
96
+ It often means one of these instead:
97
+
98
+ - build output is stale or incomplete
99
+ - the expected frontend bundle was not generated for the target flavor
100
+ - SSR env/runtime assumptions differ between dev and prod
101
+ - asset paths or manifest assumptions are wrong after build
102
+
103
+ Start with these checks:
104
+
105
+ 1. was the relevant frontend SSR build actually regenerated?
106
+ 2. are you targeting the correct flavor for the active edition?
107
+ 3. does the issue happen before page render, during page render, or only after hydration?
108
+
109
+ Read together:
110
+
111
+ - [SSR Architecture Overview](/frontend/ssr-architecture-overview)
112
+ - [SSR Environment Variables](/frontend/ssr-env)
113
+ - [Fullstack Vona + Zova Integration](/fullstack/vona-zova-integration)
114
+
115
+ ## Symptom 3: HTML appears, but hydration is wrong
116
+
117
+ Typical signs:
118
+
119
+ - server HTML looks right at first, then changes unexpectedly on the client
120
+ - hydration mismatch warnings appear
121
+ - browser-only UI behaves differently from the server output
122
+ - the first screen “flashes” into a different state after load
123
+
124
+ This usually means the server render and the browser’s final state are not using exactly the same assumptions.
125
+
126
+ Common causes include:
127
+
128
+ - browser-only logic running too early
129
+ - client-only components not being isolated properly
130
+ - theme-sensitive output being treated as authoritative on the server when it is not
131
+ - state that was expected to transfer through SSR not being reused correctly during hydration
132
+
133
+ Start with these checks:
134
+
135
+ 1. does this UI depend on browser APIs or client-only rendering behavior?
136
+ 2. should part of the UI be wrapped in `ClientOnly`?
137
+ 3. is the code assuming the server already knows the browser’s final theme?
138
+ 4. is the client reusing server-provided state, or recomputing a different result?
139
+
140
+ Read together:
141
+
142
+ - [SSR ClientOnly](/frontend/ssr-client-only)
143
+ - [SSR Init Data](/frontend/ssr-init-data)
144
+ - [SSR Environment Variables](/frontend/ssr-env)
145
+ - [Theme Guide](/frontend/theme-guide)
146
+
147
+ ## Symptom 4: server-rendered data is missing or is fetched again unexpectedly
148
+
149
+ Typical signs:
150
+
151
+ - the page renders without expected data on the server
152
+ - the client repeats the first data fetch that should have been prepared already
153
+ - loading behavior is different between SSR and client navigation
154
+
155
+ A better default in Zova is:
156
+
157
+ - prepare SSR data through the intended model/controller flow
158
+ - let hydration reuse that prepared state on the client
159
+
160
+ Start with these checks:
161
+
162
+ 1. is the data prepared in the intended SSR lifecycle rather than in an ad hoc client path?
163
+ 2. is the data-loading logic aligned with the model-based SSR flow?
164
+ 3. are you accidentally bypassing the existing hydration reuse path?
165
+
166
+ Read together:
167
+
168
+ - [SSR Init Data](/frontend/ssr-init-data)
169
+ - [Server Data](/frontend/server-data)
170
+ - [Model State Guide](/frontend/model-state-guide)
171
+
172
+ ## Symptom 5: SEO/meta output is missing or inconsistent
173
+
174
+ Typical signs:
175
+
176
+ - page title is wrong after SSR
177
+ - expected meta tags are missing in server-rendered HTML
178
+ - metadata looks correct on the client but not in the initial server response
179
+
180
+ This usually means the metadata is not being produced through the intended SSR-aware path.
181
+
182
+ Start with these checks:
183
+
184
+ 1. are you using `$useMeta` instead of a parallel custom mechanism?
185
+ 2. is the metadata available during SSR rather than only after client boot?
186
+ 3. are multiple metadata layers overwriting each other intentionally or accidentally?
187
+
188
+ Read together:
189
+
190
+ - [SSR SEO Meta](/frontend/ssr-seo-meta)
191
+ - [SSR Architecture Overview](/frontend/ssr-architecture-overview)
192
+
193
+ ## Symptom 6: theme or dark-mode behavior is wrong on first paint
194
+
195
+ Typical signs:
196
+
197
+ - server output uses one theme, then the browser switches to another immediately
198
+ - dark/light SSR output looks unstable
199
+ - the result differs between Web SSR and Admin SSR
200
+
201
+ This area is especially sensitive because SSR theme authority is not identical in every flavor.
202
+
203
+ Start with these checks:
204
+
205
+ 1. are you treating the server’s theme-sensitive read as final browser truth?
206
+ 2. does the active flavor support cookie-backed SSR theme resolution?
207
+ 3. are you applying a Basic-specific theme assumption to a different edition or adapter?
208
+
209
+ Read together:
210
+
211
+ - [SSR Environment Variables](/frontend/ssr-env)
212
+ - [Theme Guide](/frontend/theme-guide)
213
+ - [SSR Architecture Overview](/frontend/ssr-architecture-overview)
214
+
215
+ A practical rule is:
216
+
217
+ - if exact browser theme matching matters, keep the output hydration-tolerant unless the active SSR path provides a stronger server-side guarantee
218
+
219
+ ## Symptom 7: static assets 404 after SSR deploy
220
+
221
+ Typical signs:
222
+
223
+ - HTML response appears, but CSS or JS assets do not load
224
+ - SSR page shell renders without expected styling or scripts
225
+ - built deployment fails while local dev works
226
+
227
+ This usually points to bundle output or deployment-path issues rather than page logic.
228
+
229
+ Start with these checks:
230
+
231
+ 1. was the correct frontend build generated?
232
+ 2. are the expected client assets present for the deployed bundle?
233
+ 3. does the deployment path still match the built asset assumptions?
234
+
235
+ Read together:
236
+
237
+ - [Fullstack Vona + Zova Integration](/fullstack/vona-zova-integration)
238
+ - [Environment and Config Guide](/frontend/environment-config-guide)
239
+ - [SSR Architecture Overview](/frontend/ssr-architecture-overview)
240
+
241
+ ## A safe debugging order
242
+
243
+ When SSR breaks and the failure is unclear, use this order.
244
+
245
+ ### Step 1: identify the first broken stage
246
+
247
+ Ask:
248
+
249
+ - is the request entering the intended SSR site?
250
+ - is the server returning HTML at all?
251
+ - is the HTML already wrong before hydration?
252
+ - does it only go wrong after the browser starts running?
253
+
254
+ ### Step 2: separate server-render problems from hydration problems
255
+
256
+ This split removes a lot of confusion.
257
+
258
+ - if the initial HTML is wrong, focus on SSR entry, route resolution, render, data, or meta
259
+ - if the initial HTML is right but the browser changes it incorrectly, focus on hydration, client-only boundaries, theme authority, or client state reuse
260
+
261
+ ### Step 3: check edition-sensitive assumptions
262
+
263
+ Especially for theme or UI-sensitive work, confirm:
264
+
265
+ - active edition
266
+ - active UI layer
267
+ - whether the rule is shared across editions or adapter-specific
268
+
269
+ ### Step 4: reuse the framework’s intended abstractions
270
+
271
+ Before adding custom fixes, ask whether the framework already provides the right surface:
272
+
273
+ - `ClientOnly` for browser-only UI
274
+ - model/controller SSR init flow for data preparation
275
+ - `$useMeta` for SEO/meta
276
+ - existing theme/env rules for theme-sensitive SSR behavior
277
+
278
+ ## Recommended reading order for troubleshooting
279
+
280
+ Use this path when SSR behavior is wrong and you need to narrow the problem quickly:
281
+
282
+ 1. this page for symptom triage
283
+ 2. [SSR Architecture Overview](/frontend/ssr-architecture-overview)
284
+ 3. [SSR Overview](/frontend/ssr-overview)
285
+ 4. [SSR Init Data](/frontend/ssr-init-data)
286
+ 5. [SSR ClientOnly](/frontend/ssr-client-only)
287
+ 6. [SSR SEO Meta](/frontend/ssr-seo-meta)
288
+ 7. [SSR Environment Variables](/frontend/ssr-env)
289
+ 8. [Theme Guide](/frontend/theme-guide)
290
+ 9. [Fullstack Vona + Zova Integration](/fullstack/vona-zova-integration)
291
+
292
+ ## Implementation checks for SSR troubleshooting
293
+
294
+ Before finalizing an SSR fix, ask:
295
+
296
+ 1. did I identify the failing SSR layer before changing code?
297
+ 2. is this actually a server-render issue, or a hydration issue?
298
+ 3. am I reusing the intended framework abstraction instead of adding a parallel workaround?
299
+ 4. does the fix accidentally assume an edition-specific UI or theme rule is universal?
300
+
301
+ That keeps SSR debugging aligned with the Cabloy fullstack model and reduces one-off fixes that solve only the symptom.
@@ -0,0 +1,295 @@
1
+ # Zova Form Source Reading Map
2
+
3
+ This page is a practical map for contributors and AI workflows that need to read Zova Form source code efficiently.
4
+
5
+ Use this page after [Zova Form Under the Hood](/frontend/zova-form-under-the-hood) when your next question is not the runtime model itself, but which files to read first for a specific form-internals topic.
6
+
7
+ It answers a narrow question:
8
+
9
+ > when I need to understand how Zova Form works internally, which files should I read first, and in what order?
10
+
11
+ Use this page together with:
12
+
13
+ - [Form Guide](/frontend/form-guide)
14
+ - [Zova Form Under the Hood](/frontend/zova-form-under-the-hood)
15
+ - [Zova Source Reading Map](/frontend/zova-source-reading-map)
16
+ - [Behavior Guide](/frontend/behavior-guide)
17
+ - [API Schema Guide](/frontend/api-schema-guide)
18
+ - [Model Resource Owner Pattern](/frontend/model-resource-owner-pattern)
19
+
20
+ > [!TIP]
21
+ > **Zova Form docs path**
22
+ > 1. **[Form Guide](/frontend/form-guide)** — learn the public authoring surface
23
+ > 2. **[Zova Form Under the Hood](/frontend/zova-form-under-the-hood)** — learn how the runtime pieces cooperate
24
+ > 3. **[Zova Form Source Reading Map](/frontend/zova-form-source-reading-map)** — learn which files to read next
25
+ >
26
+ > **You are here:** step 3.
27
+ > **Previous page:** [Zova Form Under the Hood](/frontend/zova-form-under-the-hood).
28
+
29
+ ## Why this page exists
30
+
31
+ The `a-form` module sits at the intersection of several Zova concerns at once:
32
+
33
+ - controller-oriented component design
34
+ - schema-driven rendering
35
+ - Zod and TanStack validation
36
+ - behavior-based field wrapping
37
+ - resource-driven CRUD page integration
38
+
39
+ Because of that, form documentation now has three distinct layers:
40
+
41
+ - [Form Guide](/frontend/form-guide) explains how to author forms
42
+ - [Zova Form Under the Hood](/frontend/zova-form-under-the-hood) explains how the runtime pieces cooperate
43
+ - this page explains which files to read first for each source-reading question
44
+
45
+ Because of that, source reading can become slow for one predictable reason:
46
+
47
+ - you can find one relevant file such as the form controller
48
+ - but you do not yet know the shortest accurate path to the next runtime layer
49
+
50
+ This page gives a compact reading order so you can move from public surface to runtime detail without drifting.
51
+
52
+ ## How to use this page
53
+
54
+ For each topic below:
55
+
56
+ 1. start with the public guide to refresh the architectural intent
57
+ 2. read the first source file to identify the public surface
58
+ 3. continue into the next runtime file only if you still need the implementation detail
59
+ 4. stop as soon as you have enough information for the task
60
+
61
+ The goal is not to read the entire form stack every time. The goal is to choose the shortest correct path.
62
+
63
+ ## 1. Public form surface and wrapper entrypoints
64
+
65
+ Use this path when you are asking questions like:
66
+
67
+ - what is the public Zova Form surface?
68
+ - where do `ZForm` and `ZFormField` enter the runtime?
69
+ - how does `controllerRef` reach the controller instance?
70
+
71
+ ### Read the docs first
72
+
73
+ - [Form Guide](/frontend/form-guide)
74
+ - [Component Guide](/frontend/component-guide)
75
+ - [Reading Zova for Vue Developers](/frontend/reading-zova-for-vue-developers)
76
+
77
+ ### Then read source in this order
78
+
79
+ 1. `zova/src/suite-vendor/a-zova/modules/a-form/src/.metadata/component/form.ts`
80
+ 2. `zova/src/suite-vendor/a-zova/modules/a-form/src/.metadata/component/formField.ts`
81
+ 3. `zova/src/suite-vendor/a-zova/modules/a-form/src/component/form/controller.tsx`
82
+ 4. `zova/src/suite-vendor/a-zova/modules/a-form/src/component/formField/controller.tsx`
83
+ 5. `zova/packages-zova/zova-core/src/composables/useController.ts`
84
+
85
+ ### What each file clarifies
86
+
87
+ - metadata wrapper files show how the public component wrappers enter `useController(...)`
88
+ - `form.ts` exposes `ZForm` and its typed controller-facing props surface
89
+ - `formField.ts` exposes `ZFormField` and the controller-aware slot contract
90
+ - `useController.ts` shows how the controller instance is created and bound to the wrapper component lifecycle
91
+
92
+ ## 2. Form controller ownership and form runtime
93
+
94
+ Use this path when you are asking questions like:
95
+
96
+ - where is the form instance created?
97
+ - where does `formState` come from?
98
+ - how does `submit()` or `reset()` work in Zova Form?
99
+
100
+ ### Read the docs first
101
+
102
+ - [Form Guide](/frontend/form-guide)
103
+ - [Zod Guide](/frontend/zod-guide)
104
+
105
+ ### Then read source in this order
106
+
107
+ 1. `zova/src/suite-vendor/a-zova/modules/a-form/src/component/form/controller.tsx`
108
+ 2. `zova/src/suite-vendor/a-zova/modules/a-form/src/lib/beanControllerFormBase.ts`
109
+ 3. `zova/src/suite-vendor/a-zova/modules/a-form/src/lib/beanControllerPageFormBase.ts`
110
+ 4. `zova/src/suite-vendor/a-zova/modules/a-form/src/types/form.ts`
111
+
112
+ ### What each file clarifies
113
+
114
+ - `component/form/controller.tsx` is the main form runtime owner
115
+ - `beanControllerFormBase.ts` shows the shared `$useForm(...)` wrapper around TanStack Form
116
+ - `beanControllerPageFormBase.ts` shows the page-controller-oriented variant for form pages
117
+ - `types/form.ts` shows the exposed type contracts for submit data, state, and events
118
+
119
+ ## 3. Field controller ownership and field render flow
120
+
121
+ Use this path when you are asking questions like:
122
+
123
+ - how is one field connected to the parent form?
124
+ - where do `setValue(...)` and `handleBlur()` live?
125
+ - how does one field become a rendered vnode?
126
+
127
+ ### Read the docs first
128
+
129
+ - [Form Guide](/frontend/form-guide)
130
+ - [Behavior Guide](/frontend/behavior-guide)
131
+
132
+ ### Then read source in this order
133
+
134
+ 1. `zova/src/suite-vendor/a-zova/modules/a-form/src/component/formField/controller.tsx`
135
+ 2. `zova/src/suite-vendor/a-zova/modules/a-form/src/component/formField/render.tsx`
136
+ 3. `zova/src/suite-vendor/a-zova/modules/a-form/src/types/formField.ts`
137
+ 4. `zova/src/suite-vendor/a-zova/modules/a-form/src/component/formFieldPreset/controller.tsx`
138
+ 5. `zova/src/suite-vendor/a-zova/modules/a-form/src/component/formFieldBlank/controller.tsx`
139
+
140
+ ### What each file clarifies
141
+
142
+ - `formField/controller.tsx` is the field runtime owner and host-injected child of the form controller
143
+ - `formField/render.tsx` shows the final render handoff through behaviors and `zovaJsx.render(...)`
144
+ - `types/formField.ts` shows field options, layout options, render context, and the `$$FieldProps` marker
145
+ - `formFieldPreset/controller.tsx` shows the preset-driven delegation path
146
+ - `formFieldBlank/controller.tsx` shows the free-row slot-only path
147
+
148
+ ## 4. Schema-driven rendering and CEL/JSX resolution
149
+
150
+ Use this path when you are asking questions like:
151
+
152
+ - how does a schema become rendered fields?
153
+ - where do field props come from?
154
+ - how are metadata expressions or render providers resolved?
155
+
156
+ ### Read the docs first
157
+
158
+ - [API Schema Guide](/frontend/api-schema-guide)
159
+ - [Form Guide](/frontend/form-guide)
160
+
161
+ ### Then read source in this order
162
+
163
+ 1. `zova/src/suite-vendor/a-zova/modules/a-form/src/component/form/controller.tsx`
164
+ 2. `zova/src/suite-vendor/a-zova/modules/a-form/src/component/form/render.tsx`
165
+ 3. `zova/src/suite-vendor/a-zova/modules/a-form/src/types/formField.ts`
166
+
167
+ ### What each file clarifies
168
+
169
+ - `form/controller.tsx` shows schema property loading, field CEL scope creation, and top-level field prop extraction
170
+ - `form/render.tsx` shows how schema properties become children when the form body is not manually overridden
171
+ - `types/formField.ts` shows the field render-context shapes that the runtime passes through to renderers and behaviors
172
+
173
+ ## 5. Validation, submit flow, and server error normalization
174
+
175
+ Use this path when you are asking questions like:
176
+
177
+ - where is submit wired?
178
+ - how are form-level and field-level validators chosen?
179
+ - how are server validation errors pushed back into the form state?
180
+
181
+ ### Read the docs first
182
+
183
+ - [Form Guide](/frontend/form-guide)
184
+ - [Zod Guide](/frontend/zod-guide)
185
+
186
+ ### Then read source in this order
187
+
188
+ 1. `zova/src/suite-vendor/a-zova/modules/a-form/src/component/form/controller.tsx`
189
+ 2. `zova/src/suite-vendor/a-zova/modules/a-form/src/component/formField/controller.tsx`
190
+ 3. `zova/src/suite-vendor/a-zova/modules/a-form/src/types/form.ts`
191
+
192
+ ### What each file clarifies
193
+
194
+ - `form/controller.tsx` shows `submit(...)`, `_createForm()`, `onSubmitInvalid`, `onSubmitData`, and error normalization
195
+ - `formField/controller.tsx` shows how field validators are derived from Zod schema or explicit field options
196
+ - `types/form.ts` shows the public event and submit-type contracts that the rest of the framework consumes
197
+
198
+ ## 6. Provider config, default renderers, and behavior-based layout
199
+
200
+ Use this path when you are asking questions like:
201
+
202
+ - where does the default `Input` renderer come from?
203
+ - how does `formProvider` affect field rendering?
204
+ - where do form-field layout behaviors enter the pipeline?
205
+
206
+ ### Read the docs first
207
+
208
+ - [Form Guide](/frontend/form-guide)
209
+ - [Behavior Guide](/frontend/behavior-guide)
210
+
211
+ ### Then read source in this order
212
+
213
+ 1. `zova/src/suite-vendor/a-zova/modules/a-form/src/component/formField/controller.tsx`
214
+ 2. `zova/src/suite/cabloy-basic/modules/basic-adapter/src/config/config.ts`
215
+ 3. `zova/src/suite/a-home/modules/home-login/src/page/login/render.tsx`
216
+ 4. `zova/src/suite-vendor/a-zova/modules/a-form/src/component/formField/render.tsx`
217
+
218
+ ### What each file clarifies
219
+
220
+ - `formField/controller.tsx` shows how field props, layout, options, provider config, and behaviors are merged
221
+ - `basic-adapter/src/config/config.ts` shows the default Basic provider components and layout behaviors
222
+ - `home-login/render.tsx` shows a page-level `formProvider` override for layout behavior
223
+ - `formField/render.tsx` shows how the behavior-wrapped render path leads to the final vnode
224
+
225
+ ## 7. Resource-driven CRUD page integration
226
+
227
+ Use this path when you are asking questions like:
228
+
229
+ - how does a resource page feed schema and data into `ZForm`?
230
+ - where do `formMeta`, `formSchema`, and `formProvider` come from in CRUD pages?
231
+ - how does submit delegate back to resource mutation logic?
232
+
233
+ ### Read the docs first
234
+
235
+ - [Form Guide](/frontend/form-guide)
236
+ - [Model Resource Owner Pattern](/frontend/model-resource-owner-pattern)
237
+ - [Tutorial 2: Create Your First CRUD](/fullstack/tutorial-2-first-crud)
238
+ - [Tutorial 3: Frontend Metadata Sharing](/fullstack/tutorial-3-frontend-metadata-sharing)
239
+
240
+ ### Then read source in this order
241
+
242
+ 1. `zova/src/suite/cabloy-basic/modules/basic-pageentry/src/component/blockPageEntry/controller.tsx`
243
+ 2. `zova/src/suite/cabloy-basic/modules/basic-pageentry/src/component/blockForm/controller.tsx`
244
+ 3. `zova/src/suite-vendor/a-zova/modules/a-form/src/lib/utils.ts`
245
+ 4. `zova/src/suite/cabloy-basic/modules/basic-page/src/component/blockFilter/controller.tsx`
246
+
247
+ ### What each file clarifies
248
+
249
+ - `blockPageEntry/controller.tsx` shows the resource-driven CRUD form orchestration path
250
+ - `blockForm/controller.tsx` shows how a block-level wrapper passes schema/data/provider/meta into `ZForm`
251
+ - `lib/utils.ts` shows the canonical scene-to-form-meta translation helpers
252
+ - `blockFilter/controller.tsx` shows the lighter-weight filter-form branch using the same form module
253
+
254
+ ## 8. Representative specimens to read before editing the framework
255
+
256
+ Use this section when you want one small example before reading the framework internals.
257
+
258
+ ### Read these specimens first
259
+
260
+ 1. `zova/src/suite/a-demo/modules/demo-basic/src/page/toolOne/controller.tsx`
261
+ 2. `zova/src/suite/a-demo/modules/demo-basic/src/page/toolOne/render.tsx`
262
+ 3. `zova/src/suite/a-home/modules/home-login/src/page/login/render.tsx`
263
+
264
+ ### Why these three specimens matter
265
+
266
+ - `toolOne` shows both schema-driven and manual form usage in one page
267
+ - `home-login` shows a real page using presets, blank rows, and provider-level layout override
268
+ - together they give you the public authoring shape before you descend into the form runtime
269
+
270
+ ## 9. A compact reading strategy
271
+
272
+ When in doubt, use this order:
273
+
274
+ 1. [Form Guide](/frontend/form-guide)
275
+ 2. one real usage specimen such as `toolOne` or `home-login`
276
+ 3. the public wrapper metadata under `src/.metadata/component/*.ts`
277
+ 4. `component/form/controller.tsx`
278
+ 5. `component/formField/controller.tsx`
279
+ 6. render beans, types, and integration layers only if you still need more detail
280
+
281
+ That order usually gets you to the answer faster than starting from the deepest runtime files first.
282
+
283
+ ## 10. Final takeaway
284
+
285
+ The fastest way to read Zova Form accurately is not to memorize every file in `a-form`.
286
+
287
+ It is to recognize which question you are asking:
288
+
289
+ - public wrapper question
290
+ - form-runtime question
291
+ - field-render question
292
+ - validation question
293
+ - resource-CRUD integration question
294
+
295
+ Then start from the smallest public file that matches that question and only descend into deeper runtime files as needed.