cabloy 5.1.49 → 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.
- package/.claude/skills/cabloy-backend-scaffold/SKILL.md +207 -0
- package/.claude/skills/cabloy-backend-scaffold/evals/evals.json +29 -0
- package/.claude/skills/cabloy-backend-scaffold/references/backend-thread-map.md +52 -0
- package/.claude/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +39 -0
- package/.claude/skills/cabloy-contract-loop/SKILL.md +201 -0
- package/.claude/skills/cabloy-contract-loop/evals/evals.json +29 -0
- package/.claude/skills/cabloy-contract-loop/references/contract-loop-map.md +47 -0
- package/.claude/skills/cabloy-contract-loop/references/verification-checklist.md +32 -0
- package/.claude/skills/cabloy-frontend-scaffold/SKILL.md +230 -0
- package/.claude/skills/cabloy-frontend-scaffold/evals/evals.json +35 -0
- package/.claude/skills/cabloy-frontend-scaffold/references/follow-up-checklist.md +41 -0
- package/.claude/skills/cabloy-frontend-scaffold/references/frontend-thread-map.md +54 -0
- package/.claude/skills/cabloy-workflow/SKILL.md +288 -0
- package/.claude/skills/cabloy-workflow/evals/evals.json +35 -0
- package/.claude/skills/cabloy-workflow/references/cli-strategy.md +39 -0
- package/.claude/skills/cabloy-workflow/references/edition-detection.md +29 -0
- package/.github/workflows/docs-pages.yml +54 -0
- package/.gitignore +1 -0
- package/CHANGELOG.md +46 -0
- package/CLAUDE.md +59 -0
- package/README.md +137 -0
- package/cabloy-docs/.vitepress/config.mjs +222 -0
- package/cabloy-docs/.vitepress/public/CNAME +1 -0
- package/cabloy-docs/.vitepress/theme/custom.css +64 -0
- package/cabloy-docs/.vitepress/theme/edition-badges.md +5 -0
- package/cabloy-docs/.vitepress/theme/index.js +5 -0
- package/cabloy-docs/ai/class-placement-rule.md +138 -0
- package/cabloy-docs/ai/cli-for-agents.md +56 -0
- package/cabloy-docs/ai/cli-to-skill-map.md +165 -0
- package/cabloy-docs/ai/docs-skills-rules-mapping.md +167 -0
- package/cabloy-docs/ai/edition-detection.md +30 -0
- package/cabloy-docs/ai/future-skill-roadmap.md +135 -0
- package/cabloy-docs/ai/global-bean-lookup.md +157 -0
- package/cabloy-docs/ai/introduction.md +62 -0
- package/cabloy-docs/ai/playbook-backend-module.md +111 -0
- package/cabloy-docs/ai/playbook-contract-regeneration.md +100 -0
- package/cabloy-docs/ai/playbook-frontend-page.md +99 -0
- package/cabloy-docs/ai/playbook-metadata-refresh.md +67 -0
- package/cabloy-docs/ai/repo-guidance.md +58 -0
- package/cabloy-docs/ai/rules-and-config.md +29 -0
- package/cabloy-docs/ai/skills.md +35 -0
- package/cabloy-docs/ai/verification.md +30 -0
- package/cabloy-docs/backend/aop-overview.md +128 -0
- package/cabloy-docs/backend/auth-guide.md +151 -0
- package/cabloy-docs/backend/backend-essentials.md +128 -0
- package/cabloy-docs/backend/broadcast-guide.md +138 -0
- package/cabloy-docs/backend/cache-guide.md +70 -0
- package/cabloy-docs/backend/captcha-guide.md +162 -0
- package/cabloy-docs/backend/cli.md +173 -0
- package/cabloy-docs/backend/config-guide.md +249 -0
- package/cabloy-docs/backend/controller-aop-guide.md +270 -0
- package/cabloy-docs/backend/controller-guide.md +347 -0
- package/cabloy-docs/backend/crud-workflow.md +118 -0
- package/cabloy-docs/backend/dto-guide.md +161 -0
- package/cabloy-docs/backend/dto-infer-generation.md +153 -0
- package/cabloy-docs/backend/dynamic-datasource-guide.md +70 -0
- package/cabloy-docs/backend/election-guide.md +141 -0
- package/cabloy-docs/backend/entity-guide.md +150 -0
- package/cabloy-docs/backend/error-guide.md +108 -0
- package/cabloy-docs/backend/event-guide.md +183 -0
- package/cabloy-docs/backend/external-aop-guide.md +149 -0
- package/cabloy-docs/backend/field-indexes.md +79 -0
- package/cabloy-docs/backend/foundation.md +281 -0
- package/cabloy-docs/backend/i18n-guide.md +211 -0
- package/cabloy-docs/backend/internal-aop-guide.md +181 -0
- package/cabloy-docs/backend/introduction.md +95 -0
- package/cabloy-docs/backend/jwt-guide.md +276 -0
- package/cabloy-docs/backend/logger-guide.md +223 -0
- package/cabloy-docs/backend/mail-guide.md +189 -0
- package/cabloy-docs/backend/menu-guide.md +80 -0
- package/cabloy-docs/backend/migration-and-changes.md +192 -0
- package/cabloy-docs/backend/model-guide.md +274 -0
- package/cabloy-docs/backend/multi-database-datasource.md +171 -0
- package/cabloy-docs/backend/multi-instance-and-instance-resolution.md +196 -0
- package/cabloy-docs/backend/openapi-guide.md +118 -0
- package/cabloy-docs/backend/orm-aggregate-group-guide.md +210 -0
- package/cabloy-docs/backend/orm-configuration-guide.md +165 -0
- package/cabloy-docs/backend/orm-guide.md +109 -0
- package/cabloy-docs/backend/orm-mutation-guide.md +195 -0
- package/cabloy-docs/backend/orm-select-guide.md +243 -0
- package/cabloy-docs/backend/queue-guide.md +271 -0
- package/cabloy-docs/backend/quickstart.md +141 -0
- package/cabloy-docs/backend/redis-guide.md +70 -0
- package/cabloy-docs/backend/redlock-guide.md +60 -0
- package/cabloy-docs/backend/relations-guide.md +250 -0
- package/cabloy-docs/backend/runtime-and-flavors.md +304 -0
- package/cabloy-docs/backend/schedule-guide.md +81 -0
- package/cabloy-docs/backend/scripts.md +116 -0
- package/cabloy-docs/backend/serialization-guide.md +192 -0
- package/cabloy-docs/backend/service-guide.md +166 -0
- package/cabloy-docs/backend/sharding-guide.md +49 -0
- package/cabloy-docs/backend/startup-guide.md +326 -0
- package/cabloy-docs/backend/transaction-guide.md +82 -0
- package/cabloy-docs/backend/unit-testing.md +209 -0
- package/cabloy-docs/backend/upload-guide.md +160 -0
- package/cabloy-docs/backend/user-access-guide.md +157 -0
- package/cabloy-docs/backend/validation-guide.md +80 -0
- package/cabloy-docs/backend/worker-guide.md +59 -0
- package/cabloy-docs/editions/cabloy-basic.md +25 -0
- package/cabloy-docs/editions/cabloy-start.md +24 -0
- package/cabloy-docs/editions/detection.md +31 -0
- package/cabloy-docs/editions/overview.md +44 -0
- package/cabloy-docs/frontend/api-guide.md +93 -0
- package/cabloy-docs/frontend/api-schema-guide.md +43 -0
- package/cabloy-docs/frontend/app-startup-guide.md +185 -0
- package/cabloy-docs/frontend/cli.md +78 -0
- package/cabloy-docs/frontend/component-guide.md +105 -0
- package/cabloy-docs/frontend/component-props-guide.md +97 -0
- package/cabloy-docs/frontend/component-v-model-guide.md +110 -0
- package/cabloy-docs/frontend/css-in-js-guide.md +151 -0
- package/cabloy-docs/frontend/design-principles.md +55 -0
- package/cabloy-docs/frontend/environment-config-guide.md +250 -0
- package/cabloy-docs/frontend/foundation.md +57 -0
- package/cabloy-docs/frontend/generic-component-guide.md +35 -0
- package/cabloy-docs/frontend/icon-engine-guide.md +88 -0
- package/cabloy-docs/frontend/introduction.md +32 -0
- package/cabloy-docs/frontend/ioc-and-beans.md +211 -0
- package/cabloy-docs/frontend/mock-guide.md +109 -0
- package/cabloy-docs/frontend/model-architecture.md +87 -0
- package/cabloy-docs/frontend/model-state-guide.md +70 -0
- package/cabloy-docs/frontend/module-scope.md +168 -0
- package/cabloy-docs/frontend/modules-and-suites.md +179 -0
- package/cabloy-docs/frontend/navigation-guards-guide.md +68 -0
- package/cabloy-docs/frontend/openapi-sdk-guide.md +102 -0
- package/cabloy-docs/frontend/page-guide.md +223 -0
- package/cabloy-docs/frontend/page-params-guide.md +87 -0
- package/cabloy-docs/frontend/page-query-guide.md +96 -0
- package/cabloy-docs/frontend/page-route-guide.md +147 -0
- package/cabloy-docs/frontend/quickstart.md +201 -0
- package/cabloy-docs/frontend/route-alias-guide.md +61 -0
- package/cabloy-docs/frontend/scripts.md +86 -0
- package/cabloy-docs/frontend/sdk-guide.md +45 -0
- package/cabloy-docs/frontend/server-data.md +74 -0
- package/cabloy-docs/frontend/ssr-client-only.md +40 -0
- package/cabloy-docs/frontend/ssr-env.md +51 -0
- package/cabloy-docs/frontend/ssr-init-data.md +46 -0
- package/cabloy-docs/frontend/ssr-overview.md +48 -0
- package/cabloy-docs/frontend/ssr-seo-meta.md +52 -0
- package/cabloy-docs/frontend/system-startup-guide.md +186 -0
- package/cabloy-docs/frontend/theme-guide.md +154 -0
- package/cabloy-docs/frontend/zod-guide.md +161 -0
- package/cabloy-docs/fullstack/edition-collaboration-differences.md +61 -0
- package/cabloy-docs/fullstack/frontend-metadata-to-backend.md +64 -0
- package/cabloy-docs/fullstack/introduction.md +69 -0
- package/cabloy-docs/fullstack/openapi-to-sdk.md +116 -0
- package/cabloy-docs/fullstack/quickstart.md +86 -0
- package/cabloy-docs/fullstack/vona-zova-integration.md +86 -0
- package/cabloy-docs/index.md +73 -0
- package/cabloy-docs/package.json +16 -0
- package/cabloy-docs/pnpm-lock.yaml +1607 -0
- package/cabloy-docs/reference/backend-directory-structure.md +88 -0
- package/cabloy-docs/reference/cli-reference.md +49 -0
- package/cabloy-docs/reference/glossary.md +38 -0
- package/cabloy-docs/reference/package-map.md +105 -0
- package/cabloy-docs/reference/repo-scripts.md +36 -0
- package/package.json +4 -1
- package/scripts/init.ts +12 -0
- package/scripts/upgrade.ts +31 -3
- package/vona/README.md +3 -3
- package/vona/README.zh-CN.md +4 -4
- package/vona/packages-vona/vona/package.json +1 -1
- package/vona/src/suite-vendor/a-cabloy/modules/a-datasharding/package.json +1 -1
- package/vona/src/suite-vendor/a-cabloy/modules/a-datasharding/src/bean/summerCache.datasourceWrite.ts +2 -2
- package/vona/src/suite-vendor/a-cabloy/package.json +1 -1
- package/vona/src/suite-vendor/a-captcha/modules/a-captcha/package.json +1 -1
- package/vona/src/suite-vendor/a-captcha/modules/a-captcha/src/bean/cacheRedis.captcha.ts +2 -2
- package/vona/src/suite-vendor/a-captcha/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-bean/cli/bean/metadata/generate.ts +5 -6
- package/vona/src/suite-vendor/a-vona/modules/a-bean/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-cache/cli/cacheMem/boilerplate/{{sceneName}}.{{beanName}}.ts_ +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-cache/cli/cacheRedis/boilerplate/{{sceneName}}.{{beanName}}.ts_ +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-cache/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-cache/src/.metadata/index.ts +13 -2
- package/vona/src/suite-vendor/a-vona/modules/a-cache/src/bean/bean.cache.ts +6 -7
- package/vona/src/suite-vendor/a-vona/modules/a-cache/src/{bean/bean.cacheMemBase.ts → service/cacheMemBase_.ts} +3 -3
- package/vona/src/suite-vendor/a-vona/modules/a-cache/src/{bean/bean.cacheRedisBase.ts → service/cacheRedisBase_.ts} +3 -3
- package/vona/src/suite-vendor/a-vona/modules/a-mailconfirm/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-mailconfirm/src/bean/cacheRedis.emailConfirm.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-mailconfirm/src/bean/cacheRedis.passwordReset.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-openapi/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-openapi/src/bean/summerCache.json.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-orm/cli/databaseDialect/boilerplate/{{sceneName}}.{{beanName}}.ts_ +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-orm/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/.metadata/index.ts +4 -3
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/bean/bean.database.ts +3 -3
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/bean/bean.model.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/bean/schedule.softDeletionPrune.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/common/utils.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/index.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_cache.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_meta.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.modelBase.ts +0 -5
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoAggregate.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoCreate.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoGet.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoGroup.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoMutate.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoSelectAndCount.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoUpdate.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/index.ts +1 -0
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/modelCacheBase.ts +3 -3
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/relations.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/relationsDynamic.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/relationsMutate.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/relationsStatic.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/cacheEntity_.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/cacheQuery_.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/database.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean/bean.databaseDialectBase.ts → service/databaseDialectBase_.ts} +38 -41
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/db_.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/relations_.ts +3 -3
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/database.ts +0 -5
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/dto/dtoGet.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/dto/dtoMutate.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/dto/dtoSelectAndCount.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/model.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelAggr.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelCount.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelGeneral.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelGroup.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelIncrement.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relations.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsColumns.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsDef.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsDefDynamic.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsDefMutate.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsMutate.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsTables.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-ormdialect/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-ormdialect/src/bean/databaseDialect.betterSqlite3.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-ormdialect/src/bean/databaseDialect.mysql.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-ormdialect/src/bean/databaseDialect.pg.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-permission/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/bean.permission.ts +109 -40
- package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/summerCache.permission.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-startup/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-startup/src/bean/cacheRedis.startupDebounce.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-summer/cli/boilerplate/{{sceneName}}.{{beanName}}.ts_ +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-summer/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-summer/src/.metadata/index.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-summer/src/bean/bean.summer.ts +3 -3
- package/vona/src/suite-vendor/a-vona/modules/a-summer/src/service/localMem_.ts +3 -3
- package/vona/src/suite-vendor/a-vona/modules/a-summer/src/service/localRedis_.ts +3 -3
- package/vona/src/suite-vendor/a-vona/modules/a-summer/src/{bean/bean.summerCacheBase.ts → service/summerCacheBase_.ts} +3 -3
- package/vona/src/suite-vendor/a-vona/modules/a-swagger/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-swagger/src/bean/summerCache.rapidoc.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-swagger/src/bean/summerCache.swagger.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-user/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-user/src/bean/cacheRedis.authToken.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-worker/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-worker/src/bean/cacheRedis.workerAlive.ts +2 -2
- package/vona/src/suite-vendor/a-vona/package.json +1 -1
- package/zova/README.md +4 -4
- package/zova/README.zh-CN.md +4 -4
- package/zova/packages-zova/zova/package.json +2 -2
- package/zova/src/suite/a-demo/modules/demo-basic/src/page/toolTwo/controller.tsx +0 -2
- package/zova/src/suite/a-home/modules/home-base/src/config/locale/en-us.ts +1 -0
- package/zova/src/suite/a-home/modules/home-base/src/config/locale/zh-cn.ts +1 -0
- package/zova/src/suite/a-home/modules/home-base/src/page/errorNotFound/controller.tsx +8 -2
- package/zova/src/suite/a-home/modules/home-layoutweb/src/component/layoutWeb/controller.tsx +1 -1
- package/zova/src/suite/a-home/modules/home-layoutweb/src/component/layoutWeb/render.header.tsx +1 -1
- package/zova/src/suite/a-home/modules/home-layoutweb/src/component/layoutWeb/render.locale.tsx +2 -5
- package/zova/src/suite/a-home/modules/home-layoutweb/src/component/layoutWeb/render.tabs.tsx +1 -4
- package/zova/src/suite-vendor/a-zova/modules/a-router/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-router/src/bean/sys.router.ts +28 -6
- package/zova/src/suite-vendor/a-zova/modules/a-router/src/monkeySys.ts +15 -3
- package/zova/src/suite-vendor/a-zova/modules/a-router/src/types/router.ts +1 -0
- package/zova/src/suite-vendor/a-zova/modules/a-routertabs/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-routertabs/src/model/tabs.ts +4 -0
- package/zova/src/suite-vendor/a-zova/package.json +3 -3
- /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_crud.ts +0 -0
- /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_crud_inner.ts +0 -0
- /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_crud_table.ts +0 -0
- /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_knex.ts +0 -0
- /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_utils.ts +0 -0
- /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_view.ts +0 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# Frontend Quickstart
|
|
2
|
+
|
|
3
|
+
This guide explains the fastest way to get oriented on the frontend 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 want to move from the framework repository root to the first visible routed screen in Zova with the right edition and script assumptions.
|
|
10
|
+
|
|
11
|
+
This page is the frontend narrative hub for framework-repository work such as:
|
|
12
|
+
|
|
13
|
+
- detecting the active edition
|
|
14
|
+
- choosing the right root scripts and frontend flavors
|
|
15
|
+
- understanding how startup and routing make the app routable
|
|
16
|
+
- understanding the app shell around routed pages
|
|
17
|
+
- reaching the first routed page and knowing what to read next
|
|
18
|
+
|
|
19
|
+
## Step 1: detect the edition first
|
|
20
|
+
|
|
21
|
+
Before choosing frontend examples, scripts, or shell assumptions, detect whether you are working in:
|
|
22
|
+
|
|
23
|
+
- **Cabloy Basic**
|
|
24
|
+
- **Cabloy Start**
|
|
25
|
+
|
|
26
|
+
When working in this framework repository, the active edition is **Cabloy Basic**.
|
|
27
|
+
|
|
28
|
+
That matters because edition choice affects:
|
|
29
|
+
|
|
30
|
+
- frontend flavor names
|
|
31
|
+
- UI-library assumptions
|
|
32
|
+
- available modules and layouts
|
|
33
|
+
- which examples in the docs match the current repo directly
|
|
34
|
+
|
|
35
|
+
Read together with:
|
|
36
|
+
|
|
37
|
+
- [Edition Detection](/editions/detection)
|
|
38
|
+
- [Cabloy Basic](/editions/cabloy-basic)
|
|
39
|
+
- [Cabloy Start](/editions/cabloy-start)
|
|
40
|
+
|
|
41
|
+
## Step 2: start from root scripts
|
|
42
|
+
|
|
43
|
+
When working in the framework repository, begin from the root repository scripts.
|
|
44
|
+
|
|
45
|
+
These commands are repository-root workflows for framework development and verification, not the default bootstrap path for a normal Cabloy project.
|
|
46
|
+
|
|
47
|
+
### Install and initialize the framework workspace
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm run init
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Start frontend development for Cabloy Basic
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npm run dev:zova:admin
|
|
57
|
+
npm run dev:zova:web
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
These root wrappers currently map to the Basic flavors:
|
|
61
|
+
|
|
62
|
+
- `cabloyBasicAdmin`
|
|
63
|
+
- `cabloyBasicWeb`
|
|
64
|
+
|
|
65
|
+
### Build frontend output for Cabloy Basic
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npm run build:zova
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Use the root wrappers as the normal entrypoint for this framework repository, then read the deeper script guide when you need appMode/flavor detail.
|
|
72
|
+
|
|
73
|
+
Read together with:
|
|
74
|
+
|
|
75
|
+
- [Repo Scripts](/reference/repo-scripts)
|
|
76
|
+
- [Frontend Scripts](/frontend/scripts)
|
|
77
|
+
|
|
78
|
+
## Step 3: understand runtime selection
|
|
79
|
+
|
|
80
|
+
Frontend behavior is not chosen by one flag only. It is shaped by:
|
|
81
|
+
|
|
82
|
+
- `mode`
|
|
83
|
+
- `appMode`
|
|
84
|
+
- `flavor`
|
|
85
|
+
|
|
86
|
+
Those runtime choices affect:
|
|
87
|
+
|
|
88
|
+
- which config and env values are active
|
|
89
|
+
- which shell/layout components are resolved
|
|
90
|
+
- how startup and routing behave in the current frontend variant
|
|
91
|
+
- which edition-specific script examples apply
|
|
92
|
+
|
|
93
|
+
Read next:
|
|
94
|
+
|
|
95
|
+
- [Environment and Config Guide](/frontend/environment-config-guide)
|
|
96
|
+
|
|
97
|
+
## Step 4: understand how the app becomes routable
|
|
98
|
+
|
|
99
|
+
A practical startup split is:
|
|
100
|
+
|
|
101
|
+
- **system startup** registers routes and loads system-level config before the app can really become routable
|
|
102
|
+
- **app startup** makes router, guards, and first-navigation behavior operational for the running app instance
|
|
103
|
+
|
|
104
|
+
That means the first visible screen is not only a page concern. It depends on the startup sequence that prepares routing and navigation behavior first.
|
|
105
|
+
|
|
106
|
+
Read in sequence:
|
|
107
|
+
|
|
108
|
+
1. [System Startup Guide](/frontend/system-startup-guide)
|
|
109
|
+
2. [App Startup Guide](/frontend/app-startup-guide)
|
|
110
|
+
|
|
111
|
+
## Step 5: understand the app shell
|
|
112
|
+
|
|
113
|
+
A routed page does not appear alone. It appears inside an app shell.
|
|
114
|
+
|
|
115
|
+
In practice, the shell is the layout layer around the routed page. Route metadata chooses a logical layout such as `default` or `empty`, and env/config resolves that logical choice into the actual layout component for the active runtime variant.
|
|
116
|
+
|
|
117
|
+
In the current Basic source, the most important shell shapes are represented by:
|
|
118
|
+
|
|
119
|
+
- admin-style layout behavior
|
|
120
|
+
- web-style layout behavior
|
|
121
|
+
- empty/minimal layout behavior
|
|
122
|
+
|
|
123
|
+
This is why route metadata, guards, aliases, and theme/header/menu behavior should be understood together rather than as unrelated features.
|
|
124
|
+
|
|
125
|
+
Read together with:
|
|
126
|
+
|
|
127
|
+
- [Page Route Guide](/frontend/page-route-guide)
|
|
128
|
+
- [Navigation Guards Guide](/frontend/navigation-guards-guide)
|
|
129
|
+
- [Route Alias Guide](/frontend/route-alias-guide)
|
|
130
|
+
- [Theme Guide](/frontend/theme-guide)
|
|
131
|
+
|
|
132
|
+
## Step 6: reach the first routed page
|
|
133
|
+
|
|
134
|
+
Once the edition and runtime path are clear, the fastest practical next step is to create a page and understand where it appears.
|
|
135
|
+
|
|
136
|
+
A useful frontend-first sequence is:
|
|
137
|
+
|
|
138
|
+
1. create or choose a module
|
|
139
|
+
2. create a page in that module
|
|
140
|
+
3. let Zova generate the route record and page path
|
|
141
|
+
4. confirm which shell/layout the route should use
|
|
142
|
+
5. run the matching frontend flavor and inspect the result
|
|
143
|
+
|
|
144
|
+
The generated route path follows Zova’s module-oriented naming conventions, so the first page is part of the broader routing and shell model rather than a free-form standalone screen.
|
|
145
|
+
|
|
146
|
+
Read next:
|
|
147
|
+
|
|
148
|
+
- [Frontend CLI](/frontend/cli)
|
|
149
|
+
- [Page Guide](/frontend/page-guide)
|
|
150
|
+
- [Page Route Guide](/frontend/page-route-guide)
|
|
151
|
+
|
|
152
|
+
## Step 7: understand menu and CLI ergonomics
|
|
153
|
+
|
|
154
|
+
Zova supports both command-line and editor-driven workflows.
|
|
155
|
+
|
|
156
|
+
A practical distinction is:
|
|
157
|
+
|
|
158
|
+
- **CLI** is the canonical automation and scriptable workflow surface
|
|
159
|
+
- **editor menus** improve discoverability and ergonomics for the same underlying workflows
|
|
160
|
+
|
|
161
|
+
That means frontend onboarding should not force a choice between the two. Use menus when they help you discover commands quickly, and use the CLI when you need reproducible automation or explicit command history.
|
|
162
|
+
|
|
163
|
+
Read next:
|
|
164
|
+
|
|
165
|
+
- [Frontend CLI](/frontend/cli)
|
|
166
|
+
|
|
167
|
+
## Recommended next paths
|
|
168
|
+
|
|
169
|
+
### I want to run and inspect the frontend shell
|
|
170
|
+
|
|
171
|
+
- [Frontend Scripts](/frontend/scripts)
|
|
172
|
+
- [Environment and Config Guide](/frontend/environment-config-guide)
|
|
173
|
+
- [Page Route Guide](/frontend/page-route-guide)
|
|
174
|
+
- [Theme Guide](/frontend/theme-guide)
|
|
175
|
+
|
|
176
|
+
### I want to understand startup and routing
|
|
177
|
+
|
|
178
|
+
- [System Startup Guide](/frontend/system-startup-guide)
|
|
179
|
+
- [App Startup Guide](/frontend/app-startup-guide)
|
|
180
|
+
- [Page Route Guide](/frontend/page-route-guide)
|
|
181
|
+
- [Navigation Guards Guide](/frontend/navigation-guards-guide)
|
|
182
|
+
- [Route Alias Guide](/frontend/route-alias-guide)
|
|
183
|
+
|
|
184
|
+
### I want to create my first page
|
|
185
|
+
|
|
186
|
+
- [Frontend CLI](/frontend/cli)
|
|
187
|
+
- [Page Guide](/frontend/page-guide)
|
|
188
|
+
- [Page Route Guide](/frontend/page-route-guide)
|
|
189
|
+
|
|
190
|
+
### I need edition-sensitive guidance
|
|
191
|
+
|
|
192
|
+
- [Edition Detection](/editions/detection)
|
|
193
|
+
- [Cabloy Basic](/editions/cabloy-basic)
|
|
194
|
+
- [Cabloy Start](/editions/cabloy-start)
|
|
195
|
+
- [Frontend Scripts](/frontend/scripts)
|
|
196
|
+
|
|
197
|
+
### I want the broader frontend architecture story
|
|
198
|
+
|
|
199
|
+
- [Frontend (Zova)](/frontend/introduction)
|
|
200
|
+
- [Frontend Foundation](/frontend/foundation)
|
|
201
|
+
- [Design Principles](/frontend/design-principles)
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Route Alias Guide
|
|
2
|
+
|
|
3
|
+
This guide explains how route aliases work in Zova within the Cabloy monorepo.
|
|
4
|
+
|
|
5
|
+
## Why route aliases exist
|
|
6
|
+
|
|
7
|
+
In a modular routing system, the real page path and the user-facing path are not always the same.
|
|
8
|
+
|
|
9
|
+
A home-page example shows this clearly:
|
|
10
|
+
|
|
11
|
+
- a module may provide a real internal page path
|
|
12
|
+
- users may still expect a simpler public-facing path such as `/`
|
|
13
|
+
|
|
14
|
+
Route aliases bridge that gap.
|
|
15
|
+
|
|
16
|
+
## Basic routing flow
|
|
17
|
+
|
|
18
|
+
The navigation flow can be described in terms of:
|
|
19
|
+
|
|
20
|
+
1. navigate to a path
|
|
21
|
+
2. resolve the owning module
|
|
22
|
+
3. load the module
|
|
23
|
+
4. inject the module routes into the route table
|
|
24
|
+
5. find the matching route and render the component
|
|
25
|
+
|
|
26
|
+
This is important because route aliasing is part of module-aware navigation, not an isolated string rewrite.
|
|
27
|
+
|
|
28
|
+
## Global config for aliases
|
|
29
|
+
|
|
30
|
+
Aliases belong in global config.
|
|
31
|
+
|
|
32
|
+
Representative pattern:
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
config.routes = {
|
|
36
|
+
path: {
|
|
37
|
+
'/home/index': { alias: '/' },
|
|
38
|
+
'/home/login': { alias: '/login' },
|
|
39
|
+
},
|
|
40
|
+
name: {
|
|
41
|
+
'demo-todo:item': { alias: '/todo/:id' },
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## `path` vs `name`
|
|
47
|
+
|
|
48
|
+
The distinction matters:
|
|
49
|
+
|
|
50
|
+
- use `routes.path` for normal path-based aliases
|
|
51
|
+
- use `routes.name` when the route depends on params-aware naming
|
|
52
|
+
|
|
53
|
+
## Implementation checks for route-alias changes
|
|
54
|
+
|
|
55
|
+
When changing user-facing routes, ask:
|
|
56
|
+
|
|
57
|
+
1. is this a real route change or just an alias change?
|
|
58
|
+
2. does the alias belong in global config?
|
|
59
|
+
3. is the page params-aware, meaning the name-based alias path is the correct layer?
|
|
60
|
+
|
|
61
|
+
That helps avoid breaking modular routing semantics.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Frontend Scripts
|
|
2
|
+
|
|
3
|
+
This guide explains the main Zova script workflows in the Cabloy monorepo.
|
|
4
|
+
|
|
5
|
+
## Shared rule
|
|
6
|
+
|
|
7
|
+
Zova can build `SSR`, `SPA`, `Web`, and `Admin` modes in one codebase. In Cabloy, contributors should usually start from the root scripts first, then drop into `zova/package.json` only when they need edition-specific detail.
|
|
8
|
+
|
|
9
|
+
## Detect the edition first
|
|
10
|
+
|
|
11
|
+
Before choosing script examples, detect whether you are working in Cabloy Basic or Cabloy Start.
|
|
12
|
+
|
|
13
|
+
A practical rule is:
|
|
14
|
+
|
|
15
|
+
1. detect the edition first
|
|
16
|
+
2. then choose the correct script, flavor, and appMode path
|
|
17
|
+
3. only then document or automate edition-specific frontend examples
|
|
18
|
+
|
|
19
|
+
For the edition-detection workflow, also see [Edition Detection](/editions/detection).
|
|
20
|
+
|
|
21
|
+
## Cabloy Basic root wrappers
|
|
22
|
+
|
|
23
|
+
From the current root repository:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm run dev:zova:admin
|
|
27
|
+
npm run dev:zova:web
|
|
28
|
+
npm run build:zova
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
These map to Basic-specific Zova flavors in this repository.
|
|
32
|
+
|
|
33
|
+
## Zova script model
|
|
34
|
+
|
|
35
|
+
The underlying Zova package still organizes scripts around app mode and flavor.
|
|
36
|
+
|
|
37
|
+
Examples from the current source include:
|
|
38
|
+
|
|
39
|
+
- `dev:ssr:admin`
|
|
40
|
+
- `build:ssr:admin`
|
|
41
|
+
- `preview:ssr:admin`
|
|
42
|
+
- `dev:ssr:web`
|
|
43
|
+
- `build:ssr:web`
|
|
44
|
+
- `preview:ssr:web`
|
|
45
|
+
- `dev:ssr:cabloyBasicAdmin`
|
|
46
|
+
- `build:ssr:cabloyBasicAdmin`
|
|
47
|
+
- `build:rest:cabloyBasicAdmin`
|
|
48
|
+
- `dev:ssr:cabloyBasicWeb`
|
|
49
|
+
- `build:ssr:cabloyBasicWeb`
|
|
50
|
+
- `build:rest:cabloyBasicWeb`
|
|
51
|
+
|
|
52
|
+
## Cabloy Basic
|
|
53
|
+
|
|
54
|
+
The current public repository documents and scripts support Basic-specific flavors such as:
|
|
55
|
+
|
|
56
|
+
- `cabloyBasicAdmin`
|
|
57
|
+
- `cabloyBasicWeb`
|
|
58
|
+
|
|
59
|
+
Representative Zova commands inside this repo include:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
cd zova && npm run dev:ssr:cabloyBasicAdmin
|
|
63
|
+
cd zova && npm run build:ssr:cabloyBasicAdmin
|
|
64
|
+
cd zova && npm run build:rest:cabloyBasicAdmin
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Cabloy Start
|
|
68
|
+
|
|
69
|
+
The sibling `cabloy-start` repository uses Start-specific flavors such as:
|
|
70
|
+
|
|
71
|
+
- `cabloyStartAdmin`
|
|
72
|
+
- `cabloyStartWeb`
|
|
73
|
+
|
|
74
|
+
Those commands are not driven by the current Basic repo root wrappers, so verify the Start repo’s `package.json` before documenting or automating them.
|
|
75
|
+
|
|
76
|
+
## Workflow guidance
|
|
77
|
+
|
|
78
|
+
When documenting or automating frontend scripts:
|
|
79
|
+
|
|
80
|
+
- start from root wrappers for normal Cabloy Basic workflows
|
|
81
|
+
- detect the edition before choosing flavor-specific examples
|
|
82
|
+
- verify the exact flavor before writing edition-specific examples
|
|
83
|
+
- use REST/type generation commands deliberately when backend integration depends on them
|
|
84
|
+
- understand the mode/appMode/flavor model before changing script families; see [Environment and Config Guide](/frontend/environment-config-guide)
|
|
85
|
+
- enable or package frontend mock support deliberately when development depends on fake-server behavior; see [Mock Guide](/frontend/mock-guide)
|
|
86
|
+
- use [Frontend Quickstart](/frontend/quickstart) when the reader first needs the end-to-end onboarding story rather than only a script reference
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# SDK Guide
|
|
2
|
+
|
|
3
|
+
This page expands the legacy `$sdk` placeholder into a practical guidance page for the new docs site.
|
|
4
|
+
|
|
5
|
+
## What `$sdk` is for
|
|
6
|
+
|
|
7
|
+
`$sdk` can be understood as a more generalized schema-driven access layer built on the same broader server-data model.
|
|
8
|
+
|
|
9
|
+
If `$apiSchema` exposes the metadata directly, `$sdk` represents a more application-friendly way to package schema-driven capabilities into a unified development experience.
|
|
10
|
+
|
|
11
|
+
## Why `$sdk` matters
|
|
12
|
+
|
|
13
|
+
The server-data thread in Zova is not only about calling endpoints. It is also about turning backend metadata into reusable frontend capabilities.
|
|
14
|
+
|
|
15
|
+
That is the context in which `$sdk` matters.
|
|
16
|
+
|
|
17
|
+
## How to think about the layers together
|
|
18
|
+
|
|
19
|
+
- `$fetch` → direct transport-oriented calls
|
|
20
|
+
- `$api` → business-oriented request services
|
|
21
|
+
- `Model` → cached remote state and UI-facing reuse
|
|
22
|
+
- `OpenAPI SDK` → generated client services from backend metadata
|
|
23
|
+
- `$apiSchema` → direct schema access
|
|
24
|
+
- `$sdk` → a more generalized schema-driven integration layer
|
|
25
|
+
|
|
26
|
+
## Read together with
|
|
27
|
+
|
|
28
|
+
Use this page together with:
|
|
29
|
+
|
|
30
|
+
- [Server Data](/frontend/server-data)
|
|
31
|
+
- [OpenAPI SDK Guide](/frontend/openapi-sdk-guide)
|
|
32
|
+
- [API Schema Guide](/frontend/api-schema-guide)
|
|
33
|
+
- [Backend OpenAPI to Frontend SDK](/fullstack/openapi-to-sdk)
|
|
34
|
+
|
|
35
|
+
## Implementation checks for metadata-driven frontend integration
|
|
36
|
+
|
|
37
|
+
When asked to build metadata-driven frontend behavior, do not stop at “can I call the API?”
|
|
38
|
+
|
|
39
|
+
It should also ask:
|
|
40
|
+
|
|
41
|
+
- should this use the generated SDK?
|
|
42
|
+
- should this use schema metadata?
|
|
43
|
+
- should this be packaged into a more reusable `$sdk`-style abstraction?
|
|
44
|
+
|
|
45
|
+
That mindset produces more reusable frontend architecture.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Server Data
|
|
2
|
+
|
|
3
|
+
This guide explains the server-data abstraction layers in Zova within the Cabloy monorepo.
|
|
4
|
+
|
|
5
|
+
## Why this layer exists
|
|
6
|
+
|
|
7
|
+
Zova provides several levels of abstraction for accessing server data.
|
|
8
|
+
|
|
9
|
+
The point is not to force one access style for every problem. The point is to let developers choose the right level of abstraction for the current business need while still staying within a coherent framework model.
|
|
10
|
+
|
|
11
|
+
## The abstraction ladder
|
|
12
|
+
|
|
13
|
+
These layers define the server-data abstraction ladder:
|
|
14
|
+
|
|
15
|
+
| Name | Description |
|
|
16
|
+
| ------------- | --------------------------------------------------------------- |
|
|
17
|
+
| `$fetch` | low-level request wrapper |
|
|
18
|
+
| `$api` | business-oriented API services on top of `$fetch` |
|
|
19
|
+
| `Model` | remote-data state and caching patterns on top of service access |
|
|
20
|
+
| `OpenAPI SDK` | generated client SDK based on backend Swagger/OpenAPI metadata |
|
|
21
|
+
| `$apiSchema` | direct access to API schema metadata |
|
|
22
|
+
| `$sdk` | more generalized schema-driven access using model patterns |
|
|
23
|
+
|
|
24
|
+
## How to think about the layers
|
|
25
|
+
|
|
26
|
+
### `$fetch`
|
|
27
|
+
|
|
28
|
+
Use `$fetch` when you need a relatively direct HTTP-oriented access path.
|
|
29
|
+
|
|
30
|
+
### `$api`
|
|
31
|
+
|
|
32
|
+
Use `$api` when you want business-oriented service access rather than scattering request details across pages and components.
|
|
33
|
+
|
|
34
|
+
### `Model`
|
|
35
|
+
|
|
36
|
+
Use model-based patterns when caching, shared remote state, and a more unified usage model matter.
|
|
37
|
+
|
|
38
|
+
### `OpenAPI SDK`
|
|
39
|
+
|
|
40
|
+
Use OpenAPI SDK generation when you want backend-generated API contracts to drive frontend calling patterns more directly.
|
|
41
|
+
|
|
42
|
+
### `$apiSchema` and `$sdk`
|
|
43
|
+
|
|
44
|
+
Use schema-driven layers when metadata itself needs to participate in higher-level frontend behavior such as validation or automatic rendering.
|
|
45
|
+
|
|
46
|
+
## Why this matters for Cabloy
|
|
47
|
+
|
|
48
|
+
This abstraction ladder is one of the key links between Zova and Vona.
|
|
49
|
+
|
|
50
|
+
Vona emits backend-side metadata and OpenAPI information.
|
|
51
|
+
Zova can consume that information through SDK and schema-driven layers.
|
|
52
|
+
|
|
53
|
+
That makes server data a core fullstack integration topic, not just a frontend utility topic.
|
|
54
|
+
|
|
55
|
+
A practical contract-consumption reading is:
|
|
56
|
+
|
|
57
|
+
- [OpenAPI Guide](/backend/openapi-guide) explains backend contract emission
|
|
58
|
+
- [Backend OpenAPI to Frontend SDK](/fullstack/openapi-to-sdk) explains the fullstack contract bridge
|
|
59
|
+
- [OpenAPI SDK Guide](/frontend/openapi-sdk-guide), [API Schema Guide](/frontend/api-schema-guide), and [SDK Guide](/frontend/sdk-guide) explain different frontend consumption layers
|
|
60
|
+
|
|
61
|
+
## Implementation checks for frontend data-loading changes
|
|
62
|
+
|
|
63
|
+
When adding frontend data access, avoid jumping straight to ad hoc request logic.
|
|
64
|
+
|
|
65
|
+
Instead, it should ask:
|
|
66
|
+
|
|
67
|
+
1. is `$fetch` enough?
|
|
68
|
+
2. should this be a business-oriented `$api` service?
|
|
69
|
+
3. should this become model-managed state?
|
|
70
|
+
4. is there already an OpenAPI or schema-driven route for this integration?
|
|
71
|
+
|
|
72
|
+
That decision usually produces cleaner, more Cabloy-native code.
|
|
73
|
+
|
|
74
|
+
When the real backend contract is temporarily unavailable, frontend-side mocks can provide a short-lived bridge for page, API, or model development; see [Mock Guide](/frontend/mock-guide).
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# SSR ClientOnly
|
|
2
|
+
|
|
3
|
+
This guide explains when to use `ClientOnly` in Zova SSR within the Cabloy monorepo.
|
|
4
|
+
|
|
5
|
+
## When to use `ClientOnly`
|
|
6
|
+
|
|
7
|
+
Some components only make sense on the client side.
|
|
8
|
+
|
|
9
|
+
When that happens, wrap them in `ClientOnly` so SSR does not try to render behavior that depends on the browser-only environment.
|
|
10
|
+
|
|
11
|
+
## Representative pattern
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { ClientOnly } from 'zova';
|
|
15
|
+
|
|
16
|
+
@Render()
|
|
17
|
+
export class RenderTabs {
|
|
18
|
+
render() {
|
|
19
|
+
return (
|
|
20
|
+
<ClientOnly>
|
|
21
|
+
<div role="tablist" class="tabs tabs-lifted">
|
|
22
|
+
{domTabs}
|
|
23
|
+
</div>
|
|
24
|
+
</ClientOnly>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Why this matters
|
|
31
|
+
|
|
32
|
+
This is one of the simplest but most important SSR boundary tools.
|
|
33
|
+
|
|
34
|
+
It makes the server/client split explicit and keeps browser-only behavior from leaking into the server render path.
|
|
35
|
+
|
|
36
|
+
## Implementation checks for client-only SSR boundaries
|
|
37
|
+
|
|
38
|
+
When adding or editing SSR-sensitive UI, ask whether the component depends on client-only behavior such as browser APIs, client-only rendering expectations, or interactions that should not appear in the server render.
|
|
39
|
+
|
|
40
|
+
If yes, `ClientOnly` may be the right boundary.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# SSR Environment Variables
|
|
2
|
+
|
|
3
|
+
This guide explains SSR-related environment variables in Zova within the Cabloy monorepo.
|
|
4
|
+
|
|
5
|
+
## Why SSR env configuration matters
|
|
6
|
+
|
|
7
|
+
SSR behavior often depends on environment variables that do not matter in exactly the same way for purely client-side execution.
|
|
8
|
+
|
|
9
|
+
Zova exposes SSR-related environment variables so the framework can configure key behaviors directly.
|
|
10
|
+
|
|
11
|
+
## Representative configurable variables
|
|
12
|
+
|
|
13
|
+
Representative variables include:
|
|
14
|
+
|
|
15
|
+
- `SSR_COOKIE`
|
|
16
|
+
- `SSR_COOKIE_THEMEDARK_DEFAULT`
|
|
17
|
+
- `SSR_BODYREADYOBSERVER`
|
|
18
|
+
- `SSR_API_BASE_URL`
|
|
19
|
+
- `SSR_PROD_PORT`
|
|
20
|
+
|
|
21
|
+
These affect areas such as cookie-driven SSR behavior, theme defaults, body-load observation, server-side API targeting, and SSR production port behavior.
|
|
22
|
+
|
|
23
|
+
## Dynamic environment variables
|
|
24
|
+
|
|
25
|
+
The runtime also exposes environment variables that describe the current execution context, such as:
|
|
26
|
+
|
|
27
|
+
- `SSR`
|
|
28
|
+
- `DEV`
|
|
29
|
+
- `PROD`
|
|
30
|
+
- `CLIENT`
|
|
31
|
+
- `SERVER`
|
|
32
|
+
|
|
33
|
+
These are important because SSR-aware code often needs to distinguish:
|
|
34
|
+
|
|
35
|
+
- server versus client behavior
|
|
36
|
+
- development versus production behavior
|
|
37
|
+
- SSR mode versus non-SSR mode
|
|
38
|
+
|
|
39
|
+
## Implementation checks for SSR environment-sensitive changes
|
|
40
|
+
|
|
41
|
+
When editing SSR-sensitive code, do not assume one execution environment.
|
|
42
|
+
|
|
43
|
+
It should explicitly consider whether the code path depends on:
|
|
44
|
+
|
|
45
|
+
- server versus client execution
|
|
46
|
+
- dev versus prod behavior
|
|
47
|
+
- SSR-specific environment configuration
|
|
48
|
+
|
|
49
|
+
That is often the difference between code that “works locally once” and code that fits the actual Zova SSR model.
|
|
50
|
+
|
|
51
|
+
For the broader mode/appMode/flavor and env/config loading model, see [Environment and Config Guide](/frontend/environment-config-guide).
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# SSR Init Data
|
|
2
|
+
|
|
3
|
+
This guide explains how SSR init data works in Zova within the Cabloy monorepo.
|
|
4
|
+
|
|
5
|
+
## Why init data matters
|
|
6
|
+
|
|
7
|
+
SSR needs data to be ready on the server before the rendered result is sent to the client.
|
|
8
|
+
|
|
9
|
+
Zova’s SSR model makes this feel natural by letting controllers prepare the needed data in `__init__`, while model-based state handles synchronization and hydration.
|
|
10
|
+
|
|
11
|
+
## Representative pattern
|
|
12
|
+
|
|
13
|
+
A representative pattern looks like this:
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
@Controller()
|
|
17
|
+
export class ControllerPageTodo {
|
|
18
|
+
@Use()
|
|
19
|
+
$$modelTodo: ModelTodo;
|
|
20
|
+
|
|
21
|
+
protected async __init__() {
|
|
22
|
+
const queryTodos = this.$$modelTodo.select();
|
|
23
|
+
await queryTodos.suspense();
|
|
24
|
+
if (queryTodos.error) throw queryTodos.error;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## What is happening here
|
|
30
|
+
|
|
31
|
+
1. a model bean encapsulates the data access path
|
|
32
|
+
2. the controller injects the model
|
|
33
|
+
3. `__init__` prepares the data on the server
|
|
34
|
+
4. model-based SSR support synchronizes that data to the client and completes hydration automatically
|
|
35
|
+
|
|
36
|
+
## Implementation checks for SSR data-loading changes
|
|
37
|
+
|
|
38
|
+
When changing SSR pages, avoid inventing parallel data-loading patterns unless there is a real reason.
|
|
39
|
+
|
|
40
|
+
A better default is:
|
|
41
|
+
|
|
42
|
+
- use the existing model abstraction
|
|
43
|
+
- prepare data in `__init__`
|
|
44
|
+
- let hydration reuse the server-prepared cache on the client
|
|
45
|
+
|
|
46
|
+
That keeps SSR code aligned with Zova’s intended flow.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# SSR Overview
|
|
2
|
+
|
|
3
|
+
This guide explains the overall SSR model in Zova within the Cabloy monorepo.
|
|
4
|
+
|
|
5
|
+
## What Zova SSR provides
|
|
6
|
+
|
|
7
|
+
Zova includes a built-in SSR solution that supports both front-end applications and admin systems.
|
|
8
|
+
|
|
9
|
+
The important point for the new docs is not the implementation detail alone. It is the developer experience goal:
|
|
10
|
+
|
|
11
|
+
SSR should feel like a normal part of the application model rather than a separate, awkward mode that forces unrelated coding patterns.
|
|
12
|
+
|
|
13
|
+
## Key SSR capabilities
|
|
14
|
+
|
|
15
|
+
### Support for multiple UI-library strategies
|
|
16
|
+
|
|
17
|
+
Zova SSR can be used together with different UI-library strategies. This matters directly for Cabloy editions because Basic and Start diverge on frontend stack assumptions.
|
|
18
|
+
|
|
19
|
+
### Theme support
|
|
20
|
+
|
|
21
|
+
The SSR story includes theme-related behavior, including dark/light patterns and admin-oriented theme behavior.
|
|
22
|
+
|
|
23
|
+
### Sidebar and client-state integration
|
|
24
|
+
|
|
25
|
+
For admin systems, SSR still needs to cooperate with client-facing behavior such as sidebar state.
|
|
26
|
+
|
|
27
|
+
### Initialize data
|
|
28
|
+
|
|
29
|
+
A central SSR capability is preparing initial data on the server, synchronizing it to the client, and completing hydration naturally.
|
|
30
|
+
|
|
31
|
+
### SEO meta
|
|
32
|
+
|
|
33
|
+
SSR also supports flexible SEO metadata handling.
|
|
34
|
+
|
|
35
|
+
### Env configuration
|
|
36
|
+
|
|
37
|
+
SSR behavior can depend on environment variables and configuration choices, so SSR docs should be read together with the runtime/flavor model and frontend script model.
|
|
38
|
+
|
|
39
|
+
## Implementation checks for SSR-sensitive changes
|
|
40
|
+
|
|
41
|
+
When changing SSR-sensitive code, ask:
|
|
42
|
+
|
|
43
|
+
1. does this logic run on the server, the client, or both?
|
|
44
|
+
2. does this affect initialization or hydration?
|
|
45
|
+
3. does the active edition change the UI-library assumptions behind the SSR workflow?
|
|
46
|
+
4. does the existing Zova SSR abstraction already cover this case?
|
|
47
|
+
|
|
48
|
+
That keeps SSR work aligned with the framework instead of drifting into generic frontend patterns.
|