cabloy 5.1.60 → 5.1.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/hooks/contract-loop-gate.ts +296 -0
- package/.claude/settings.json +16 -0
- package/.claude/skills/cabloy-backend-scaffold/SKILL.md +2 -0
- package/.claude/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +1 -0
- package/.claude/skills/cabloy-contract-loop/SKILL.md +89 -16
- package/.claude/skills/cabloy-contract-loop/references/contract-loop-map.md +102 -14
- package/.claude/skills/cabloy-contract-loop/references/resource-custom-state-pattern.md +4 -0
- package/.claude/skills/cabloy-contract-loop/references/verification-checklist.md +32 -14
- package/.claude/skills/cabloy-domain-planning/SKILL.md +212 -0
- package/.claude/skills/cabloy-frontend-scaffold/SKILL.md +13 -0
- package/.claude/skills/cabloy-frontend-scaffold/references/follow-up-checklist.md +2 -0
- package/.claude/skills/cabloy-module-removal/SKILL.md +144 -0
- package/.claude/skills/cabloy-resource-field-update/SKILL.md +7 -0
- package/.claude/skills/cabloy-zova-source-reading/SKILL.md +221 -0
- package/.claude/skills/cabloy-zova-source-reading/references/analysis-modes.md +91 -0
- package/.claude/skills/cabloy-zova-source-reading/references/core-reading-paths.md +117 -0
- package/CHANGELOG.md +64 -0
- package/CLAUDE.md +11 -0
- package/cabloy-docs/.vitepress/config.mjs +197 -5
- package/cabloy-docs/ai/cli-to-skill-map.md +7 -0
- package/cabloy-docs/ai/docs-skills-rules-mapping.md +22 -0
- package/cabloy-docs/ai/future-skill-roadmap.md +12 -7
- package/cabloy-docs/ai/introduction.md +1 -0
- package/cabloy-docs/ai/playbook-backend-module.md +6 -0
- package/cabloy-docs/ai/playbook-module-removal.md +164 -0
- package/cabloy-docs/ai/skills.md +12 -0
- package/cabloy-docs/backend/backend-contract-emission-output-inspection.md +189 -0
- package/cabloy-docs/backend/backend-contract-emission-source-reading-map.md +160 -0
- package/cabloy-docs/backend/backend-contract-emission-specimen.md +170 -0
- package/cabloy-docs/backend/backend-resource-module-contract-chain.md +323 -0
- package/cabloy-docs/backend/backend-source-reading-debug-checklist.md +173 -0
- package/cabloy-docs/backend/backend-source-reading-roadmap.md +129 -0
- package/cabloy-docs/backend/backend-source-reading-verify-playbook.md +166 -0
- package/cabloy-docs/backend/bean-scene-authoring.md +4 -4
- package/cabloy-docs/backend/broadcast-guide.md +3 -3
- package/cabloy-docs/backend/cli.md +20 -11
- package/cabloy-docs/backend/config-guide.md +4 -4
- package/cabloy-docs/backend/controller-aop-guide.md +10 -10
- package/cabloy-docs/backend/controller-guide.md +12 -2
- package/cabloy-docs/backend/crud-workflow.md +7 -3
- package/cabloy-docs/backend/dto-guide.md +18 -2
- package/cabloy-docs/backend/dto-infer-generation.md +201 -25
- package/cabloy-docs/backend/election-guide.md +2 -2
- package/cabloy-docs/backend/entity-guide.md +30 -3
- package/cabloy-docs/backend/error-guide.md +3 -3
- package/cabloy-docs/backend/event-guide.md +4 -4
- package/cabloy-docs/backend/external-aop-guide.md +2 -2
- package/cabloy-docs/backend/field-indexes.md +9 -3
- package/cabloy-docs/backend/foundation.md +8 -8
- package/cabloy-docs/backend/i18n-guide.md +6 -6
- package/cabloy-docs/backend/internal-aop-guide.md +2 -2
- package/cabloy-docs/backend/introduction.md +15 -0
- package/cabloy-docs/backend/migration-and-changes.md +3 -3
- package/cabloy-docs/backend/model-guide.md +16 -6
- package/cabloy-docs/backend/openapi-guide.md +3 -0
- package/cabloy-docs/backend/queue-guide.md +3 -3
- package/cabloy-docs/backend/redlock-guide.md +2 -2
- package/cabloy-docs/backend/schedule-guide.md +2 -2
- package/cabloy-docs/backend/scripts.md +8 -0
- package/cabloy-docs/backend/serialization-guide.md +12 -2
- package/cabloy-docs/backend/service-guide.md +18 -9
- package/cabloy-docs/backend/startup-guide.md +5 -5
- package/cabloy-docs/backend/status-guide.md +271 -0
- package/cabloy-docs/backend/unit-testing.md +3 -3
- package/cabloy-docs/backend/vona-source-reading-map.md +157 -0
- package/cabloy-docs/backend/websocket-protocol-guide.md +5 -5
- package/cabloy-docs/backend/websocket-usage-guide.md +15 -8
- package/cabloy-docs/frontend/a-model-under-the-hood.md +281 -0
- package/cabloy-docs/frontend/a-openapi-under-the-hood.md +248 -0
- package/cabloy-docs/frontend/a-router-guide.md +307 -0
- package/cabloy-docs/frontend/api-guide.md +6 -4
- package/cabloy-docs/frontend/api-schema-guide.md +1 -0
- package/cabloy-docs/frontend/app-startup-guide.md +7 -4
- package/cabloy-docs/frontend/bean-scene-authoring.md +3 -1
- package/cabloy-docs/frontend/behavior-guide.md +16 -16
- package/cabloy-docs/frontend/cli.md +14 -2
- package/cabloy-docs/frontend/command-scene-authoring.md +504 -0
- package/cabloy-docs/frontend/component-guide.md +5 -5
- package/cabloy-docs/frontend/component-props-guide.md +1 -1
- package/cabloy-docs/frontend/component-v-model-guide.md +2 -2
- package/cabloy-docs/frontend/design-principles.md +6 -0
- package/cabloy-docs/frontend/fetch-interceptor-guide.md +440 -0
- package/cabloy-docs/frontend/filter-query-select-data-flow-guide.md +260 -0
- package/cabloy-docs/frontend/form-guide.md +786 -0
- package/cabloy-docs/frontend/form-scene-to-page-meta-guide.md +303 -0
- package/cabloy-docs/frontend/foundation.md +33 -0
- package/cabloy-docs/frontend/frontend-source-reading-roadmap.md +249 -0
- package/cabloy-docs/frontend/generated-contract-consumption-debug-checklist.md +190 -0
- package/cabloy-docs/frontend/generated-contract-consumption-entry-branch.md +205 -0
- package/cabloy-docs/frontend/generated-contract-consumption-list-branch.md +157 -0
- package/cabloy-docs/frontend/generated-contract-consumption-specimen.md +203 -0
- package/cabloy-docs/frontend/generated-contract-consumption-verify-playbook.md +189 -0
- package/cabloy-docs/frontend/generic-component-guide.md +1 -1
- package/cabloy-docs/frontend/introduction.md +38 -5
- package/cabloy-docs/frontend/ioc-and-beans.md +6 -0
- package/cabloy-docs/frontend/mock-guide.md +1 -0
- package/cabloy-docs/frontend/model-architecture.md +288 -39
- package/cabloy-docs/frontend/model-resource-best-practices.md +379 -0
- package/cabloy-docs/frontend/model-resource-cookbook.md +508 -0
- package/cabloy-docs/frontend/model-resource-internals-deep-dive.md +238 -0
- package/cabloy-docs/frontend/model-resource-owner-pattern.md +402 -0
- package/cabloy-docs/frontend/model-resource-usage-guide.md +334 -0
- package/cabloy-docs/frontend/model-state-guide.md +371 -15
- package/cabloy-docs/frontend/module-scope.md +8 -8
- package/cabloy-docs/frontend/modules-and-suites.md +2 -1
- package/cabloy-docs/frontend/navigation-guards-guide.md +7 -0
- package/cabloy-docs/frontend/openapi-sdk-guide.md +17 -6
- package/cabloy-docs/frontend/page-guide.md +15 -9
- package/cabloy-docs/frontend/page-meta-guide.md +466 -0
- package/cabloy-docs/frontend/page-params-guide.md +3 -3
- package/cabloy-docs/frontend/page-query-guide.md +2 -2
- package/cabloy-docs/frontend/page-route-guide.md +6 -0
- package/cabloy-docs/frontend/permission-formscene-action-visibility-guide.md +263 -0
- package/cabloy-docs/frontend/quickstart.md +18 -2
- package/cabloy-docs/frontend/reading-zova-for-vue-developers.md +266 -0
- package/cabloy-docs/frontend/resource-entry-page-deep-dive.md +271 -0
- package/cabloy-docs/frontend/resource-list-page-deep-dive.md +279 -0
- package/cabloy-docs/frontend/rest-resource-source-reading-map.md +522 -0
- package/cabloy-docs/frontend/rest-resource-under-the-hood.md +622 -0
- package/cabloy-docs/frontend/root-behaviors-guide.md +282 -0
- package/cabloy-docs/frontend/route-alias-guide.md +6 -0
- package/cabloy-docs/frontend/router-stack-guide.md +229 -0
- package/cabloy-docs/frontend/router-tabs-introduction.md +26 -3
- package/cabloy-docs/frontend/router-tabs-layout-integration.md +367 -0
- package/cabloy-docs/frontend/router-tabs-mechanism.md +6 -0
- package/cabloy-docs/frontend/router-tabs-route-meta-cookbook.md +7 -0
- package/cabloy-docs/frontend/router-tabs-vs-stack.md +167 -0
- package/cabloy-docs/frontend/router-view-hosts-guide.md +450 -0
- package/cabloy-docs/frontend/server-data.md +4 -1
- package/cabloy-docs/frontend/system-startup-guide.md +2 -2
- package/cabloy-docs/frontend/table-action-visibility-permission-flow-guide.md +263 -0
- package/cabloy-docs/frontend/table-cell-cookbook.md +568 -0
- package/cabloy-docs/frontend/table-guide.md +373 -0
- package/cabloy-docs/frontend/table-resource-crud-cookbook.md +496 -0
- package/cabloy-docs/frontend/zova-app-guide.md +251 -0
- package/cabloy-docs/frontend/zova-form-source-reading-map.md +293 -0
- package/cabloy-docs/frontend/zova-form-under-the-hood.md +561 -0
- package/cabloy-docs/frontend/zova-reactivity-under-the-hood.md +320 -0
- package/cabloy-docs/frontend/zova-router-under-the-hood.md +561 -0
- package/cabloy-docs/frontend/zova-source-reading-map.md +421 -0
- package/cabloy-docs/frontend/zova-table-controller-render-supplement.md +225 -0
- package/cabloy-docs/frontend/zova-table-source-reading-map.md +317 -0
- package/cabloy-docs/frontend/zova-table-under-the-hood.md +532 -0
- package/cabloy-docs/frontend/zova-vs-vue3-comparison.md +308 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-debug-checklist.md +245 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-source-reading-map.md +139 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-verify-playbook.md +248 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions.md +511 -0
- package/cabloy-docs/fullstack/contract-loop-playbook.md +356 -0
- package/cabloy-docs/fullstack/edition-collaboration-differences.md +6 -0
- package/cabloy-docs/fullstack/frontend-metadata-to-backend.md +199 -23
- package/cabloy-docs/fullstack/introduction.md +15 -1
- package/cabloy-docs/fullstack/openapi-to-sdk.md +135 -11
- package/cabloy-docs/fullstack/suites-and-modules.md +333 -0
- package/cabloy-docs/fullstack/tutorial-1-first-module.md +3 -0
- package/cabloy-docs/fullstack/tutorial-2-first-crud.md +4 -0
- package/cabloy-docs/fullstack/tutorial-3-frontend-metadata-sharing.md +6 -2
- package/cabloy-docs/fullstack/tutorial-4-custom-level-renderers.md +60 -23
- package/cabloy-docs/fullstack/tutorial-5-backend-contract-sharing.md +14 -7
- package/cabloy-docs/fullstack/tutorial-6-one-contract-four-uses.md +6 -0
- package/cabloy-docs/fullstack/tutorials-overview.md +17 -4
- package/cabloy-docs/reference/bean-scene-boilerplates.md +15 -13
- package/cabloy-docs/reference/package-map.md +4 -3
- package/package.json +2 -1
- package/scripts/init.ts +2 -18
- package/scripts/initTestData.ts +25 -0
- package/scripts/upgrade.ts +17 -2
- package/vona/pnpm-lock.yaml +48 -194
- package/vona/src/suite/a-training/modules/training-student/package.json +53 -0
- package/vona/src/suite/a-training/modules/training-student/src/.metadata/index.ts +400 -0
- package/vona/src/suite/a-training/modules/training-student/src/.metadata/locales.ts +18 -0
- package/vona/src/suite/a-training/modules/training-student/src/.metadata/this.ts +2 -0
- package/vona/src/suite/a-training/modules/training-student/src/bean/meta.index.ts +12 -0
- package/vona/src/suite/a-training/modules/training-student/src/bean/meta.version.ts +21 -0
- package/vona/src/suite/a-training/modules/training-student/src/bean/ssrMenu.student.ts +29 -0
- package/vona/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +15 -0
- package/vona/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +15 -0
- package/vona/src/suite/a-training/modules/training-student/src/controller/student.ts +74 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentCreate.tsx +28 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectReq.tsx +44 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectRes.tsx +11 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectResItem.tsx +45 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSummary.tsx +42 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentUpdate.tsx +28 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentView.tsx +25 -0
- package/vona/src/suite/a-training/modules/training-student/src/entity/student.tsx +84 -0
- package/vona/src/suite/a-training/modules/training-student/src/index.ts +2 -0
- package/vona/src/suite/a-training/modules/training-student/src/model/student.ts +10 -0
- package/vona/src/suite/a-training/modules/training-student/src/service/student.ts +57 -0
- package/vona/src/suite/a-training/modules/training-student/test/student.test.ts +173 -0
- package/vona/src/suite/a-training/modules/training-student/tsconfig.build.json +11 -0
- package/vona/src/suite/a-training/modules/training-student/tsconfig.json +7 -0
- package/vona/src/suite/a-training/package.json +12 -0
- package/vona/src/suite/a-training/tsconfig.base.json +4 -0
- package/vona/src/suite/a-training/tsconfig.json +10 -0
- package/zova/packages-cli/cli/package.json +2 -2
- package/zova/packages-cli/cli-set-front/cli/templates/openapi/config/boilerplate/module/openapi.config.ts +6 -1
- package/zova/packages-cli/cli-set-front/package.json +1 -1
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.openapi.generate.ts +34 -4
- package/zova/packages-zova/zova/package.json +2 -2
- package/zova/pnpm-lock.yaml +416 -690
- package/zova/src/suite/a-training/modules/training-student/cli/openapi.config.ts +9 -0
- package/zova/src/suite/a-training/modules/training-student/package.json +52 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/component/formFieldLevel.ts +31 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/index.ts +258 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/locales.ts +7 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/this.ts +2 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/baseURL.ts +5 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/index.ts +3 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/schemas.ts +196 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/types.ts +4146 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/trainingStudent.ts +151 -0
- package/zova/src/suite/a-training/modules/training-student/src/apiSchema/trainingStudent.ts +43 -0
- package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionDeleteForce.tsx +51 -0
- package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionSummary.tsx +56 -0
- package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.level.tsx +63 -0
- package/zova/src/suite/a-training/modules/training-student/src/component/formFieldLevel/controller.tsx +117 -0
- package/zova/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +9 -0
- package/zova/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +9 -0
- package/zova/src/suite/a-training/modules/training-student/src/index.ts +2 -0
- package/zova/src/suite/a-training/modules/training-student/src/model/student.ts +42 -0
- package/zova/src/suite/a-training/modules/training-student/tsconfig.build.json +13 -0
- package/zova/src/suite/a-training/modules/training-student/tsconfig.json +5 -0
- package/zova/src/suite/a-training/package.json +12 -0
- package/zova/src/suite/a-training/tsconfig.base.json +4 -0
- package/zova/src/suite/a-training/tsconfig.json +4 -0
- package/zova/src/suite/cabloy-basic/modules/basic-select/src/component/formFieldSelect/controller.tsx +29 -7
- package/zova/src/suite/cabloy-basic/modules/basic-select/src/component/select/controller.tsx +34 -11
- package/zova/src/suite-vendor/a-zova/modules/a-table/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-table/src/component/table/controller.tsx +3 -3
- package/zova/src/suite-vendor/a-zova/modules/a-table/src/lib/tableCell.ts +1 -1
- package/zova/src/suite-vendor/a-zova/package.json +2 -2
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# Vona Source Reading Map
|
|
2
|
+
|
|
3
|
+
This page is a practical map for contributors and AI workflows that need to read Vona backend source code efficiently.
|
|
4
|
+
|
|
5
|
+
It does not try to teach every backend subsystem from scratch. Instead, it answers a narrower question:
|
|
6
|
+
|
|
7
|
+
> when I need to understand one kind of Vona backend behavior, which files should I read first, and in what order?
|
|
8
|
+
|
|
9
|
+
Use this page together with:
|
|
10
|
+
|
|
11
|
+
- [Backend Source Reading Roadmap](/backend/backend-source-reading-roadmap)
|
|
12
|
+
- [Backend (Vona)](/backend/introduction)
|
|
13
|
+
- [Backend Foundation](/backend/foundation)
|
|
14
|
+
- [Backend CLI](/backend/cli)
|
|
15
|
+
- [Backend Scripts](/backend/scripts)
|
|
16
|
+
- [Controller Guide](/backend/controller-guide)
|
|
17
|
+
- [Service Guide](/backend/service-guide)
|
|
18
|
+
- [Model Guide](/backend/model-guide)
|
|
19
|
+
- [Entity Guide](/backend/entity-guide)
|
|
20
|
+
- [Backend Directory Structure](/reference/backend-directory-structure)
|
|
21
|
+
|
|
22
|
+
## Why this page exists
|
|
23
|
+
|
|
24
|
+
In a framework-sized backend codebase, source reading usually becomes slow for one reason:
|
|
25
|
+
|
|
26
|
+
- you can already find _a_ relevant file
|
|
27
|
+
- but you do not yet know the shortest path to the _next_ file
|
|
28
|
+
|
|
29
|
+
Vona especially benefits from a reading map because several layers cooperate at once:
|
|
30
|
+
|
|
31
|
+
- root scripts and CLI wrappers
|
|
32
|
+
- generated metadata surfaces
|
|
33
|
+
- controller / service / model / entity layering
|
|
34
|
+
- module and suite boundaries
|
|
35
|
+
- project-level backend hooks such as play or build helpers
|
|
36
|
+
|
|
37
|
+
This page gives a compact starting sequence for each common backend topic so readers can move from concept guide to source path without drifting.
|
|
38
|
+
|
|
39
|
+
## How to use this page
|
|
40
|
+
|
|
41
|
+
For each topic below:
|
|
42
|
+
|
|
43
|
+
1. start with the concept guide to refresh the architectural intent
|
|
44
|
+
2. read the first source file to identify the public entry surface
|
|
45
|
+
3. continue into the next runtime file only if you still need the implementation detail
|
|
46
|
+
4. stop as soon as you have enough information for the task
|
|
47
|
+
|
|
48
|
+
The goal is not to read the entire backend tree every time. The goal is to choose the shortest accurate path.
|
|
49
|
+
|
|
50
|
+
## 1. CLI and backend startup entry path
|
|
51
|
+
|
|
52
|
+
Use this path when you are asking questions like:
|
|
53
|
+
|
|
54
|
+
- where does backend execution enter from the repo root?
|
|
55
|
+
- how does `npm run vona` reach the Vona CLI?
|
|
56
|
+
- where does `play` diverge from normal CLI startup?
|
|
57
|
+
- where does the backend build or verification hook surface begin?
|
|
58
|
+
|
|
59
|
+
### Read the docs first
|
|
60
|
+
|
|
61
|
+
- [Backend CLI](/backend/cli)
|
|
62
|
+
- [Backend Scripts](/backend/scripts)
|
|
63
|
+
- [Backend (Vona)](/backend/introduction)
|
|
64
|
+
- [Backend Directory Structure](/reference/backend-directory-structure)
|
|
65
|
+
|
|
66
|
+
### Then read source in this order
|
|
67
|
+
|
|
68
|
+
1. `package.json`
|
|
69
|
+
2. `vona/packages-cli/cli/src/bin/vona.ts`
|
|
70
|
+
3. `vona/packages-cli/cli/src/start.ts`
|
|
71
|
+
4. `vona/src/backend/cli.ts`
|
|
72
|
+
5. `vona/src/backend/play/index.ts`
|
|
73
|
+
|
|
74
|
+
### What each file clarifies
|
|
75
|
+
|
|
76
|
+
- `package.json` shows the root `vona` script and the shared monorepo workflow entrypoint
|
|
77
|
+
- `vona.ts` shows how raw CLI argv is normalized, how `play` is treated specially, and where normal execution hands off to `VonaCommand`
|
|
78
|
+
- `start.ts` shows the CLI bootstrap class itself
|
|
79
|
+
- `src/backend/cli.ts` shows the project-level backend build hook surface
|
|
80
|
+
- `src/backend/play/index.ts` shows the backend playground-oriented verification entrypoint through `mockCtx(...)`
|
|
81
|
+
|
|
82
|
+
## 2. Representative backend resource and module CRUD path
|
|
83
|
+
|
|
84
|
+
Use this path when you are asking questions like:
|
|
85
|
+
|
|
86
|
+
- how is one backend module wired end-to-end?
|
|
87
|
+
- where do controller, service, model, and entity responsibilities separate?
|
|
88
|
+
- where do generated metadata and API path registrations live?
|
|
89
|
+
|
|
90
|
+
### Read the docs first
|
|
91
|
+
|
|
92
|
+
- [Controller Guide](/backend/controller-guide)
|
|
93
|
+
- [Service Guide](/backend/service-guide)
|
|
94
|
+
- [Model Guide](/backend/model-guide)
|
|
95
|
+
- [Entity Guide](/backend/entity-guide)
|
|
96
|
+
- [Backend Directory Structure](/reference/backend-directory-structure)
|
|
97
|
+
|
|
98
|
+
### Then read source in this order
|
|
99
|
+
|
|
100
|
+
1. `vona/src/suite/a-training/modules/training-student/src/index.ts`
|
|
101
|
+
2. `vona/src/suite/a-training/modules/training-student/src/.metadata/index.ts`
|
|
102
|
+
3. `vona/src/suite/a-training/modules/training-student/src/controller/student.ts`
|
|
103
|
+
4. `vona/src/suite/a-training/modules/training-student/src/service/student.ts`
|
|
104
|
+
5. `vona/src/suite/a-training/modules/training-student/src/model/student.ts`
|
|
105
|
+
6. `vona/src/suite/a-training/modules/training-student/src/entity/student.tsx`
|
|
106
|
+
|
|
107
|
+
### What each file clarifies
|
|
108
|
+
|
|
109
|
+
- `index.ts` shows the module export surface and tells you that generated metadata is part of the public reading path
|
|
110
|
+
- `.metadata/index.ts` shows the generated registration surface for entity, model, service, controller, DTO, API path, and scope wiring
|
|
111
|
+
- `controller/student.ts` shows the resource-facing HTTP layer through `@Controller('student')`, `@Resource()`, and CRUD methods delegating to `this.scope.service.student`
|
|
112
|
+
- `service/student.ts` shows the orchestration layer delegating to `this.scope.model.student`
|
|
113
|
+
- `model/student.ts` shows the compact model binding from `@Model(...)` to `EntityStudent`
|
|
114
|
+
- `entity/student.tsx` shows the entity fields plus OpenAPI and Zova render metadata that drive the broader contract loop
|
|
115
|
+
|
|
116
|
+
### When to continue into DTOs
|
|
117
|
+
|
|
118
|
+
If your next question becomes one of these:
|
|
119
|
+
|
|
120
|
+
- what is the request/response DTO shape for this resource?
|
|
121
|
+
- where do the select/view/create/update transport contracts live?
|
|
122
|
+
|
|
123
|
+
then continue into the module DTO files referenced from `.metadata/index.ts`.
|
|
124
|
+
|
|
125
|
+
If your next question is instead about generated registration, onion names, or API path typing, return to `.metadata/index.ts` before reading deeper.
|
|
126
|
+
|
|
127
|
+
If the next question becomes specifically about explicit DTOs, inferred DTO helpers, or how DTO choices surface in generated metadata, continue with [DTO Infer and Generation](/backend/dto-infer-generation).
|
|
128
|
+
|
|
129
|
+
If the next question becomes specifically about how those controller, DTO, and entity surfaces become emitted backend contract, continue with [Backend Contract Emission Source Reading Map](/backend/backend-contract-emission-source-reading-map).
|
|
130
|
+
|
|
131
|
+
## 3. A compact reading strategy
|
|
132
|
+
|
|
133
|
+
When in doubt, use this order:
|
|
134
|
+
|
|
135
|
+
1. read the concept guide first
|
|
136
|
+
2. open the smallest source entrypoint that matches your question
|
|
137
|
+
3. read the generated metadata surface early when the topic spans multiple backend layers
|
|
138
|
+
4. only then descend into controller, service, model, or entity details
|
|
139
|
+
|
|
140
|
+
That order usually gets you to the answer faster than starting from the deepest backend runtime file first.
|
|
141
|
+
|
|
142
|
+
## Where to read next
|
|
143
|
+
|
|
144
|
+
- If you now want a proof-oriented layer-by-layer backend validation workflow, continue with [Backend Source Reading Verify Playbook](/backend/backend-source-reading-verify-playbook).
|
|
145
|
+
- If something already looks wrong and you want symptom-first diagnosis, continue with [Backend Source Reading Debug Checklist](/backend/backend-source-reading-debug-checklist).
|
|
146
|
+
|
|
147
|
+
## Final takeaway
|
|
148
|
+
|
|
149
|
+
The fastest way to read Vona accurately is not to memorize every file under `vona/`.
|
|
150
|
+
|
|
151
|
+
It is to recognize which question you are asking first:
|
|
152
|
+
|
|
153
|
+
- CLI and startup entry question
|
|
154
|
+
- resource and module wiring question
|
|
155
|
+
- DTO and generated-metadata question
|
|
156
|
+
|
|
157
|
+
Then start from the smallest public source surface that matches that question and only descend into deeper files as needed.
|
|
@@ -59,7 +59,7 @@ _:[eventNameOrShortCode, data]
|
|
|
59
59
|
More precisely, the server sends:
|
|
60
60
|
|
|
61
61
|
```typescript
|
|
62
|
-
`${eventPrefix}${JSON.stringify([eventNameInner, data])}
|
|
62
|
+
`${eventPrefix}${JSON.stringify([eventNameInner, data])}`;
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
That means the Web Socket protocol is event-oriented rather than frame-schema-oriented.
|
|
@@ -71,7 +71,7 @@ The event prefix comes from module config:
|
|
|
71
71
|
```typescript
|
|
72
72
|
return {
|
|
73
73
|
eventPrefix: '_:',
|
|
74
|
-
}
|
|
74
|
+
};
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
A practical interpretation is:
|
|
@@ -200,7 +200,7 @@ Representative logical payload:
|
|
|
200
200
|
{
|
|
201
201
|
"i": 1,
|
|
202
202
|
"m": "get",
|
|
203
|
-
"p": "/
|
|
203
|
+
"p": "/training/student/findOne",
|
|
204
204
|
"q": { "id": 3 },
|
|
205
205
|
"h": { "x-demo": "1" }
|
|
206
206
|
}
|
|
@@ -209,7 +209,7 @@ Representative logical payload:
|
|
|
209
209
|
Representative wire packet:
|
|
210
210
|
|
|
211
211
|
```text
|
|
212
|
-
_:["_b",{"i":1,"m":"get","p":"/
|
|
212
|
+
_:["_b",{"i":1,"m":"get","p":"/training/student/findOne","q":{"id":3},"h":{"x-demo":"1"}}]
|
|
213
213
|
```
|
|
214
214
|
|
|
215
215
|
## `sysReady`
|
|
@@ -378,4 +378,4 @@ Use the practical split:
|
|
|
378
378
|
- [Web Socket Guide](/backend/websocket-guide) for architecture
|
|
379
379
|
- [Web Socket Usage Guide](/backend/websocket-usage-guide) for server-side authoring patterns
|
|
380
380
|
- [Web Socket Call Flow](/backend/websocket-call-flow) for source tracing
|
|
381
|
-
- this page for client-visible wire format and built-in protocol fields
|
|
381
|
+
- this page for client-visible wire format and built-in protocol fields
|
|
@@ -54,7 +54,7 @@ Use the Vona CLI to create a namespace bean shell.
|
|
|
54
54
|
Example:
|
|
55
55
|
|
|
56
56
|
```bash
|
|
57
|
-
npm run vona :create:bean socketNamespace chat -- --module=
|
|
57
|
+
npm run vona :create:bean socketNamespace chat -- --module=training-student
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
The generated shape follows the `a-socket` boilerplate pattern.
|
|
@@ -83,8 +83,7 @@ export interface ISocketNamespaceOptionsChatEvents {
|
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
export interface ISocketNamespaceOptionsChat
|
|
87
|
-
extends IDecoratorSocketNamespaceOptions<ISocketNamespaceOptionsChatEvents> {}
|
|
86
|
+
export interface ISocketNamespaceOptionsChat extends IDecoratorSocketNamespaceOptions<ISocketNamespaceOptionsChatEvents> {}
|
|
88
87
|
|
|
89
88
|
@SocketNamespace<ISocketNamespaceOptionsChat>({
|
|
90
89
|
namespace: '/chat',
|
|
@@ -231,14 +230,17 @@ If the behavior belongs to connect or disconnect time, create a `socketConnectio
|
|
|
231
230
|
Example:
|
|
232
231
|
|
|
233
232
|
```bash
|
|
234
|
-
npm run vona :create:bean socketConnection audit -- --module=
|
|
233
|
+
npm run vona :create:bean socketConnection audit -- --module=training-student
|
|
235
234
|
```
|
|
236
235
|
|
|
237
236
|
Representative generated shape:
|
|
238
237
|
|
|
239
238
|
```typescript
|
|
240
239
|
import type { Next } from 'vona';
|
|
241
|
-
import type {
|
|
240
|
+
import type {
|
|
241
|
+
IDecoratorSocketConnectionOptions,
|
|
242
|
+
ISocketConnectionExecute,
|
|
243
|
+
} from 'vona-module-a-socket';
|
|
242
244
|
import type { WebSocket } from 'ws';
|
|
243
245
|
import { BeanBase } from 'vona';
|
|
244
246
|
import { SocketConnection } from 'vona-module-a-socket';
|
|
@@ -273,7 +275,7 @@ If the behavior belongs to inbound socket messages, create a `socketPacket` bean
|
|
|
273
275
|
Example:
|
|
274
276
|
|
|
275
277
|
```bash
|
|
276
|
-
npm run vona :create:bean socketPacket chat -- --module=
|
|
278
|
+
npm run vona :create:bean socketPacket chat -- --module=training-student
|
|
277
279
|
```
|
|
278
280
|
|
|
279
281
|
Representative generated shape:
|
|
@@ -289,7 +291,12 @@ export interface ISocketPacketOptionsChat extends IDecoratorSocketPacketOptions
|
|
|
289
291
|
|
|
290
292
|
@SocketPacket<ISocketPacketOptionsChat>()
|
|
291
293
|
export class SocketPacketChat extends BeanBase implements ISocketPacketExecute {
|
|
292
|
-
async execute(
|
|
294
|
+
async execute(
|
|
295
|
+
_data: any,
|
|
296
|
+
_ws: WebSocket,
|
|
297
|
+
_options: ISocketPacketOptionsChat,
|
|
298
|
+
next: Next,
|
|
299
|
+
): Promise<void> {
|
|
293
300
|
return next();
|
|
294
301
|
}
|
|
295
302
|
}
|
|
@@ -353,4 +360,4 @@ If you need the broader context next, read:
|
|
|
353
360
|
|
|
354
361
|
- [Web Socket Guide](/backend/websocket-guide) for architecture
|
|
355
362
|
- [Web Socket Protocol Guide](/backend/websocket-protocol-guide) for the client-visible wire format
|
|
356
|
-
- [Web Socket Call Flow](/backend/websocket-call-flow) for source tracing and debugging
|
|
363
|
+
- [Web Socket Call Flow](/backend/websocket-call-flow) for source tracing and debugging
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
# Model Runtime Under the Hood
|
|
2
|
+
|
|
3
|
+
This guide explains the lower-level runtime of `a-model` in Zova through the current public Cabloy Basic source.
|
|
4
|
+
|
|
5
|
+
Use this page when you want to understand:
|
|
6
|
+
|
|
7
|
+
- how the model module bootstraps its shared query infrastructure
|
|
8
|
+
- how `$queryClient` becomes available on beans
|
|
9
|
+
- how the model inheritance stack is assembled
|
|
10
|
+
- how query keys are prefixed and normalized
|
|
11
|
+
- how `useQuery`, state helpers, and persister behavior fit together
|
|
12
|
+
- how SSR dehydrate/hydrate and stale-time rules participate in the model runtime
|
|
13
|
+
|
|
14
|
+
## Why this page exists
|
|
15
|
+
|
|
16
|
+
Several existing docs already explain the role and usage of models well:
|
|
17
|
+
|
|
18
|
+
- [Model Architecture](/frontend/model-architecture)
|
|
19
|
+
- [Model State Guide](/frontend/model-state-guide)
|
|
20
|
+
- [Model Resource Owner Pattern](/frontend/model-resource-owner-pattern)
|
|
21
|
+
- [ModelResource Internals Deep Dive](/frontend/model-resource-internals-deep-dive)
|
|
22
|
+
|
|
23
|
+
What those pages do not isolate directly is the lower-level generic `a-model` runtime chain.
|
|
24
|
+
|
|
25
|
+
That is the gap this page fills.
|
|
26
|
+
|
|
27
|
+
## The shortest accurate mental model
|
|
28
|
+
|
|
29
|
+
A practical mental model is:
|
|
30
|
+
|
|
31
|
+
1. `@Model()` registers a model bean on the model scene
|
|
32
|
+
2. the `a-model` module monkey bootstraps a shared `QueryClient`
|
|
33
|
+
3. the monkey injects `$queryClient` onto bean instances
|
|
34
|
+
4. `BeanModelBase` is the public entry into a deeper inheritance stack for query, mutation, state, and persistence behavior
|
|
35
|
+
5. all model query/state operations prefix keys by model identity, and selector-enabled models add selector identity too
|
|
36
|
+
6. `useQuery`, state helpers, and persister behavior cooperate to apply SSR-aware stale/hydration/persistence rules
|
|
37
|
+
|
|
38
|
+
That means the model layer is not only a set of convenience helpers. It is a lower-level shared query/persistence runtime for the frontend.
|
|
39
|
+
|
|
40
|
+
## Source-confirmed reading path
|
|
41
|
+
|
|
42
|
+
When reading this topic, use this order:
|
|
43
|
+
|
|
44
|
+
1. `zova/src/suite-vendor/a-zova/modules/a-model/src/monkey.ts`
|
|
45
|
+
2. `zova/src/suite-vendor/a-zova/modules/a-model/src/service/storage.ts`
|
|
46
|
+
3. `zova/src/suite-vendor/a-zova/modules/a-model/src/bean/bean.modelBase.ts`
|
|
47
|
+
4. `zova/src/suite-vendor/a-zova/modules/a-model/src/bean/bean.model/bean.model.last.ts`
|
|
48
|
+
5. `zova/src/suite-vendor/a-zova/modules/a-model/src/bean/bean.model/bean.model.query.ts`
|
|
49
|
+
6. `zova/src/suite-vendor/a-zova/modules/a-model/src/bean/bean.model/bean.model.useQuery.ts`
|
|
50
|
+
7. `zova/src/suite-vendor/a-zova/modules/a-model/src/bean/bean.model/bean.model.useState.ts`
|
|
51
|
+
8. `zova/src/suite-vendor/a-zova/modules/a-model/src/bean/bean.model/bean.model.persister.ts`
|
|
52
|
+
9. `zova/src/suite-vendor/a-zova/modules/a-model/src/config/config.ts`
|
|
53
|
+
|
|
54
|
+
That order moves from module bootstrapping, to shared query storage, to the public model bean entry, then into identity, query, useQuery, state, persister, and finally default config behavior.
|
|
55
|
+
|
|
56
|
+
## monkey/bootstrap and `QueryClient` wiring
|
|
57
|
+
|
|
58
|
+
The module monkey lives in:
|
|
59
|
+
|
|
60
|
+
```text
|
|
61
|
+
zova/src/suite-vendor/a-zova/modules/a-model/src/monkey.ts
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The source confirms that:
|
|
65
|
+
|
|
66
|
+
- `appInitialize()` creates/initializes shared storage
|
|
67
|
+
- `moduleLoaded()` lets the storage service finish module-level setup
|
|
68
|
+
- `beanInit(...)` defines `$queryClient` on beans
|
|
69
|
+
- `$queryClient` is resolved through `useQueryClient()` and marked raw
|
|
70
|
+
|
|
71
|
+
This is the first important lower-level rule:
|
|
72
|
+
|
|
73
|
+
- the model runtime is bootstrapped at module/app level before higher model helpers are used
|
|
74
|
+
|
|
75
|
+
## `ServiceStorage` and shared query lifecycle
|
|
76
|
+
|
|
77
|
+
The shared query-storage/runtime owner lives in:
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
zova/src/suite-vendor/a-zova/modules/a-model/src/service/storage.ts
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Its main jobs are:
|
|
84
|
+
|
|
85
|
+
- create the shared `QueryClient`
|
|
86
|
+
- create the `QueryCache`
|
|
87
|
+
- install the Vue Query plugin into the app
|
|
88
|
+
- on the server, dehydrate query state after render
|
|
89
|
+
- on the client, hydrate query state during SSR pre-hydration
|
|
90
|
+
- clear the query client after server rendering completes
|
|
91
|
+
|
|
92
|
+
This is the second important lower-level rule:
|
|
93
|
+
|
|
94
|
+
- the model runtime is not only about per-model helper methods
|
|
95
|
+
- it also owns one shared query lifecycle around SSR and client hydration
|
|
96
|
+
|
|
97
|
+
## The public model bean entry and inheritance stack
|
|
98
|
+
|
|
99
|
+
The public bean entry lives in:
|
|
100
|
+
|
|
101
|
+
```text
|
|
102
|
+
zova/src/suite-vendor/a-zova/modules/a-model/src/bean/bean.modelBase.ts
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
It is intentionally thin:
|
|
106
|
+
|
|
107
|
+
- `BeanModelBase extends BeanModelFirst`
|
|
108
|
+
|
|
109
|
+
A key lower-level identity layer appears in:
|
|
110
|
+
|
|
111
|
+
```text
|
|
112
|
+
zova/src/suite-vendor/a-zova/modules/a-model/src/bean/bean.model/bean.model.last.ts
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
This file confirms that:
|
|
116
|
+
|
|
117
|
+
- selector identity is stored on the model when `enableSelector` is on
|
|
118
|
+
- `self` and `scopeSelf` provide access to the effective model bean/runtime scope
|
|
119
|
+
|
|
120
|
+
This is the rule to keep in mind when reading the rest of the runtime:
|
|
121
|
+
|
|
122
|
+
- `BeanModelBase` is the public entry
|
|
123
|
+
- the lower-level behavior is assembled through the internal inheritance chain beneath it
|
|
124
|
+
|
|
125
|
+
## Query-key prefixing and normalization
|
|
126
|
+
|
|
127
|
+
The core query identity logic lives in:
|
|
128
|
+
|
|
129
|
+
```text
|
|
130
|
+
zova/src/suite-vendor/a-zova/modules/a-model/src/bean/bean.model/bean.model.query.ts
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
The most important lower-level rule is `_forceQueryKeyPrefix(...)`.
|
|
134
|
+
|
|
135
|
+
The source confirms that query keys are prefixed with:
|
|
136
|
+
|
|
137
|
+
- bean full name
|
|
138
|
+
- selector, when selector mode is enabled
|
|
139
|
+
|
|
140
|
+
This matters because model query identity is not only whatever the caller typed in `queryKey`.
|
|
141
|
+
|
|
142
|
+
The model runtime namespaces the key automatically.
|
|
143
|
+
|
|
144
|
+
This same layer also owns:
|
|
145
|
+
|
|
146
|
+
- `$setQueryData(...)`
|
|
147
|
+
- `$invalidateQueries(...)`
|
|
148
|
+
- `$refetchQueries(...)`
|
|
149
|
+
- `$queryFind(...)`
|
|
150
|
+
- filter normalization through `$normalizeFilters(...)`
|
|
151
|
+
|
|
152
|
+
That means key prefixing and invalidation are part of the same lower-level runtime layer.
|
|
153
|
+
|
|
154
|
+
## `useQuery` runtime behavior
|
|
155
|
+
|
|
156
|
+
The query wrapper lives in:
|
|
157
|
+
|
|
158
|
+
```text
|
|
159
|
+
zova/src/suite-vendor/a-zova/modules/a-model/src/bean/bean.model/bean.model.useQuery.ts
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
The source confirms that `useQuery` behavior is not passed through untouched.
|
|
163
|
+
|
|
164
|
+
It adds:
|
|
165
|
+
|
|
166
|
+
- prefixed query keys
|
|
167
|
+
- persister integration
|
|
168
|
+
- default error handling
|
|
169
|
+
- SSR-aware stale-time branching
|
|
170
|
+
|
|
171
|
+
The important SSR-aware rule is:
|
|
172
|
+
|
|
173
|
+
- async queries use configured async stale time by default
|
|
174
|
+
- during client SSR pre-hydration, cached SSR data can switch to SSR stale-time behavior
|
|
175
|
+
|
|
176
|
+
That means stale-time behavior is part of the model runtime contract, not only a local query option.
|
|
177
|
+
|
|
178
|
+
## State helper families as one runtime family
|
|
179
|
+
|
|
180
|
+
The state helper layer lives mainly in:
|
|
181
|
+
|
|
182
|
+
```text
|
|
183
|
+
zova/src/suite-vendor/a-zova/modules/a-model/src/bean/bean.model/bean.model.useState.ts
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
This is where the five main state families are exposed:
|
|
187
|
+
|
|
188
|
+
- `data`
|
|
189
|
+
- `mem`
|
|
190
|
+
- `local`
|
|
191
|
+
- `cookie`
|
|
192
|
+
- `db`
|
|
193
|
+
|
|
194
|
+
The important lower-level point is that these are not unrelated helpers.
|
|
195
|
+
|
|
196
|
+
They are one model-owned runtime family built on shared query/persistence identity.
|
|
197
|
+
|
|
198
|
+
A practical reading rule is:
|
|
199
|
+
|
|
200
|
+
- different state families differ in persistence/storage and SSR behavior
|
|
201
|
+
- but they still participate in one model runtime vocabulary and query-key system
|
|
202
|
+
|
|
203
|
+
## Persister storage selection and restore/save/remove behavior
|
|
204
|
+
|
|
205
|
+
The persister layer lives in:
|
|
206
|
+
|
|
207
|
+
```text
|
|
208
|
+
zova/src/suite-vendor/a-zova/modules/a-model/src/bean/bean.model/bean.model.persister.ts
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Its main jobs are:
|
|
212
|
+
|
|
213
|
+
- choose the storage backend
|
|
214
|
+
- compute storage key and prefix
|
|
215
|
+
- apply `buster`
|
|
216
|
+
- apply `maxAge`
|
|
217
|
+
- restore persisted state
|
|
218
|
+
- save persisted state
|
|
219
|
+
- remove persisted state
|
|
220
|
+
- prefix persisted query identity consistently with the model/query runtime
|
|
221
|
+
|
|
222
|
+
The storage options include:
|
|
223
|
+
|
|
224
|
+
- cookie
|
|
225
|
+
- local
|
|
226
|
+
- db
|
|
227
|
+
|
|
228
|
+
This is the clearest lower-level source for understanding why model persistence behavior differs by state family and why restored state still respects model identity.
|
|
229
|
+
|
|
230
|
+
## Default config behavior
|
|
231
|
+
|
|
232
|
+
The default model-runtime config lives in:
|
|
233
|
+
|
|
234
|
+
```text
|
|
235
|
+
zova/src/suite-vendor/a-zova/modules/a-model/src/config/config.ts
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
This file confirms default behavior such as:
|
|
239
|
+
|
|
240
|
+
- query retry/refetch defaults
|
|
241
|
+
- async stale time
|
|
242
|
+
- SSR stale time
|
|
243
|
+
- persistence max-age defaults
|
|
244
|
+
- dehydration rules for sync persister-backed queries
|
|
245
|
+
|
|
246
|
+
This is the place to check when the runtime feels surprising even though your page/model code looks correct.
|
|
247
|
+
|
|
248
|
+
## What this page does not re-explain
|
|
249
|
+
|
|
250
|
+
This page does **not** fully re-explain:
|
|
251
|
+
|
|
252
|
+
- the architectural role of Model -> see [Model Architecture](/frontend/model-architecture)
|
|
253
|
+
- the public helper-family usage -> see [Model State Guide](/frontend/model-state-guide)
|
|
254
|
+
- the resource-owner pattern -> see [Model Resource Owner Pattern](/frontend/model-resource-owner-pattern)
|
|
255
|
+
- the resource-owner internals -> see [ModelResource Internals Deep Dive](/frontend/model-resource-internals-deep-dive)
|
|
256
|
+
|
|
257
|
+
Its job is only to explain the lower-level generic `a-model` runtime.
|
|
258
|
+
|
|
259
|
+
## Where to read next
|
|
260
|
+
|
|
261
|
+
Use these next steps depending on your question:
|
|
262
|
+
|
|
263
|
+
- if you want the architectural role of Model, read [Model Architecture](/frontend/model-architecture)
|
|
264
|
+
- if you want state helper usage, read [Model State Guide](/frontend/model-state-guide)
|
|
265
|
+
- if you want resource-owner patterns built on this runtime, read [Model Resource Owner Pattern](/frontend/model-resource-owner-pattern)
|
|
266
|
+
- if you want the resource-owner itself, read [ModelResource Internals Deep Dive](/frontend/model-resource-internals-deep-dive)
|
|
267
|
+
- if you want the lower OpenAPI/schema substrate beneath some model behavior, read [A-OpenAPI Under the Hood](/frontend/a-openapi-under-the-hood)
|
|
268
|
+
|
|
269
|
+
## Final takeaway
|
|
270
|
+
|
|
271
|
+
The most accurate way to read `a-model` is not as one set of convenience wrappers around TanStack Query.
|
|
272
|
+
|
|
273
|
+
Read it as the lower-level frontend model runtime that:
|
|
274
|
+
|
|
275
|
+
- bootstraps a shared query client
|
|
276
|
+
- injects query access into beans
|
|
277
|
+
- composes model identity and selector-aware query-key namespacing
|
|
278
|
+
- applies persistence and SSR-aware hydration/stale behavior
|
|
279
|
+
- supports higher-level model and resource-owner patterns on top of that lower runtime
|
|
280
|
+
|
|
281
|
+
That is the source-confirmed role of `a-model` in the current Cabloy Basic frontend architecture.
|