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.
Files changed (232) 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/SKILL.md +2 -0
  4. package/.claude/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +1 -0
  5. package/.claude/skills/cabloy-contract-loop/SKILL.md +89 -16
  6. package/.claude/skills/cabloy-contract-loop/references/contract-loop-map.md +102 -14
  7. package/.claude/skills/cabloy-contract-loop/references/resource-custom-state-pattern.md +4 -0
  8. package/.claude/skills/cabloy-contract-loop/references/verification-checklist.md +32 -14
  9. package/.claude/skills/cabloy-domain-planning/SKILL.md +212 -0
  10. package/.claude/skills/cabloy-frontend-scaffold/SKILL.md +13 -0
  11. package/.claude/skills/cabloy-frontend-scaffold/references/follow-up-checklist.md +2 -0
  12. package/.claude/skills/cabloy-module-removal/SKILL.md +144 -0
  13. package/.claude/skills/cabloy-resource-field-update/SKILL.md +7 -0
  14. package/.claude/skills/cabloy-zova-source-reading/SKILL.md +221 -0
  15. package/.claude/skills/cabloy-zova-source-reading/references/analysis-modes.md +91 -0
  16. package/.claude/skills/cabloy-zova-source-reading/references/core-reading-paths.md +117 -0
  17. package/CHANGELOG.md +64 -0
  18. package/CLAUDE.md +11 -0
  19. package/cabloy-docs/.vitepress/config.mjs +197 -5
  20. package/cabloy-docs/ai/cli-to-skill-map.md +7 -0
  21. package/cabloy-docs/ai/docs-skills-rules-mapping.md +22 -0
  22. package/cabloy-docs/ai/future-skill-roadmap.md +12 -7
  23. package/cabloy-docs/ai/introduction.md +1 -0
  24. package/cabloy-docs/ai/playbook-backend-module.md +6 -0
  25. package/cabloy-docs/ai/playbook-module-removal.md +164 -0
  26. package/cabloy-docs/ai/skills.md +12 -0
  27. package/cabloy-docs/backend/backend-contract-emission-output-inspection.md +189 -0
  28. package/cabloy-docs/backend/backend-contract-emission-source-reading-map.md +160 -0
  29. package/cabloy-docs/backend/backend-contract-emission-specimen.md +170 -0
  30. package/cabloy-docs/backend/backend-resource-module-contract-chain.md +323 -0
  31. package/cabloy-docs/backend/backend-source-reading-debug-checklist.md +173 -0
  32. package/cabloy-docs/backend/backend-source-reading-roadmap.md +129 -0
  33. package/cabloy-docs/backend/backend-source-reading-verify-playbook.md +166 -0
  34. package/cabloy-docs/backend/bean-scene-authoring.md +4 -4
  35. package/cabloy-docs/backend/broadcast-guide.md +3 -3
  36. package/cabloy-docs/backend/cli.md +20 -11
  37. package/cabloy-docs/backend/config-guide.md +4 -4
  38. package/cabloy-docs/backend/controller-aop-guide.md +10 -10
  39. package/cabloy-docs/backend/controller-guide.md +12 -2
  40. package/cabloy-docs/backend/crud-workflow.md +7 -3
  41. package/cabloy-docs/backend/dto-guide.md +18 -2
  42. package/cabloy-docs/backend/dto-infer-generation.md +201 -25
  43. package/cabloy-docs/backend/election-guide.md +2 -2
  44. package/cabloy-docs/backend/entity-guide.md +30 -3
  45. package/cabloy-docs/backend/error-guide.md +3 -3
  46. package/cabloy-docs/backend/event-guide.md +4 -4
  47. package/cabloy-docs/backend/external-aop-guide.md +2 -2
  48. package/cabloy-docs/backend/field-indexes.md +9 -3
  49. package/cabloy-docs/backend/foundation.md +8 -8
  50. package/cabloy-docs/backend/i18n-guide.md +6 -6
  51. package/cabloy-docs/backend/internal-aop-guide.md +2 -2
  52. package/cabloy-docs/backend/introduction.md +15 -0
  53. package/cabloy-docs/backend/migration-and-changes.md +3 -3
  54. package/cabloy-docs/backend/model-guide.md +16 -6
  55. package/cabloy-docs/backend/openapi-guide.md +3 -0
  56. package/cabloy-docs/backend/queue-guide.md +3 -3
  57. package/cabloy-docs/backend/redlock-guide.md +2 -2
  58. package/cabloy-docs/backend/schedule-guide.md +2 -2
  59. package/cabloy-docs/backend/scripts.md +8 -0
  60. package/cabloy-docs/backend/serialization-guide.md +12 -2
  61. package/cabloy-docs/backend/service-guide.md +18 -9
  62. package/cabloy-docs/backend/startup-guide.md +5 -5
  63. package/cabloy-docs/backend/status-guide.md +271 -0
  64. package/cabloy-docs/backend/unit-testing.md +3 -3
  65. package/cabloy-docs/backend/vona-source-reading-map.md +157 -0
  66. package/cabloy-docs/backend/websocket-protocol-guide.md +5 -5
  67. package/cabloy-docs/backend/websocket-usage-guide.md +15 -8
  68. package/cabloy-docs/frontend/a-model-under-the-hood.md +281 -0
  69. package/cabloy-docs/frontend/a-openapi-under-the-hood.md +248 -0
  70. package/cabloy-docs/frontend/a-router-guide.md +307 -0
  71. package/cabloy-docs/frontend/api-guide.md +6 -4
  72. package/cabloy-docs/frontend/api-schema-guide.md +1 -0
  73. package/cabloy-docs/frontend/app-startup-guide.md +7 -4
  74. package/cabloy-docs/frontend/bean-scene-authoring.md +3 -1
  75. package/cabloy-docs/frontend/behavior-guide.md +16 -16
  76. package/cabloy-docs/frontend/cli.md +14 -2
  77. package/cabloy-docs/frontend/command-scene-authoring.md +504 -0
  78. package/cabloy-docs/frontend/component-guide.md +5 -5
  79. package/cabloy-docs/frontend/component-props-guide.md +1 -1
  80. package/cabloy-docs/frontend/component-v-model-guide.md +2 -2
  81. package/cabloy-docs/frontend/design-principles.md +6 -0
  82. package/cabloy-docs/frontend/fetch-interceptor-guide.md +440 -0
  83. package/cabloy-docs/frontend/filter-query-select-data-flow-guide.md +260 -0
  84. package/cabloy-docs/frontend/form-guide.md +786 -0
  85. package/cabloy-docs/frontend/form-scene-to-page-meta-guide.md +303 -0
  86. package/cabloy-docs/frontend/foundation.md +33 -0
  87. package/cabloy-docs/frontend/frontend-source-reading-roadmap.md +249 -0
  88. package/cabloy-docs/frontend/generated-contract-consumption-debug-checklist.md +190 -0
  89. package/cabloy-docs/frontend/generated-contract-consumption-entry-branch.md +205 -0
  90. package/cabloy-docs/frontend/generated-contract-consumption-list-branch.md +157 -0
  91. package/cabloy-docs/frontend/generated-contract-consumption-specimen.md +203 -0
  92. package/cabloy-docs/frontend/generated-contract-consumption-verify-playbook.md +189 -0
  93. package/cabloy-docs/frontend/generic-component-guide.md +1 -1
  94. package/cabloy-docs/frontend/introduction.md +38 -5
  95. package/cabloy-docs/frontend/ioc-and-beans.md +6 -0
  96. package/cabloy-docs/frontend/mock-guide.md +1 -0
  97. package/cabloy-docs/frontend/model-architecture.md +288 -39
  98. package/cabloy-docs/frontend/model-resource-best-practices.md +379 -0
  99. package/cabloy-docs/frontend/model-resource-cookbook.md +508 -0
  100. package/cabloy-docs/frontend/model-resource-internals-deep-dive.md +238 -0
  101. package/cabloy-docs/frontend/model-resource-owner-pattern.md +402 -0
  102. package/cabloy-docs/frontend/model-resource-usage-guide.md +334 -0
  103. package/cabloy-docs/frontend/model-state-guide.md +371 -15
  104. package/cabloy-docs/frontend/module-scope.md +8 -8
  105. package/cabloy-docs/frontend/modules-and-suites.md +2 -1
  106. package/cabloy-docs/frontend/navigation-guards-guide.md +7 -0
  107. package/cabloy-docs/frontend/openapi-sdk-guide.md +17 -6
  108. package/cabloy-docs/frontend/page-guide.md +15 -9
  109. package/cabloy-docs/frontend/page-meta-guide.md +466 -0
  110. package/cabloy-docs/frontend/page-params-guide.md +3 -3
  111. package/cabloy-docs/frontend/page-query-guide.md +2 -2
  112. package/cabloy-docs/frontend/page-route-guide.md +6 -0
  113. package/cabloy-docs/frontend/permission-formscene-action-visibility-guide.md +263 -0
  114. package/cabloy-docs/frontend/quickstart.md +18 -2
  115. package/cabloy-docs/frontend/reading-zova-for-vue-developers.md +266 -0
  116. package/cabloy-docs/frontend/resource-entry-page-deep-dive.md +271 -0
  117. package/cabloy-docs/frontend/resource-list-page-deep-dive.md +279 -0
  118. package/cabloy-docs/frontend/rest-resource-source-reading-map.md +522 -0
  119. package/cabloy-docs/frontend/rest-resource-under-the-hood.md +622 -0
  120. package/cabloy-docs/frontend/root-behaviors-guide.md +282 -0
  121. package/cabloy-docs/frontend/route-alias-guide.md +6 -0
  122. package/cabloy-docs/frontend/router-stack-guide.md +229 -0
  123. package/cabloy-docs/frontend/router-tabs-introduction.md +26 -3
  124. package/cabloy-docs/frontend/router-tabs-layout-integration.md +367 -0
  125. package/cabloy-docs/frontend/router-tabs-mechanism.md +6 -0
  126. package/cabloy-docs/frontend/router-tabs-route-meta-cookbook.md +7 -0
  127. package/cabloy-docs/frontend/router-tabs-vs-stack.md +167 -0
  128. package/cabloy-docs/frontend/router-view-hosts-guide.md +450 -0
  129. package/cabloy-docs/frontend/server-data.md +4 -1
  130. package/cabloy-docs/frontend/system-startup-guide.md +2 -2
  131. package/cabloy-docs/frontend/table-action-visibility-permission-flow-guide.md +263 -0
  132. package/cabloy-docs/frontend/table-cell-cookbook.md +568 -0
  133. package/cabloy-docs/frontend/table-guide.md +373 -0
  134. package/cabloy-docs/frontend/table-resource-crud-cookbook.md +496 -0
  135. package/cabloy-docs/frontend/zova-app-guide.md +251 -0
  136. package/cabloy-docs/frontend/zova-form-source-reading-map.md +293 -0
  137. package/cabloy-docs/frontend/zova-form-under-the-hood.md +561 -0
  138. package/cabloy-docs/frontend/zova-reactivity-under-the-hood.md +320 -0
  139. package/cabloy-docs/frontend/zova-router-under-the-hood.md +561 -0
  140. package/cabloy-docs/frontend/zova-source-reading-map.md +421 -0
  141. package/cabloy-docs/frontend/zova-table-controller-render-supplement.md +225 -0
  142. package/cabloy-docs/frontend/zova-table-source-reading-map.md +317 -0
  143. package/cabloy-docs/frontend/zova-table-under-the-hood.md +532 -0
  144. package/cabloy-docs/frontend/zova-vs-vue3-comparison.md +308 -0
  145. package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-debug-checklist.md +245 -0
  146. package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-source-reading-map.md +139 -0
  147. package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-verify-playbook.md +248 -0
  148. package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions.md +511 -0
  149. package/cabloy-docs/fullstack/contract-loop-playbook.md +356 -0
  150. package/cabloy-docs/fullstack/edition-collaboration-differences.md +6 -0
  151. package/cabloy-docs/fullstack/frontend-metadata-to-backend.md +199 -23
  152. package/cabloy-docs/fullstack/introduction.md +15 -1
  153. package/cabloy-docs/fullstack/openapi-to-sdk.md +135 -11
  154. package/cabloy-docs/fullstack/suites-and-modules.md +333 -0
  155. package/cabloy-docs/fullstack/tutorial-1-first-module.md +3 -0
  156. package/cabloy-docs/fullstack/tutorial-2-first-crud.md +4 -0
  157. package/cabloy-docs/fullstack/tutorial-3-frontend-metadata-sharing.md +6 -2
  158. package/cabloy-docs/fullstack/tutorial-4-custom-level-renderers.md +60 -23
  159. package/cabloy-docs/fullstack/tutorial-5-backend-contract-sharing.md +14 -7
  160. package/cabloy-docs/fullstack/tutorial-6-one-contract-four-uses.md +6 -0
  161. package/cabloy-docs/fullstack/tutorials-overview.md +17 -4
  162. package/cabloy-docs/reference/bean-scene-boilerplates.md +15 -13
  163. package/cabloy-docs/reference/package-map.md +4 -3
  164. package/package.json +2 -1
  165. package/scripts/init.ts +2 -18
  166. package/scripts/initTestData.ts +25 -0
  167. package/scripts/upgrade.ts +17 -2
  168. package/vona/pnpm-lock.yaml +48 -194
  169. package/vona/src/suite/a-training/modules/training-student/package.json +53 -0
  170. package/vona/src/suite/a-training/modules/training-student/src/.metadata/index.ts +400 -0
  171. package/vona/src/suite/a-training/modules/training-student/src/.metadata/locales.ts +18 -0
  172. package/vona/src/suite/a-training/modules/training-student/src/.metadata/this.ts +2 -0
  173. package/vona/src/suite/a-training/modules/training-student/src/bean/meta.index.ts +12 -0
  174. package/vona/src/suite/a-training/modules/training-student/src/bean/meta.version.ts +21 -0
  175. package/vona/src/suite/a-training/modules/training-student/src/bean/ssrMenu.student.ts +29 -0
  176. package/vona/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +15 -0
  177. package/vona/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +15 -0
  178. package/vona/src/suite/a-training/modules/training-student/src/controller/student.ts +74 -0
  179. package/vona/src/suite/a-training/modules/training-student/src/dto/studentCreate.tsx +28 -0
  180. package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectReq.tsx +44 -0
  181. package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectRes.tsx +11 -0
  182. package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectResItem.tsx +45 -0
  183. package/vona/src/suite/a-training/modules/training-student/src/dto/studentSummary.tsx +42 -0
  184. package/vona/src/suite/a-training/modules/training-student/src/dto/studentUpdate.tsx +28 -0
  185. package/vona/src/suite/a-training/modules/training-student/src/dto/studentView.tsx +25 -0
  186. package/vona/src/suite/a-training/modules/training-student/src/entity/student.tsx +84 -0
  187. package/vona/src/suite/a-training/modules/training-student/src/index.ts +2 -0
  188. package/vona/src/suite/a-training/modules/training-student/src/model/student.ts +10 -0
  189. package/vona/src/suite/a-training/modules/training-student/src/service/student.ts +57 -0
  190. package/vona/src/suite/a-training/modules/training-student/test/student.test.ts +173 -0
  191. package/vona/src/suite/a-training/modules/training-student/tsconfig.build.json +11 -0
  192. package/vona/src/suite/a-training/modules/training-student/tsconfig.json +7 -0
  193. package/vona/src/suite/a-training/package.json +12 -0
  194. package/vona/src/suite/a-training/tsconfig.base.json +4 -0
  195. package/vona/src/suite/a-training/tsconfig.json +10 -0
  196. package/zova/packages-cli/cli/package.json +2 -2
  197. package/zova/packages-cli/cli-set-front/cli/templates/openapi/config/boilerplate/module/openapi.config.ts +6 -1
  198. package/zova/packages-cli/cli-set-front/package.json +1 -1
  199. package/zova/packages-cli/cli-set-front/src/lib/bean/cli.openapi.generate.ts +34 -4
  200. package/zova/packages-zova/zova/package.json +2 -2
  201. package/zova/pnpm-lock.yaml +416 -690
  202. package/zova/src/suite/a-training/modules/training-student/cli/openapi.config.ts +9 -0
  203. package/zova/src/suite/a-training/modules/training-student/package.json +52 -0
  204. package/zova/src/suite/a-training/modules/training-student/src/.metadata/component/formFieldLevel.ts +31 -0
  205. package/zova/src/suite/a-training/modules/training-student/src/.metadata/index.ts +258 -0
  206. package/zova/src/suite/a-training/modules/training-student/src/.metadata/locales.ts +7 -0
  207. package/zova/src/suite/a-training/modules/training-student/src/.metadata/this.ts +2 -0
  208. package/zova/src/suite/a-training/modules/training-student/src/api/openapi/baseURL.ts +5 -0
  209. package/zova/src/suite/a-training/modules/training-student/src/api/openapi/index.ts +3 -0
  210. package/zova/src/suite/a-training/modules/training-student/src/api/openapi/schemas.ts +196 -0
  211. package/zova/src/suite/a-training/modules/training-student/src/api/openapi/types.ts +4146 -0
  212. package/zova/src/suite/a-training/modules/training-student/src/api/trainingStudent.ts +151 -0
  213. package/zova/src/suite/a-training/modules/training-student/src/apiSchema/trainingStudent.ts +43 -0
  214. package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionDeleteForce.tsx +51 -0
  215. package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionSummary.tsx +56 -0
  216. package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.level.tsx +63 -0
  217. package/zova/src/suite/a-training/modules/training-student/src/component/formFieldLevel/controller.tsx +117 -0
  218. package/zova/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +9 -0
  219. package/zova/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +9 -0
  220. package/zova/src/suite/a-training/modules/training-student/src/index.ts +2 -0
  221. package/zova/src/suite/a-training/modules/training-student/src/model/student.ts +42 -0
  222. package/zova/src/suite/a-training/modules/training-student/tsconfig.build.json +13 -0
  223. package/zova/src/suite/a-training/modules/training-student/tsconfig.json +5 -0
  224. package/zova/src/suite/a-training/package.json +12 -0
  225. package/zova/src/suite/a-training/tsconfig.base.json +4 -0
  226. package/zova/src/suite/a-training/tsconfig.json +4 -0
  227. package/zova/src/suite/cabloy-basic/modules/basic-select/src/component/formFieldSelect/controller.tsx +29 -7
  228. package/zova/src/suite/cabloy-basic/modules/basic-select/src/component/select/controller.tsx +34 -11
  229. package/zova/src/suite-vendor/a-zova/modules/a-table/package.json +1 -1
  230. package/zova/src/suite-vendor/a-zova/modules/a-table/src/component/table/controller.tsx +3 -3
  231. package/zova/src/suite-vendor/a-zova/modules/a-table/src/lib/tableCell.ts +1 -1
  232. package/zova/src/suite-vendor/a-zova/package.json +2 -2
@@ -0,0 +1,561 @@
1
+ # Zova Router Under the Hood
2
+
3
+ This guide explains the source-level runtime path behind Zova Router.
4
+
5
+ Use this page after [Page Route Guide](/frontend/page-route-guide), [A-Router Guide](/frontend/a-router-guide), [Route Alias Guide](/frontend/route-alias-guide), and [Navigation Guards Guide](/frontend/navigation-guards-guide) when you want to move from the public routing surface to the internal cooperation among route registration, router startup, lazy module loading, alias handling, typed params/query parsing, and router-view hosting.
6
+
7
+ If your next question is specifically about empty/tabs/stack routed hosts, continue with [Router View Hosts Guide](/frontend/router-view-hosts-guide). For compact file-order guidance, continue with [Zova Source Reading Map](/frontend/zova-source-reading-map).
8
+
9
+ > [!TIP]
10
+ > **Zova Router docs path**
11
+ >
12
+ > 1. **[Page Route Guide](/frontend/page-route-guide)** — learn the public route-record and layout surface
13
+ > 2. **[A-Router Guide](/frontend/a-router-guide)** — learn what the `a-router` package owns in the runtime
14
+ > 3. **[Route Alias Guide](/frontend/route-alias-guide)** — learn how user-facing aliases fit into modular routing
15
+ > 4. **[Navigation Guards Guide](/frontend/navigation-guards-guide)** — learn where routing policy attaches
16
+ > 5. **[Zova Router Under the Hood](/frontend/zova-router-under-the-hood)** — learn how the runtime pieces cooperate
17
+ > 6. **[Zova Source Reading Map](/frontend/zova-source-reading-map)** — learn which files to read next
18
+ >
19
+ > **You are here:** step 5.
20
+ > **Previous pages:** [Page Route Guide](/frontend/page-route-guide), [A-Router Guide](/frontend/a-router-guide), [Route Alias Guide](/frontend/route-alias-guide), and [Navigation Guards Guide](/frontend/navigation-guards-guide).
21
+ > **Next recommended pages:** [Router View Hosts Guide](/frontend/router-view-hosts-guide) for routed-host behavior, then [Zova Source Reading Map](/frontend/zova-source-reading-map) for compact source-reading paths.
22
+
23
+ ## Router ecosystem map
24
+
25
+ Use this compact map when you want to place this page inside the broader Router documentation set.
26
+
27
+ | Layer | Main question | Primary page |
28
+ | ---------------------- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
29
+ | public routing surface | what does the route record mean? | [Page Route Guide](/frontend/page-route-guide) |
30
+ | route policy | how do aliases and guards change navigation semantics? | [Route Alias Guide](/frontend/route-alias-guide), [Navigation Guards Guide](/frontend/navigation-guards-guide) |
31
+ | core router runtime | how does the route become operational at runtime? | this page |
32
+ | routed host layer | once the route is resolved, which host owns the page instance? | [Router View Hosts Guide](/frontend/router-view-hosts-guide) |
33
+ | tabs vs stack choice | should this routed host behave like a workbench or a linear routed stack? | [Router Tabs vs Stack](/frontend/router-tabs-vs-stack) |
34
+ | stack host meaning | what does the stack host actually own? | [Router Stack Guide](/frontend/router-stack-guide) |
35
+ | tabs workbench meaning | why does the tabs host exist conceptually? | [Router Tabs Introduction](/frontend/router-tabs-introduction), [Router Tabs Overview](/frontend/router-tabs-overview) |
36
+ | tabs model internals | how does the tabs host turn route visits into workspace state? | [Router Tabs Mechanism](/frontend/router-tabs-mechanism) |
37
+ | tabs authoring inputs | how do I produce the intended tabs behavior through route meta? | [Router Tabs Route Meta Cookbook](/frontend/router-tabs-route-meta-cookbook) |
38
+ | compact source paths | which files should I read next? | [Zova Source Reading Map](/frontend/zova-source-reading-map) |
39
+
40
+ ## Why this page exists
41
+
42
+ The public routing docs already explain the authoring surface:
43
+
44
+ - `routes.ts`
45
+ - route `meta`
46
+ - route aliases in global config
47
+ - navigation guards as policy hooks
48
+ - typed params and query through generated schemas
49
+
50
+ What many contributors and AI workflows still want next is the implementation bridge:
51
+
52
+ - where module routes are registered into the router
53
+ - where route config and aliases are merged
54
+ - where app startup makes the router operational
55
+ - where lazy module loading happens during navigation
56
+ - where `$route`, `$params`, and `$query` are pushed onto page controllers
57
+ - where routed pages enter router-view hosts such as empty, tabs, or stack-style shells
58
+ - how those hosts differ once the route is already resolved
59
+
60
+ This page is that bridge.
61
+
62
+ ## The shortest accurate runtime model
63
+
64
+ For a typical Zova page route, the shortest accurate model is:
65
+
66
+ 1. module `routes.ts` declares the page route record
67
+ 2. system startup registers module routes into the shared system router
68
+ 3. route config can merge alias, layout, or other route overrides on top of that declaration
69
+ 4. app startup creates the main router bean, attaches guards, injects Vue Router into the app, and drives first navigation
70
+ 5. navigation guards lazy-load modules and normalize alias or fallback behavior before the route is finalized
71
+ 6. page-controller route state is pushed into `$route`, `$params`, and `$query`
72
+ 7. a router-view host renders the matched page inside the chosen shell and keep-alive strategy
73
+
74
+ That is why Zova Router is not only a thin wrapper around Vue Router. The business-facing runtime is still module-oriented, bean-oriented, and startup-aware.
75
+
76
+ ## A concrete source specimen
77
+
78
+ A small public route table that shows several important route decisions clearly is:
79
+
80
+ ```text
81
+ zova/src/suite/a-demo/modules/demo-basic/src/routes.ts
82
+ ```
83
+
84
+ Representative shape:
85
+
86
+ ```typescript
87
+ export const routes: IModuleRoute[] = [
88
+ { path: 'routeQuery', component: ZPageRouteQuery, meta: { requiresAuth: false } },
89
+ {
90
+ name: 'routeParams',
91
+ path: 'routeParams/:id?',
92
+ component: ZPageRouteParams,
93
+ meta: {
94
+ componentKeyMode: 'nameOnly',
95
+ requiresAuth: false,
96
+ },
97
+ },
98
+ {
99
+ name: 'toolMinimal',
100
+ path: 'toolMinimal',
101
+ component: ZPageToolMinimal,
102
+ meta: {
103
+ layout: 'empty',
104
+ requiresAuth: false,
105
+ },
106
+ },
107
+ ];
108
+ ```
109
+
110
+ What matters here is not only the route strings.
111
+
112
+ What matters is that:
113
+
114
+ - the module declares routes relative to the module boundary by default
115
+ - route `name` controls named routing and typed params/query schema selection
116
+ - route `meta` controls shell-facing behavior such as layout and component reuse strategy
117
+ - the route record is only the first layer; config, guards, startup timing, and router-view hosting still cooperate afterward
118
+
119
+ ## The core source-reading path
120
+
121
+ When you want to trace the full mechanism, read these files in order:
122
+
123
+ 1. `zova/src/suite/a-demo/modules/demo-basic/src/routes.ts`
124
+ 2. `zova/src/suite-vendor/a-zova/modules/a-router/src/bean/sys.router.ts`
125
+ 3. `zova/src/suite-vendor/a-zova/modules/a-router/src/monkeySys.ts`
126
+ 4. `zova/src/suite-vendor/a-zova/modules/a-router/src/monkey.ts`
127
+ 5. `zova/src/suite-vendor/a-zova/modules/a-router/src/service/routerGuards.ts`
128
+ 6. `zova/src/suite-vendor/a-zova/modules/a-router/src/lib/utils.ts`
129
+ 7. `zova/src/suite-vendor/a-zova/modules/a-router/src/lib/routerViewBase.tsx`
130
+
131
+ A compact role map is:
132
+
133
+ - `routes.ts` shows the public authoring surface for page routes
134
+ - `sys.router.ts` owns shared router creation, route registration, alias synthesis, and typed path generation helpers
135
+ - `monkeySys.ts` hooks module loading so newly loaded modules can contribute routes into the system router
136
+ - `monkey.ts` owns app-level router lifecycle, guard/event readiness, page-controller route injection, and SSR/client redirect handling
137
+ - `service/routerGuards.ts` owns lazy module loading during navigation and alias redirection behavior
138
+ - `utils.ts` normalizes canonical route identity and current/page route lookup
139
+ - `routerViewBase.tsx` shows how routed pages enter a Zova router-view host rather than bypassing the bean/controller architecture
140
+
141
+ ## Step-by-step runtime path
142
+
143
+ ### 1. The route record starts in module-local `routes.ts`
144
+
145
+ The public route declaration surface is a module-local file such as:
146
+
147
+ ```text
148
+ zova/src/suite/a-demo/modules/demo-basic/src/routes.ts
149
+ ```
150
+
151
+ The important architectural point is:
152
+
153
+ - **routes are owned by modules, not by one flat global route file**
154
+ - **module-relative paths are the default authoring shape**
155
+
156
+ That is why a route like:
157
+
158
+ ```typescript
159
+ { path: 'toolMinimal', component: ZPageToolMinimal }
160
+ ```
161
+
162
+ later becomes the full page path `/demo/basic/toolMinimal` after module-aware registration.
163
+
164
+ ### 2. The system router is the shared route-table owner
165
+
166
+ The main shared runtime owner is:
167
+
168
+ ```text
169
+ zova/src/suite-vendor/a-zova/modules/a-router/src/bean/sys.router.ts
170
+ ```
171
+
172
+ Inside `SysRouter.__init__()` the system router:
173
+
174
+ - creates the shared Vue Router instance
175
+ - loads route overrides from `sys.config.routes.path`
176
+ - loads route overrides from `sys.config.routes.name`
177
+ - loads legacy routes if present
178
+
179
+ This is one of the most important source-level facts about Zova Router.
180
+
181
+ The route table is not assembled only from static page files. It is the result of cooperation among:
182
+
183
+ - module route records
184
+ - global config routes
185
+ - startup-time module loading
186
+ - alias and layout normalization
187
+
188
+ ### 3. Module loading registers routes during system startup
189
+
190
+ The system-level hook lives in:
191
+
192
+ ```text
193
+ zova/src/suite-vendor/a-zova/modules/a-router/src/monkeySys.ts
194
+ ```
195
+
196
+ The important runtime detail is that `moduleLoading(module)` checks whether the loading module contributes `resource.routes`, then calls `sysRouter._registerRoutes(module)`.
197
+
198
+ That matters because:
199
+
200
+ - route registration belongs to system startup, not only app startup
201
+ - newly loaded modules can extend the route table without hand-editing one giant router file
202
+ - the same architectural split matches the broader startup model explained in [System Startup Guide](/frontend/system-startup-guide)
203
+
204
+ A practical reading takeaway is:
205
+
206
+ - **system startup owns route-table wiring**
207
+ - **app startup later owns router readiness and first navigation**
208
+
209
+ ### 4. Route registration expands module-local records into real router records
210
+
211
+ The most important registration method is:
212
+
213
+ ```text
214
+ SysRouter._registerRoute(...)
215
+ ```
216
+
217
+ Inside that path, the router runtime performs several important transformations.
218
+
219
+ #### Module-relative path expansion
220
+
221
+ If the route is not `meta.absolute === true`, Zova prefixes the module path automatically.
222
+
223
+ That means:
224
+
225
+ - `toolMinimal` in module `demo-basic` becomes `/demo/basic/toolMinimal`
226
+ - named route `routeParams` becomes `demo-basic:routeParams`
227
+
228
+ This is one reason route authoring stays compact while runtime routing stays globally unique.
229
+
230
+ #### Config-route merging
231
+
232
+ Before adding the route, the runtime checks `sys.config.routes.name` or `sys.config.routes.path` and deep-merges the config route on top of the module declaration.
233
+
234
+ That is why alias and route-policy changes belong in config instead of being hand-spread across module route files.
235
+
236
+ Representative config source:
237
+
238
+ ```text
239
+ zova/src/front/config/config/config.ts
240
+ ```
241
+
242
+ Representative shape:
243
+
244
+ ```typescript
245
+ config.routes = {
246
+ path: {
247
+ '/home/indexadmin/dashboard': { alias: '/' },
248
+ '/home/login': { alias: '/login' },
249
+ },
250
+ name: {
251
+ 'demo-todo:item': { alias: '/todo/:id' },
252
+ },
253
+ };
254
+ ```
255
+
256
+ #### Alias synthesis for named routes
257
+
258
+ If a named route has a config alias, Zova also creates an internal `$alias:<name>` route under `/__alias__...`.
259
+
260
+ This detail is important because:
261
+
262
+ - user-facing aliases can stay path-shaped
263
+ - the runtime can still preserve named-route identity and params-aware resolution
264
+ - alias handling remains a router concern instead of leaking into page code
265
+
266
+ #### Layout wrapping
267
+
268
+ If `meta.layout !== false`, the runtime does not register the page component alone.
269
+
270
+ Instead it creates a parent route that resolves the layout component and makes the page route its child.
271
+
272
+ That is why routing in Zova is also an app-shell decision, not only a URL decision.
273
+
274
+ A practical reading takeaway is:
275
+
276
+ - **layout is normalized during route registration, not as an afterthought in page render code**
277
+
278
+ ### 5. Path and name helpers stay module-aware and schema-aware
279
+
280
+ The most visible helper is:
281
+
282
+ ```text
283
+ SysRouter.getPagePath(...)
284
+ ```
285
+
286
+ This helper:
287
+
288
+ - combines params and query into the page path
289
+ - handles locale-specific param normalization
290
+ - can return a relative page path or an absolute URL
291
+
292
+ Zova also exposes named-route resolution through `resolveName(...)`, and both helpers preserve the module-aware naming/path model rather than asking every caller to manually build URLs.
293
+
294
+ That is why the recommended page-navigation surface stays framework-native:
295
+
296
+ - `this.$router.getPagePath(...)`
297
+ - `this.app.$gotoPage(...)`
298
+ - `this.app.$gotoHome(...)`
299
+
300
+ rather than ad hoc string concatenation.
301
+
302
+ ### 6. App startup creates the main router bean and makes it operational
303
+
304
+ The app-level lifecycle owner is:
305
+
306
+ ```text
307
+ zova/src/suite-vendor/a-zova/modules/a-router/src/monkey.ts
308
+ ```
309
+
310
+ The important timing split is:
311
+
312
+ - `appInitialize()` creates the router-guard service and client-side SSR error handling
313
+ - `appInitialized()` emits `a-router:routerGuards` so guard contributors can attach to the main router bean
314
+ - `appReady()` installs the router into Vue and drives first-navigation readiness for SSR or client hydration
315
+ - `appClose()` disposes router-guard listeners
316
+
317
+ This is the second major source-level fact about Zova Router.
318
+
319
+ The router runtime is not considered fully ready merely because route records exist. It also needs:
320
+
321
+ - a router bean instance
322
+ - attached guards
323
+ - SSR/client readiness handling
324
+ - Vue app installation
325
+
326
+ This matches the broader lifecycle model in [App Startup Guide](/frontend/app-startup-guide).
327
+
328
+ ### 7. `a-router:routerGuards` is the main policy extension point
329
+
330
+ The shared extension hook begins with:
331
+
332
+ ```text
333
+ zova/src/suite-vendor/a-zova/modules/a-router/src/bean/bean.routerGuardsBase.ts
334
+ ```
335
+
336
+ This base bean subscribes to the `a-router:routerGuards` event and calls `onRouterGuards(router)`.
337
+
338
+ That means the framework-level guard and app-level guards can both attach through one structured extension point instead of each patching router startup manually.
339
+
340
+ Representative consumers include:
341
+
342
+ - `zova/src/suite-vendor/a-zova/modules/a-router/src/service/routerGuards.ts`
343
+ - `zova/src/suite/a-home/modules/home-base/src/service/routerGuards.ts`
344
+
345
+ The framework service focuses on routing mechanics such as:
346
+
347
+ - lazy module loading
348
+ - alias redirection
349
+ - 404 fallback retry after module loading
350
+ - back/forward notifications for router-view hosts
351
+
352
+ The `home-base` service focuses on application policy such as:
353
+
354
+ - auth enforcement through `meta.requiresAuth`
355
+ - locale initialization through `meta.locale`
356
+
357
+ A practical reading takeaway is:
358
+
359
+ - **routing mechanics and business policy are separated, but they meet on the same guard event surface**
360
+
361
+ ### 8. Lazy module loading happens during navigation, not only before startup
362
+
363
+ The framework guard service lives in:
364
+
365
+ ```text
366
+ zova/src/suite-vendor/a-zova/modules/a-router/src/service/routerGuards.ts
367
+ ```
368
+
369
+ Inside `beforeEach(...)`, the router runtime:
370
+
371
+ 1. identifies the matched route
372
+ 2. checks whether a 404-like match should trigger a module-load retry
373
+ 3. checks whether the route has a configured alias
374
+ 4. forces module loading if the target module exists but is not yet loaded
375
+ 5. retries navigation when module loading completed
376
+
377
+ That is why Zova routing feels module-aware even when the target module was not preloaded.
378
+
379
+ A practical reading takeaway is:
380
+
381
+ - **navigation is part of module activation**
382
+ - **the router guard layer is where lazy route availability becomes real runtime behavior**
383
+
384
+ ### 9. Page controllers receive route state through controller-data hooks
385
+
386
+ The page-controller bridge also lives in:
387
+
388
+ ```text
389
+ zova/src/suite-vendor/a-zova/modules/a-router/src/monkey.ts
390
+ ```
391
+
392
+ The important methods are:
393
+
394
+ - `controllerDataPrepare(...)`
395
+ - `controllerDataInit(...)`
396
+ - `controllerDataUpdate(...)`
397
+ - `_initControllerRoute(...)`
398
+
399
+ This is where page controllers receive and refresh:
400
+
401
+ - `$route`
402
+ - `$routeMatched`
403
+ - `$params`
404
+ - `$query`
405
+
406
+ This is one of the biggest architectural differences a Vue-first reader notices.
407
+
408
+ The page controller does not pull everything locally through one composable first. Zova also pushes route-aware page state into the controller lifecycle.
409
+
410
+ ### 10. Typed params and query come from generated page schemas
411
+
412
+ When `_initControllerRoute(...)` updates a page controller, it resolves the route’s canonical identity and then loads page schemas from the owning module resource:
413
+
414
+ - `pageNameSchemas` for named routes
415
+ - `pagePathSchemas` for path-keyed routes
416
+
417
+ Those schema records are generated into module metadata.
418
+
419
+ Representative generator source:
420
+
421
+ ```text
422
+ zova/src/suite-vendor/a-zova/modules/a-bean/cli/controller/metadata/generateMetaPage.ts
423
+ ```
424
+
425
+ Representative generated output:
426
+
427
+ ```text
428
+ zova/src/suite/a-demo/modules/demo-basic/src/.metadata/index.ts
429
+ ```
430
+
431
+ That means typed routing in Zova is not only a TypeScript declaration convenience.
432
+
433
+ It is also a runtime parse step:
434
+
435
+ - route params and query are parsed by schema
436
+ - controller `$params` and `$query` receive parsed values
437
+ - on the client, those objects are kept reactive through `shallowReactive(...)`
438
+
439
+ A practical reading takeaway is:
440
+
441
+ - **typed routing is generated and runtime-parsed, not just editor-only typing**
442
+
443
+ ### 11. Beans receive router helpers through the router monkey
444
+
445
+ The same router monkey also defines bean-level helper surfaces such as:
446
+
447
+ - `$router`
448
+ - `$routerView`
449
+ - `$pageRoute`
450
+ - `$currentRoute`
451
+
452
+ That matters because route-aware behavior is not isolated to page controllers alone.
453
+
454
+ Router-view controllers, services, models, and other beans can participate through the same bean-oriented access pattern.
455
+
456
+ ## 12. Router-view hosting stays inside the controller/bean architecture
457
+
458
+ The shared router-view base lives in:
459
+
460
+ ```text
461
+ zova/src/suite-vendor/a-zova/modules/a-router/src/lib/routerViewBase.tsx
462
+ ```
463
+
464
+ This base controller:
465
+
466
+ - registers itself on the host bean scope as `$$routerView`
467
+ - registers and deregisters itself with `$router`
468
+ - wraps routed pages in `RouterView`
469
+ - prepares route meta for routed pages
470
+ - controls keep-alive inclusion through the host implementation
471
+ - injects the current page route into the routed vnode through host providers
472
+
473
+ This is the third major source-level fact about Zova Router.
474
+
475
+ Routed pages do not bypass Zova and fall directly into a plain Vue Router surface. They still enter through a controller-oriented router-view host.
476
+
477
+ ### Empty host vs richer hosts
478
+
479
+ A minimal host exists in:
480
+
481
+ ```text
482
+ zova/src/suite-vendor/a-zova/modules/a-router/src/component/routerViewEmpty/controller.tsx
483
+ ```
484
+
485
+ That host renders the routed page directly and only injects the current page route provider.
486
+
487
+ Richer hosts extend the same base in modules such as:
488
+
489
+ - `a-routertabs`
490
+ - `a-routerstack`
491
+
492
+ For example, the tabs host delegates route meta, keep-alive, and page-meta updates to the tabs model so one routing runtime can support more than one shell behavior.
493
+
494
+ A practical reading takeaway is:
495
+
496
+ - **router-view hosting is an extension point, not only one hard-coded component**
497
+
498
+ ## 13. SSR and redirect behavior are also part of router runtime
499
+
500
+ The router runtime also owns several SSR-sensitive behaviors.
501
+
502
+ In `monkeySys.ts`, `app.$redirect(...)` and `app.$gotoPage(...)` cooperate with SSR redirects by throwing an SSR-aware error when necessary.
503
+
504
+ In `monkey.ts`, SSR/client startup handles:
505
+
506
+ - server-side initial `push(...)` and `isReady()`
507
+ - client pre-hydration history alignment
508
+ - client redirect/error normalization for 301, 302, 401, and component-unmounted cases
509
+
510
+ That means router behavior in Zova is not purely a client SPA concern. It is also part of the SSR-ready frontend runtime.
511
+
512
+ ## A practical reading order for source readers
513
+
514
+ If you want the shortest path from route authoring to runtime understanding, use this order:
515
+
516
+ 1. [Page Route Guide](/frontend/page-route-guide)
517
+ 2. [Route Alias Guide](/frontend/route-alias-guide)
518
+ 3. [Navigation Guards Guide](/frontend/navigation-guards-guide)
519
+ 4. `zova/src/suite/a-demo/modules/demo-basic/src/routes.ts`
520
+ 5. `zova/src/suite-vendor/a-zova/modules/a-router/src/bean/sys.router.ts`
521
+ 6. `zova/src/suite-vendor/a-zova/modules/a-router/src/monkeySys.ts`
522
+ 7. `zova/src/suite-vendor/a-zova/modules/a-router/src/monkey.ts`
523
+ 8. `zova/src/suite-vendor/a-zova/modules/a-router/src/service/routerGuards.ts`
524
+ 9. `zova/src/suite-vendor/a-zova/modules/a-router/src/lib/routerViewBase.tsx`
525
+ 10. [Zova Source Reading Map](/frontend/zova-source-reading-map)
526
+
527
+ ## Common mistakes to avoid
528
+
529
+ ### Mistake 1: “The route table is just one static Vue Router config”
530
+
531
+ Usually the better model is that route records are module-owned, system-registered, config-merged, and sometimes lazy-loaded during navigation.
532
+
533
+ ### Mistake 2: “Aliases are just convenience string rewrites”
534
+
535
+ In Zova, aliases still participate in module-aware route identity, named-route resolution, and guard-time lazy loading.
536
+
537
+ ### Mistake 3: “Typed params/query are only TypeScript sugar”
538
+
539
+ The generated schemas are also used at runtime to parse route params and query before page controllers consume them.
540
+
541
+ ### Mistake 4: “Page controllers should always pull route state manually”
542
+
543
+ Zova also pushes route-aware state into page controllers through controller-data hooks so the page controller surface stays cohesive.
544
+
545
+ ### Mistake 5: “RouterView is only a plain shellless Vue concern”
546
+
547
+ In Zova, router-view hosting is part of the controller/bean architecture and can be extended into empty, tabs, or stack-style route hosts.
548
+
549
+ ## Edition note
550
+
551
+ This guide explains the shared Zova Router architecture, not one UI-library-specific router shell.
552
+
553
+ That means the routing runtime model applies across Cabloy Basic and Cabloy Start. However, shell-level presentation and layout integrations can still diverge when the task becomes UI-sensitive or edition-specific.
554
+
555
+ In the current public framework repository, the active edition is Cabloy Basic.
556
+
557
+ ## Final takeaway
558
+
559
+ If [Page Route Guide](/frontend/page-route-guide) explains what a route means in Zova, this page explains how that route becomes a running router-aware page through system startup, app startup, guard hooks, generated schemas, and router-view hosting.
560
+
561
+ That is the mental bridge that makes the Zova Router source tree much easier to read.