cabloy 5.1.50 → 5.1.51

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 (260) hide show
  1. package/.claude/skills/cabloy-backend-scaffold/SKILL.md +207 -0
  2. package/.claude/skills/cabloy-backend-scaffold/evals/evals.json +29 -0
  3. package/.claude/skills/cabloy-backend-scaffold/references/backend-thread-map.md +52 -0
  4. package/.claude/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +39 -0
  5. package/.claude/skills/cabloy-contract-loop/SKILL.md +201 -0
  6. package/.claude/skills/cabloy-contract-loop/evals/evals.json +29 -0
  7. package/.claude/skills/cabloy-contract-loop/references/contract-loop-map.md +47 -0
  8. package/.claude/skills/cabloy-contract-loop/references/verification-checklist.md +32 -0
  9. package/.claude/skills/cabloy-frontend-scaffold/SKILL.md +230 -0
  10. package/.claude/skills/cabloy-frontend-scaffold/evals/evals.json +35 -0
  11. package/.claude/skills/cabloy-frontend-scaffold/references/follow-up-checklist.md +41 -0
  12. package/.claude/skills/cabloy-frontend-scaffold/references/frontend-thread-map.md +54 -0
  13. package/.claude/skills/cabloy-workflow/SKILL.md +288 -0
  14. package/.claude/skills/cabloy-workflow/evals/evals.json +35 -0
  15. package/.claude/skills/cabloy-workflow/references/cli-strategy.md +39 -0
  16. package/.claude/skills/cabloy-workflow/references/edition-detection.md +29 -0
  17. package/.github/workflows/docs-pages.yml +54 -0
  18. package/.gitignore +1 -0
  19. package/CHANGELOG.md +29 -0
  20. package/CLAUDE.md +59 -0
  21. package/README.md +137 -0
  22. package/cabloy-docs/.vitepress/config.mjs +222 -0
  23. package/cabloy-docs/.vitepress/public/CNAME +1 -0
  24. package/cabloy-docs/.vitepress/theme/custom.css +64 -0
  25. package/cabloy-docs/.vitepress/theme/edition-badges.md +5 -0
  26. package/cabloy-docs/.vitepress/theme/index.js +5 -0
  27. package/cabloy-docs/ai/class-placement-rule.md +138 -0
  28. package/cabloy-docs/ai/cli-for-agents.md +56 -0
  29. package/cabloy-docs/ai/cli-to-skill-map.md +165 -0
  30. package/cabloy-docs/ai/docs-skills-rules-mapping.md +167 -0
  31. package/cabloy-docs/ai/edition-detection.md +30 -0
  32. package/cabloy-docs/ai/future-skill-roadmap.md +135 -0
  33. package/cabloy-docs/ai/global-bean-lookup.md +157 -0
  34. package/cabloy-docs/ai/introduction.md +62 -0
  35. package/cabloy-docs/ai/playbook-backend-module.md +111 -0
  36. package/cabloy-docs/ai/playbook-contract-regeneration.md +100 -0
  37. package/cabloy-docs/ai/playbook-frontend-page.md +99 -0
  38. package/cabloy-docs/ai/playbook-metadata-refresh.md +67 -0
  39. package/cabloy-docs/ai/repo-guidance.md +58 -0
  40. package/cabloy-docs/ai/rules-and-config.md +29 -0
  41. package/cabloy-docs/ai/skills.md +35 -0
  42. package/cabloy-docs/ai/verification.md +30 -0
  43. package/cabloy-docs/backend/aop-overview.md +128 -0
  44. package/cabloy-docs/backend/auth-guide.md +151 -0
  45. package/cabloy-docs/backend/backend-essentials.md +128 -0
  46. package/cabloy-docs/backend/broadcast-guide.md +138 -0
  47. package/cabloy-docs/backend/cache-guide.md +70 -0
  48. package/cabloy-docs/backend/captcha-guide.md +162 -0
  49. package/cabloy-docs/backend/cli.md +173 -0
  50. package/cabloy-docs/backend/config-guide.md +249 -0
  51. package/cabloy-docs/backend/controller-aop-guide.md +270 -0
  52. package/cabloy-docs/backend/controller-guide.md +347 -0
  53. package/cabloy-docs/backend/crud-workflow.md +118 -0
  54. package/cabloy-docs/backend/dto-guide.md +161 -0
  55. package/cabloy-docs/backend/dto-infer-generation.md +153 -0
  56. package/cabloy-docs/backend/dynamic-datasource-guide.md +70 -0
  57. package/cabloy-docs/backend/election-guide.md +141 -0
  58. package/cabloy-docs/backend/entity-guide.md +150 -0
  59. package/cabloy-docs/backend/error-guide.md +108 -0
  60. package/cabloy-docs/backend/event-guide.md +183 -0
  61. package/cabloy-docs/backend/external-aop-guide.md +149 -0
  62. package/cabloy-docs/backend/field-indexes.md +79 -0
  63. package/cabloy-docs/backend/foundation.md +281 -0
  64. package/cabloy-docs/backend/i18n-guide.md +211 -0
  65. package/cabloy-docs/backend/internal-aop-guide.md +181 -0
  66. package/cabloy-docs/backend/introduction.md +95 -0
  67. package/cabloy-docs/backend/jwt-guide.md +276 -0
  68. package/cabloy-docs/backend/logger-guide.md +223 -0
  69. package/cabloy-docs/backend/mail-guide.md +189 -0
  70. package/cabloy-docs/backend/menu-guide.md +80 -0
  71. package/cabloy-docs/backend/migration-and-changes.md +192 -0
  72. package/cabloy-docs/backend/model-guide.md +274 -0
  73. package/cabloy-docs/backend/multi-database-datasource.md +171 -0
  74. package/cabloy-docs/backend/multi-instance-and-instance-resolution.md +196 -0
  75. package/cabloy-docs/backend/openapi-guide.md +118 -0
  76. package/cabloy-docs/backend/orm-aggregate-group-guide.md +210 -0
  77. package/cabloy-docs/backend/orm-configuration-guide.md +165 -0
  78. package/cabloy-docs/backend/orm-guide.md +109 -0
  79. package/cabloy-docs/backend/orm-mutation-guide.md +195 -0
  80. package/cabloy-docs/backend/orm-select-guide.md +243 -0
  81. package/cabloy-docs/backend/queue-guide.md +271 -0
  82. package/cabloy-docs/backend/quickstart.md +141 -0
  83. package/cabloy-docs/backend/redis-guide.md +70 -0
  84. package/cabloy-docs/backend/redlock-guide.md +60 -0
  85. package/cabloy-docs/backend/relations-guide.md +250 -0
  86. package/cabloy-docs/backend/runtime-and-flavors.md +304 -0
  87. package/cabloy-docs/backend/schedule-guide.md +81 -0
  88. package/cabloy-docs/backend/scripts.md +116 -0
  89. package/cabloy-docs/backend/serialization-guide.md +192 -0
  90. package/cabloy-docs/backend/service-guide.md +166 -0
  91. package/cabloy-docs/backend/sharding-guide.md +49 -0
  92. package/cabloy-docs/backend/startup-guide.md +326 -0
  93. package/cabloy-docs/backend/transaction-guide.md +82 -0
  94. package/cabloy-docs/backend/unit-testing.md +209 -0
  95. package/cabloy-docs/backend/upload-guide.md +160 -0
  96. package/cabloy-docs/backend/user-access-guide.md +157 -0
  97. package/cabloy-docs/backend/validation-guide.md +80 -0
  98. package/cabloy-docs/backend/worker-guide.md +59 -0
  99. package/cabloy-docs/editions/cabloy-basic.md +25 -0
  100. package/cabloy-docs/editions/cabloy-start.md +24 -0
  101. package/cabloy-docs/editions/detection.md +31 -0
  102. package/cabloy-docs/editions/overview.md +44 -0
  103. package/cabloy-docs/frontend/api-guide.md +93 -0
  104. package/cabloy-docs/frontend/api-schema-guide.md +43 -0
  105. package/cabloy-docs/frontend/app-startup-guide.md +185 -0
  106. package/cabloy-docs/frontend/cli.md +78 -0
  107. package/cabloy-docs/frontend/component-guide.md +105 -0
  108. package/cabloy-docs/frontend/component-props-guide.md +97 -0
  109. package/cabloy-docs/frontend/component-v-model-guide.md +110 -0
  110. package/cabloy-docs/frontend/css-in-js-guide.md +151 -0
  111. package/cabloy-docs/frontend/design-principles.md +55 -0
  112. package/cabloy-docs/frontend/environment-config-guide.md +250 -0
  113. package/cabloy-docs/frontend/foundation.md +57 -0
  114. package/cabloy-docs/frontend/generic-component-guide.md +35 -0
  115. package/cabloy-docs/frontend/icon-engine-guide.md +88 -0
  116. package/cabloy-docs/frontend/introduction.md +32 -0
  117. package/cabloy-docs/frontend/ioc-and-beans.md +211 -0
  118. package/cabloy-docs/frontend/mock-guide.md +109 -0
  119. package/cabloy-docs/frontend/model-architecture.md +87 -0
  120. package/cabloy-docs/frontend/model-state-guide.md +70 -0
  121. package/cabloy-docs/frontend/module-scope.md +168 -0
  122. package/cabloy-docs/frontend/modules-and-suites.md +179 -0
  123. package/cabloy-docs/frontend/navigation-guards-guide.md +68 -0
  124. package/cabloy-docs/frontend/openapi-sdk-guide.md +102 -0
  125. package/cabloy-docs/frontend/page-guide.md +223 -0
  126. package/cabloy-docs/frontend/page-params-guide.md +87 -0
  127. package/cabloy-docs/frontend/page-query-guide.md +96 -0
  128. package/cabloy-docs/frontend/page-route-guide.md +147 -0
  129. package/cabloy-docs/frontend/quickstart.md +201 -0
  130. package/cabloy-docs/frontend/route-alias-guide.md +61 -0
  131. package/cabloy-docs/frontend/scripts.md +86 -0
  132. package/cabloy-docs/frontend/sdk-guide.md +45 -0
  133. package/cabloy-docs/frontend/server-data.md +74 -0
  134. package/cabloy-docs/frontend/ssr-client-only.md +40 -0
  135. package/cabloy-docs/frontend/ssr-env.md +51 -0
  136. package/cabloy-docs/frontend/ssr-init-data.md +46 -0
  137. package/cabloy-docs/frontend/ssr-overview.md +48 -0
  138. package/cabloy-docs/frontend/ssr-seo-meta.md +52 -0
  139. package/cabloy-docs/frontend/system-startup-guide.md +186 -0
  140. package/cabloy-docs/frontend/theme-guide.md +154 -0
  141. package/cabloy-docs/frontend/zod-guide.md +161 -0
  142. package/cabloy-docs/fullstack/edition-collaboration-differences.md +61 -0
  143. package/cabloy-docs/fullstack/frontend-metadata-to-backend.md +64 -0
  144. package/cabloy-docs/fullstack/introduction.md +69 -0
  145. package/cabloy-docs/fullstack/openapi-to-sdk.md +116 -0
  146. package/cabloy-docs/fullstack/quickstart.md +86 -0
  147. package/cabloy-docs/fullstack/vona-zova-integration.md +86 -0
  148. package/cabloy-docs/index.md +73 -0
  149. package/cabloy-docs/package.json +16 -0
  150. package/cabloy-docs/pnpm-lock.yaml +1607 -0
  151. package/cabloy-docs/reference/backend-directory-structure.md +88 -0
  152. package/cabloy-docs/reference/cli-reference.md +49 -0
  153. package/cabloy-docs/reference/glossary.md +38 -0
  154. package/cabloy-docs/reference/package-map.md +105 -0
  155. package/cabloy-docs/reference/repo-scripts.md +36 -0
  156. package/package.json +4 -1
  157. package/scripts/init.ts +12 -0
  158. package/scripts/upgrade.ts +31 -3
  159. package/vona/README.md +3 -3
  160. package/vona/README.zh-CN.md +4 -4
  161. package/vona/packages-vona/vona/package.json +1 -1
  162. package/vona/src/suite-vendor/a-cabloy/modules/a-datasharding/package.json +1 -1
  163. package/vona/src/suite-vendor/a-cabloy/modules/a-datasharding/src/bean/summerCache.datasourceWrite.ts +2 -2
  164. package/vona/src/suite-vendor/a-cabloy/package.json +1 -1
  165. package/vona/src/suite-vendor/a-captcha/modules/a-captcha/package.json +1 -1
  166. package/vona/src/suite-vendor/a-captcha/modules/a-captcha/src/bean/cacheRedis.captcha.ts +2 -2
  167. package/vona/src/suite-vendor/a-captcha/package.json +1 -1
  168. package/vona/src/suite-vendor/a-vona/modules/a-bean/cli/bean/metadata/generate.ts +5 -6
  169. package/vona/src/suite-vendor/a-vona/modules/a-bean/package.json +1 -1
  170. package/vona/src/suite-vendor/a-vona/modules/a-cache/cli/cacheMem/boilerplate/{{sceneName}}.{{beanName}}.ts_ +2 -2
  171. package/vona/src/suite-vendor/a-vona/modules/a-cache/cli/cacheRedis/boilerplate/{{sceneName}}.{{beanName}}.ts_ +2 -2
  172. package/vona/src/suite-vendor/a-vona/modules/a-cache/package.json +1 -1
  173. package/vona/src/suite-vendor/a-vona/modules/a-cache/src/.metadata/index.ts +13 -2
  174. package/vona/src/suite-vendor/a-vona/modules/a-cache/src/bean/bean.cache.ts +6 -7
  175. package/vona/src/suite-vendor/a-vona/modules/a-cache/src/{bean/bean.cacheMemBase.ts → service/cacheMemBase_.ts} +3 -3
  176. package/vona/src/suite-vendor/a-vona/modules/a-cache/src/{bean/bean.cacheRedisBase.ts → service/cacheRedisBase_.ts} +3 -3
  177. package/vona/src/suite-vendor/a-vona/modules/a-mailconfirm/package.json +1 -1
  178. package/vona/src/suite-vendor/a-vona/modules/a-mailconfirm/src/bean/cacheRedis.emailConfirm.ts +2 -2
  179. package/vona/src/suite-vendor/a-vona/modules/a-mailconfirm/src/bean/cacheRedis.passwordReset.ts +2 -2
  180. package/vona/src/suite-vendor/a-vona/modules/a-openapi/package.json +1 -1
  181. package/vona/src/suite-vendor/a-vona/modules/a-openapi/src/bean/summerCache.json.ts +2 -2
  182. package/vona/src/suite-vendor/a-vona/modules/a-orm/cli/databaseDialect/boilerplate/{{sceneName}}.{{beanName}}.ts_ +2 -2
  183. package/vona/src/suite-vendor/a-vona/modules/a-orm/package.json +1 -1
  184. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/.metadata/index.ts +4 -3
  185. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/bean/bean.database.ts +3 -3
  186. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/bean/bean.model.ts +1 -1
  187. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/bean/schedule.softDeletionPrune.ts +1 -1
  188. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/common/utils.ts +1 -1
  189. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/index.ts +1 -1
  190. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_cache.ts +1 -1
  191. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_meta.ts +1 -1
  192. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.modelBase.ts +0 -5
  193. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoAggregate.ts +1 -1
  194. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoCreate.ts +1 -1
  195. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoGet.ts +1 -1
  196. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoGroup.ts +1 -1
  197. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoMutate.ts +1 -1
  198. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoSelectAndCount.ts +1 -1
  199. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoUpdate.ts +1 -1
  200. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/index.ts +1 -0
  201. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/modelCacheBase.ts +3 -3
  202. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/relations.ts +1 -1
  203. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/relationsDynamic.ts +1 -1
  204. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/relationsMutate.ts +1 -1
  205. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/relationsStatic.ts +1 -1
  206. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/cacheEntity_.ts +1 -1
  207. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/cacheQuery_.ts +1 -1
  208. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/database.ts +2 -2
  209. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean/bean.databaseDialectBase.ts → service/databaseDialectBase_.ts} +38 -41
  210. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/db_.ts +2 -2
  211. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/relations_.ts +3 -3
  212. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/database.ts +0 -5
  213. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/dto/dtoGet.ts +1 -1
  214. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/dto/dtoMutate.ts +1 -1
  215. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/dto/dtoSelectAndCount.ts +1 -1
  216. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/model.ts +1 -1
  217. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelAggr.ts +1 -1
  218. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelCount.ts +1 -1
  219. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelGeneral.ts +1 -1
  220. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelGroup.ts +1 -1
  221. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelIncrement.ts +1 -1
  222. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relations.ts +1 -1
  223. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsColumns.ts +1 -1
  224. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsDef.ts +1 -1
  225. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsDefDynamic.ts +1 -1
  226. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsDefMutate.ts +1 -1
  227. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsMutate.ts +1 -1
  228. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsTables.ts +1 -1
  229. package/vona/src/suite-vendor/a-vona/modules/a-ormdialect/package.json +1 -1
  230. package/vona/src/suite-vendor/a-vona/modules/a-ormdialect/src/bean/databaseDialect.betterSqlite3.ts +2 -2
  231. package/vona/src/suite-vendor/a-vona/modules/a-ormdialect/src/bean/databaseDialect.mysql.ts +2 -2
  232. package/vona/src/suite-vendor/a-vona/modules/a-ormdialect/src/bean/databaseDialect.pg.ts +2 -2
  233. package/vona/src/suite-vendor/a-vona/modules/a-permission/package.json +1 -1
  234. package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/bean.permission.ts +109 -40
  235. package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/summerCache.permission.ts +2 -2
  236. package/vona/src/suite-vendor/a-vona/modules/a-startup/package.json +1 -1
  237. package/vona/src/suite-vendor/a-vona/modules/a-startup/src/bean/cacheRedis.startupDebounce.ts +2 -2
  238. package/vona/src/suite-vendor/a-vona/modules/a-summer/cli/boilerplate/{{sceneName}}.{{beanName}}.ts_ +2 -2
  239. package/vona/src/suite-vendor/a-vona/modules/a-summer/package.json +1 -1
  240. package/vona/src/suite-vendor/a-vona/modules/a-summer/src/.metadata/index.ts +1 -1
  241. package/vona/src/suite-vendor/a-vona/modules/a-summer/src/bean/bean.summer.ts +3 -3
  242. package/vona/src/suite-vendor/a-vona/modules/a-summer/src/service/localMem_.ts +3 -3
  243. package/vona/src/suite-vendor/a-vona/modules/a-summer/src/service/localRedis_.ts +3 -3
  244. package/vona/src/suite-vendor/a-vona/modules/a-summer/src/{bean/bean.summerCacheBase.ts → service/summerCacheBase_.ts} +3 -3
  245. package/vona/src/suite-vendor/a-vona/modules/a-swagger/package.json +1 -1
  246. package/vona/src/suite-vendor/a-vona/modules/a-swagger/src/bean/summerCache.rapidoc.ts +2 -2
  247. package/vona/src/suite-vendor/a-vona/modules/a-swagger/src/bean/summerCache.swagger.ts +2 -2
  248. package/vona/src/suite-vendor/a-vona/modules/a-user/package.json +1 -1
  249. package/vona/src/suite-vendor/a-vona/modules/a-user/src/bean/cacheRedis.authToken.ts +2 -2
  250. package/vona/src/suite-vendor/a-vona/modules/a-worker/package.json +1 -1
  251. package/vona/src/suite-vendor/a-vona/modules/a-worker/src/bean/cacheRedis.workerAlive.ts +2 -2
  252. package/vona/src/suite-vendor/a-vona/package.json +1 -1
  253. package/zova/README.md +4 -4
  254. package/zova/README.zh-CN.md +4 -4
  255. /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_crud.ts +0 -0
  256. /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_crud_inner.ts +0 -0
  257. /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_crud_table.ts +0 -0
  258. /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_knex.ts +0 -0
  259. /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_utils.ts +0 -0
  260. /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_view.ts +0 -0
@@ -0,0 +1,141 @@
1
+ # Backend Quickstart
2
+
3
+ This guide explains the fastest way to get oriented on the backend side of the Cabloy framework repository.
4
+
5
+ If you want to create and use a Cabloy project, start with [Fullstack Quickstart](/fullstack/quickstart).
6
+
7
+ ## When to use this page
8
+
9
+ Use this page when you are contributing backend work in the framework repository and want to understand Cabloy quickly:
10
+
11
+ - required runtime dependencies
12
+ - how backend development starts in the monorepo
13
+ - what the historical project templates mean
14
+ - which commands are the real source of truth today
15
+ - which essentials pages to read next
16
+
17
+ ## Prerequisites
18
+
19
+ | Name | Version |
20
+ | ---------- | --------- |
21
+ | pnpm | >=10.19.0 |
22
+ | Node.js | >=24.8.0 |
23
+ | Redis | >=7.2.6 |
24
+ | Sqlite3 | Built-in |
25
+ | MySQL | >=8 |
26
+ | Postgresql | >=16 |
27
+
28
+ Notes:
29
+
30
+ - Redis underpins capabilities such as queue, startup, election-adjacent distributed coordination, schedule, broadcast, caching, two-layer cache, and redlock.
31
+ - If you use Sqlite3, make sure the node-gyp toolchain is ready so native dependencies can compile correctly.
32
+
33
+ ## Framework repository entrypoint
34
+
35
+ In the Cabloy framework repository, start from the root scripts instead of thinking in terms of a standalone Vona repo.
36
+
37
+ These commands are repository-root workflows for framework development, not the default bootstrap path for a normal Cabloy project.
38
+
39
+ ### Install and initialize
40
+
41
+ ```bash
42
+ npm run init
43
+ ```
44
+
45
+ ### Start backend development
46
+
47
+ ```bash
48
+ npm run dev
49
+ ```
50
+
51
+ ### Run tests
52
+
53
+ ```bash
54
+ npm run test
55
+ ```
56
+
57
+ ### Build
58
+
59
+ ```bash
60
+ npm run build
61
+ ```
62
+
63
+ ### Start production output
64
+
65
+ ```bash
66
+ npm run start
67
+ ```
68
+
69
+ ## Backend essentials reading path
70
+
71
+ Before diving into feature-specific backend guides, it helps to read the essentials spine first:
72
+
73
+ 1. [Backend (Vona)](/backend/introduction)
74
+ 2. [Backend Foundation](/backend/foundation)
75
+ 3. [Backend Essentials](/backend/backend-essentials)
76
+ 4. [Backend CLI](/backend/cli)
77
+ 5. [Backend Scripts](/backend/scripts)
78
+ 6. [Service Guide](/backend/service-guide)
79
+ 7. [Package Map](/reference/package-map)
80
+
81
+ This gives the architectural vocabulary for bean, scope, suite, module, package, and backend access patterns.
82
+
83
+ ## Historical template context
84
+
85
+ Legacy Vona docs described creating projects from templates such as `cabloy-basic` and `cabloy-start`.
86
+
87
+ That history still matters, because it explains why the Cabloy ecosystem now supports two editions:
88
+
89
+ - **Cabloy Basic**: public reference repo with DaisyUI + TailwindCSS oriented frontend modules
90
+ - **Cabloy Start**: sibling private repo with Vuetify-oriented frontend modules and different value-add composition
91
+
92
+ In the current monorepo docs, do not treat these as just template names. Treat them as edition boundaries that affect frontend integration, scripts, and examples.
93
+
94
+ ## Backend configuration reminder
95
+
96
+ Backend setup may still require editing `.env` values for database and Redis selection. In the monorepo, the exact values should always be taken from the current repo files under `vona/env/` rather than copied from archived guidance blindly.
97
+
98
+ For the backend runtime/config family, read these pages together:
99
+
100
+ - [Runtime and Flavors](/backend/runtime-and-flavors)
101
+ - [Config Guide](/backend/config-guide)
102
+ - [Backend Startup Guide](/backend/startup-guide)
103
+ - [Multi-Instance and Instance Resolution](/backend/multi-instance-and-instance-resolution)
104
+ - [Multi-Database and Datasource Guide](/backend/multi-database-datasource)
105
+
106
+ ## Recommended next pages
107
+
108
+ Choose the next reading path based on the kind of backend task you are doing.
109
+
110
+ ### Architecture spine
111
+
112
+ - [Backend (Vona)](/backend/introduction)
113
+ - [Backend Foundation](/backend/foundation)
114
+ - [Backend Essentials](/backend/backend-essentials)
115
+ - [Backend CLI](/backend/cli)
116
+ - [Backend Scripts](/backend/scripts)
117
+
118
+ ### Backend contract and data family
119
+
120
+ - [Controller Guide](/backend/controller-guide)
121
+ - [DTO Guide](/backend/dto-guide)
122
+ - [Entity Guide](/backend/entity-guide)
123
+ - [Model Guide](/backend/model-guide)
124
+ - [OpenAPI Guide](/backend/openapi-guide)
125
+ - [ORM Guide](/backend/orm-guide)
126
+
127
+ ### Runtime and distributed family
128
+
129
+ - [Runtime and Flavors](/backend/runtime-and-flavors)
130
+ - [Config Guide](/backend/config-guide)
131
+ - [Backend Startup Guide](/backend/startup-guide)
132
+ - [Multi-Instance and Instance Resolution](/backend/multi-instance-and-instance-resolution)
133
+ - [Worker Guide](/backend/worker-guide)
134
+ - [Election Guide](/backend/election-guide)
135
+ - [Queue Guide](/backend/queue-guide)
136
+ - [Broadcast Guide](/backend/broadcast-guide)
137
+
138
+ ### Fullstack bridge
139
+
140
+ - [Backend OpenAPI to Frontend SDK](/fullstack/openapi-to-sdk)
141
+ - [Fullstack Vona + Zova Integration](/fullstack/vona-zova-integration)
@@ -0,0 +1,70 @@
1
+ # Redis Guide
2
+
3
+ This guide explains how Redis fits into Vona within the Cabloy monorepo.
4
+
5
+ ## Why Redis matters in Vona
6
+
7
+ Redis is not a niche optional integration in Vona. It underpins several distributed capabilities across the framework.
8
+
9
+ Redis supports a broad set of roles such as:
10
+
11
+ - cache
12
+ - queue and schedule
13
+ - broadcast
14
+ - redlock
15
+ - other internal distributed services
16
+
17
+ That makes Redis part of the Cabloy backend foundation rather than just an external service attachment.
18
+
19
+ ## Config model
20
+
21
+ Redis configuration is organized around:
22
+
23
+ - `base`
24
+ - `clients`
25
+
26
+ This is important because Vona treats Redis as a multi-client capability surface rather than as one undifferentiated connection.
27
+
28
+ Representative built-in client roles include:
29
+
30
+ - `default`
31
+ - `cache`
32
+ - `io`
33
+ - `summer`
34
+ - `model`
35
+ - `redlock`
36
+ - `queue`
37
+ - `broadcast`
38
+
39
+ ## Key-prefix isolation
40
+
41
+ Redis also supports `keyPrefix`.
42
+
43
+ This matters because multiple projects or components may share Redis infrastructure, and keyspace isolation is a practical requirement rather than an afterthought.
44
+
45
+ ## Independent client configuration
46
+
47
+ For larger systems, different distributed components can use independent Redis client configuration.
48
+
49
+ That is important because queue, broadcast, locking, and caching may have different operational needs.
50
+
51
+ ## Adding a new Redis client
52
+
53
+ The framework uses a typed extension model for adding clients:
54
+
55
+ 1. add client type definition
56
+ 2. add client config
57
+ 3. retrieve the client through the Redis bean
58
+
59
+ This is valuable because Redis usage remains part of the typed application model.
60
+
61
+ ## Implementation checks for Redis-related backend changes
62
+
63
+ When touching distributed or cache-heavy backend code, ask:
64
+
65
+ 1. which Redis client role is the right one for this behavior?
66
+ 2. does the existing config already define the needed client?
67
+ 3. should the change preserve key-prefix isolation?
68
+ 4. does the capability belong at the cache, queue, redlock, or broadcast layer rather than as an ad hoc Redis call?
69
+
70
+ That keeps Redis usage aligned with the framework’s architecture.
@@ -0,0 +1,60 @@
1
+ # Redlock Guide
2
+
3
+ This guide explains how Redlock works in Vona within the Cabloy monorepo.
4
+
5
+ ## Why redlock matters
6
+
7
+ In distributed systems, some operations need mutual exclusion across workers or nodes.
8
+
9
+ Vona provides a Redlock-based distributed lock abstraction so that mutual exclusion can be expressed as a framework-level capability rather than improvised with ad hoc coordination code.
10
+
11
+ ## Create a redlock definition
12
+
13
+ Example: create redlock metadata in module `demo-student`.
14
+
15
+ ```bash
16
+ npm run vona :create:bean meta redlock -- --module=demo-student
17
+ ```
18
+
19
+ ## Lock resource types
20
+
21
+ One important design point is that lock resources should be typed.
22
+
23
+ Representative areas include:
24
+
25
+ - lock resources for `lock`
26
+ - lock resources for `lockIsolate`
27
+
28
+ This is valuable because lock identity becomes part of the typed contract rather than a random string scattered across the codebase.
29
+
30
+ ## `lock` vs `lockIsolate`
31
+
32
+ Two lock methods are supported:
33
+
34
+ - `lock`
35
+ - `lockIsolate`
36
+
37
+ The key difference is that `lockIsolate` incorporates datasource-level isolation to help avoid deadlocks related to datasource contention.
38
+
39
+ That is a very important Vona-specific detail.
40
+
41
+ ## Template-literal resource names
42
+
43
+ Lock-resource types can also use template literal patterns such as per-user lock names.
44
+
45
+ This is important because it lets the code remain both flexible and typed.
46
+
47
+ ## Inspection
48
+
49
+ The effective redlock list can be inspected, which is useful for debugging and operational understanding.
50
+
51
+ ## Implementation checks for distributed-lock changes
52
+
53
+ When asked to protect a distributed critical section, ask:
54
+
55
+ 1. does this need a distributed lock at all?
56
+ 2. should it use `lock` or `lockIsolate`?
57
+ 3. what should the lock resource identity be?
58
+ 4. does the resource identity need a typed or templated naming scheme?
59
+
60
+ That keeps distributed locking aligned with Vona’s intended concurrency model.
@@ -0,0 +1,250 @@
1
+ # Relations Guide
2
+
3
+ This guide explains how ORM relations work in Vona within the Cabloy monorepo.
4
+
5
+ ## Why relations matter
6
+
7
+ In Vona, relationships are not only for nicer reads. They shape:
8
+
9
+ - query composition
10
+ - nested CRUD behavior
11
+ - aggregate/group behavior on related data
12
+ - DTO inference
13
+ - OpenAPI-facing contract shape
14
+ - cross-model navigation in business code
15
+
16
+ That makes relations one of the most important bridges between persistence structure and fullstack contract design.
17
+
18
+ ## Four relation kinds
19
+
20
+ Four main relation types are supported:
21
+
22
+ - `hasOne`
23
+ - `belongsTo`
24
+ - `hasMany`
25
+ - `belongsToMany`
26
+
27
+ Together they cover common `1:1`, `n:1`, `1:n`, and `n:n` structures.
28
+
29
+ ## Static relations vs dynamic relations
30
+
31
+ A useful distinction is:
32
+
33
+ - **static relations** are declared in model metadata and reused across operations
34
+ - **dynamic relations** are declared at the usage site through `with`
35
+
36
+ A practical rule is:
37
+
38
+ - prefer static relations when the relation is part of the model’s stable business structure
39
+ - use dynamic relations when the relation is situational, cross-module, or too numerous to declare everywhere up front
40
+
41
+ ## `hasOne`
42
+
43
+ Representative static definition:
44
+
45
+ ```typescript
46
+ @Model({
47
+ entity: EntityPost,
48
+ relations: {
49
+ postContent: $relation.hasOne('test-vona:postContent', 'postId', {
50
+ columns: ['id', 'content'],
51
+ }),
52
+ },
53
+ })
54
+ class ModelPost {}
55
+ ```
56
+
57
+ `hasOne` is important because the same relation can participate in:
58
+
59
+ - nested insert
60
+ - nested get
61
+ - nested update
62
+ - nested delete
63
+
64
+ through `include` or `with`.
65
+
66
+ ## `belongsTo`
67
+
68
+ `belongsTo` is mainly a query-time relationship.
69
+
70
+ Representative pattern:
71
+
72
+ ```typescript
73
+ const postContent = await this.scope.model.postContent.select({
74
+ include: {
75
+ post: true,
76
+ },
77
+ });
78
+ ```
79
+
80
+ That means it is especially useful for retrieving related parent-side data through model-aware query operations.
81
+
82
+ ## `hasMany`
83
+
84
+ `hasMany` is especially important because it supports main-details structures, including scenarios where nested create/update/delete behavior happens together with the parent record.
85
+
86
+ Representative pattern:
87
+
88
+ ```typescript
89
+ await this.scope.model.order.update(
90
+ {
91
+ id: orderCreate.id,
92
+ orderNo: 'Order001-Update',
93
+ products: [
94
+ { name: 'Peach' },
95
+ { id: orderCreate.products?.[0].id, name: 'Apple-Update' },
96
+ { id: orderCreate.products?.[1].id, deleted: true },
97
+ ],
98
+ },
99
+ {
100
+ include: {
101
+ products: true,
102
+ },
103
+ },
104
+ );
105
+ ```
106
+
107
+ This is one of the strongest reasons Cabloy can express CRUD-oriented business flows compactly.
108
+
109
+ ## `belongsToMany`
110
+
111
+ `belongsToMany` models `n:n` relations through an intermediate model.
112
+
113
+ Representative definition:
114
+
115
+ ```typescript
116
+ @Model({
117
+ entity: EntityUser,
118
+ relations: {
119
+ roles: $relation.belongsToMany('test-vona:roleUser', 'test-vona:role', 'userId', 'roleId', {
120
+ columns: ['id', 'name'],
121
+ }),
122
+ },
123
+ })
124
+ class ModelUser {}
125
+ ```
126
+
127
+ The key point is that relation-aware CRUD here operates on the intermediate model, not directly on the target model.
128
+
129
+ ## `include` vs `with`
130
+
131
+ A practical distinction is:
132
+
133
+ - use `include` when operating on a declared static relation
134
+ - use `with` when declaring a dynamic relation inline for the current operation
135
+
136
+ | Relation-loading style | Best for | Typical source of truth |
137
+ | ---------------------- | -------------------------------------------------- | ---------------------------- |
138
+ | `include` | stable business relations reused across operations | model metadata |
139
+ | `with` | situational, dynamic, or cross-module relations | usage-site query or mutation |
140
+
141
+ Dynamic relations are especially useful when a model cannot reasonably declare every cross-module or situational relation in advance.
142
+
143
+ Representative static pattern:
144
+
145
+ ```typescript
146
+ return this.scope.model.order.select({
147
+ ...params,
148
+ include: {
149
+ products: true,
150
+ },
151
+ });
152
+ ```
153
+
154
+ Representative dynamic pattern:
155
+
156
+ ```typescript
157
+ const postContent = await this.scope.model.postContent.select({
158
+ with: {
159
+ post: $relationDynamic.belongsTo(
160
+ () => ModelPostContent,
161
+ () => ModelPost,
162
+ 'postId',
163
+ {
164
+ columns: ['id', 'title'],
165
+ },
166
+ ),
167
+ },
168
+ });
169
+ ```
170
+
171
+ ## Autoload and tree-shaped relations
172
+
173
+ `autoload: true` is useful when a relation should usually travel with the main model.
174
+
175
+ That is especially helpful for tree-shaped structures.
176
+
177
+ Representative idea:
178
+
179
+ - a self-referential `hasMany` relation with `autoload: true` can express parent-to-children trees
180
+ - a self-referential `belongsTo` relation with `autoload: true` can express reverse traversal from child to parent
181
+
182
+ A practical example is a category model whose `children` relation autoloads and only exposes the tree-oriented fields that usually matter for navigation, such as `id` and `name`.
183
+
184
+ This keeps tree-shaped domain structures inside the ORM relation model instead of hand-authoring traversal logic everywhere.
185
+
186
+ ## Relation aggregation and grouping
187
+
188
+ Relations are not limited to row-oriented loading. They can also express aggregate- or group-oriented derived data.
189
+
190
+ Examples include:
191
+
192
+ - a dynamic `hasMany` relation with `aggrs`
193
+ - a dynamic `hasMany` relation with `groups` + `aggrs`
194
+ - static relations that autoload grouped or aggregated related summaries
195
+
196
+ That means relation metadata can shape reporting-style substructures as well as ordinary object graphs.
197
+
198
+ For deeper summary-query guidance, also see [ORM Aggregate and Group Guide](/backend/orm-aggregate-group-guide).
199
+
200
+ ## Relation options and datasource metadata
201
+
202
+ Representative relation option areas include:
203
+
204
+ - `autoload`
205
+ - `columns`
206
+ - `include`
207
+ - `with`
208
+ - `meta.client`
209
+ - `meta.table`
210
+ - `distinct`
211
+ - `where`
212
+ - `joins`
213
+ - `orders`
214
+ - `limit`
215
+ - `offset`
216
+ - `aggrs`
217
+ - `groups`
218
+
219
+ A particularly important advanced point is that `meta.client` and related datasource metadata can route relations across datasources.
220
+
221
+ That is why relation design must sometimes be read together with multi-datasource architecture rather than treated as a purely local model concern.
222
+
223
+ ## Metadata regeneration
224
+
225
+ Relation changes require regenerating metadata.
226
+
227
+ That is important for AI workflows because relation changes are not purely local edits. They can affect type generation and downstream framework behavior.
228
+
229
+ ## Relationship to ORM depth pages
230
+
231
+ Read this guide together with:
232
+
233
+ - [ORM Select Guide](/backend/orm-select-guide)
234
+ - [ORM Mutation Guide](/backend/orm-mutation-guide)
235
+ - [ORM Aggregate and Group Guide](/backend/orm-aggregate-group-guide)
236
+ - [Multi-Database and Datasource Guide](/backend/multi-database-datasource)
237
+ - [DTO Infer and Generation](/backend/dto-infer-generation)
238
+
239
+ ## Implementation checks for model-relationship changes
240
+
241
+ When adding or editing model relationships, ask:
242
+
243
+ 1. which relation kind actually matches the business structure?
244
+ 2. should the relation be static metadata or a dynamic usage-site relation?
245
+ 3. should the relation participate only in queries, or also in nested CRUD behavior?
246
+ 4. does the relation carry grouped or aggregated derived data?
247
+ 5. do metadata need to be regenerated?
248
+ 6. does the relation change affect DTO inference, OpenAPI, or frontend integration?
249
+
250
+ That keeps relations aligned with the broader Cabloy contract system.