@akanjs/cli 1.0.19 → 2.1.0-rc.0
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/guidelines/componentRule/componentRule.generate.json +37 -0
- package/guidelines/componentRule/componentRule.instruction.md +28 -0
- package/guidelines/cssRule/cssRule.generate.json +37 -0
- package/guidelines/cssRule/cssRule.instruction.md +28 -0
- package/guidelines/docPageRule/docPageRule.generate.json +37 -0
- package/guidelines/docPageRule/docPageRule.instruction.md +25 -0
- package/guidelines/docSyncRule/docSyncRule.generate.json +37 -0
- package/guidelines/docSyncRule/docSyncRule.instruction.md +25 -0
- package/guidelines/enumConstant/enumConstant.generate.json +37 -0
- package/guidelines/enumConstant/enumConstant.instruction.md +28 -0
- package/guidelines/fieldRule/fieldRule.generate.json +37 -0
- package/guidelines/fieldRule/fieldRule.instruction.md +31 -0
- package/guidelines/framework/framework.generate.json +37 -0
- package/guidelines/framework/framework.instruction.md +29 -0
- package/guidelines/modelConstant/modelConstant.generate.json +37 -0
- package/guidelines/modelConstant/modelConstant.instruction.md +30 -0
- package/guidelines/modelDictionary/modelDictionary.generate.json +37 -0
- package/guidelines/modelDictionary/modelDictionary.instruction.md +30 -0
- package/guidelines/modelDocument/modelDocument.generate.json +37 -0
- package/guidelines/modelDocument/modelDocument.instruction.md +29 -0
- package/guidelines/modelService/modelService.generate.json +37 -0
- package/guidelines/modelService/modelService.instruction.md +28 -0
- package/guidelines/modelSignal/modelSignal.generate.json +37 -0
- package/guidelines/modelSignal/modelSignal.instruction.md +28 -0
- package/guidelines/modelStore/modelStore.generate.json +37 -0
- package/guidelines/modelStore/modelStore.instruction.md +28 -0
- package/guidelines/modelTemplate/modelTemplate.generate.json +37 -0
- package/guidelines/modelTemplate/modelTemplate.instruction.md +25 -0
- package/guidelines/modelUnit/modelUnit.generate.json +37 -0
- package/guidelines/modelUnit/modelUnit.instruction.md +25 -0
- package/guidelines/modelUtil/modelUtil.generate.json +37 -0
- package/guidelines/modelUtil/modelUtil.instruction.md +25 -0
- package/guidelines/modelView/modelView.generate.json +37 -0
- package/guidelines/modelView/modelView.instruction.md +25 -0
- package/guidelines/modelZone/modelZone.generate.json +37 -0
- package/guidelines/modelZone/modelZone.instruction.md +25 -0
- package/guidelines/moduleCodegen/moduleCodegen.generate.json +37 -0
- package/guidelines/moduleCodegen/moduleCodegen.instruction.md +28 -0
- package/guidelines/moduleOverview/moduleOverview.generate.json +37 -0
- package/guidelines/moduleOverview/moduleOverview.instruction.md +31 -0
- package/guidelines/scalarConstant/scalarConstant.generate.json +37 -0
- package/guidelines/scalarConstant/scalarConstant.instruction.md +28 -0
- package/guidelines/scalarDictionary/scalarDictionary.generate.json +37 -0
- package/guidelines/scalarDictionary/scalarDictionary.instruction.md +28 -0
- package/guidelines/scalarModule/scalarModule.generate.json +37 -0
- package/guidelines/scalarModule/scalarModule.instruction.md +29 -0
- package/guidelines/sharedUiUsage/sharedUiUsage.generate.json +37 -0
- package/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +25 -0
- package/guidelines/utilUiUsage/utilUiUsage.generate.json +37 -0
- package/guidelines/utilUiUsage/utilUiUsage.instruction.md +25 -0
- package/index.js +11630 -0
- package/package.json +38 -56
- package/templates/__scalar/__model__/__model__.constant.ts +15 -0
- package/templates/__scalar/__model__/__model__.dictionary.ts +19 -0
- package/templates/__scalar/__model__/__model__.document.ts +15 -0
- package/templates/app/akan.config.ts +14 -0
- package/templates/app/env/env.client.debug.ts.template +7 -0
- package/templates/app/env/env.client.develop.ts.template +7 -0
- package/templates/app/env/env.client.local.ts.template +7 -0
- package/templates/app/env/env.client.main.ts.template +7 -0
- package/templates/app/env/env.client.testing.ts.template +7 -0
- package/{esm/src/templates/app/env/env.client.js → templates/app/env/env.client.ts} +7 -6
- package/templates/app/env/env.client.type.ts +16 -0
- package/{esm/src/templates/app/env/env.server.testing.ts.template → templates/app/env/env.server.debug.ts.template} +3 -2
- package/templates/app/env/env.server.develop.ts.template +7 -0
- package/templates/app/env/env.server.local.ts.template +7 -0
- package/templates/app/env/env.server.main.ts.template +7 -0
- package/{cjs/src/templates → templates}/app/env/env.server.testing.ts.template +0 -0
- package/{esm/src/templates/app/env/env.server.js → templates/app/env/env.server.ts} +7 -6
- package/templates/app/lib/___appName__/__appName__.dictionary.ts +17 -0
- package/templates/app/lib/___appName__/__appName__.service.ts +13 -0
- package/templates/app/lib/___appName__/__appName__.signal.ts +17 -0
- package/templates/app/lib/___appName__/__appName__.store.ts +17 -0
- package/templates/app/lib/option.ts +18 -0
- package/templates/app/main.ts +16 -0
- package/templates/app/page/_index.tsx +296 -0
- package/templates/app/page/_layout.tsx +31 -0
- package/templates/app/page/styles.css.template +53 -0
- package/templates/app/public/favicon.ico +0 -0
- package/templates/app/public/logo.png +0 -0
- package/{esm/src/templates → templates}/app/tsconfig.json.template +0 -1
- package/templates/client.ts +46 -0
- package/templates/crudPages/[__model__Id]/edit/page.tsx +47 -0
- package/templates/crudPages/[__model__Id]/page.tsx +52 -0
- package/templates/crudPages/new/page.tsx +42 -0
- package/templates/crudPages/page.tsx +43 -0
- package/templates/crudSinglePage/page.tsx +37 -0
- package/templates/env/_env.server.type.ts +16 -0
- package/templates/facetIndex/index.ts +33 -0
- package/templates/index.ts +10 -0
- package/templates/lib/__lib/lib.constant.ts +38 -0
- package/templates/lib/__lib/lib.dictionary.ts +33 -0
- package/templates/lib/__lib/lib.document.ts +35 -0
- package/templates/lib/__lib/lib.service.ts +33 -0
- package/templates/lib/__lib/lib.signal.ts +34 -0
- package/templates/lib/__lib/lib.store.ts +33 -0
- package/templates/lib/cnst.ts +29 -0
- package/templates/lib/db.ts +32 -0
- package/{esm/src/templates/lib/dict.js → templates/lib/dict.ts} +16 -16
- package/templates/lib/sig.ts +60 -0
- package/templates/lib/srv.ts +34 -0
- package/templates/lib/st.ts +31 -0
- package/templates/lib/useClient.ts +19 -0
- package/templates/lib/useServer.ts +7 -0
- package/templates/libRoot/akan.config.ts +12 -0
- package/templates/libRoot/base/baseLogic.ts +14 -0
- package/templates/libRoot/base/index.ts +8 -0
- package/templates/libRoot/common/commonLogic.ts +14 -0
- package/templates/libRoot/common/index.ts +8 -0
- package/{esm/src/templates/libRoot/lib/___libName__/__libName__.dictionary.js → templates/libRoot/lib/___libName__/__libName__.dictionary.ts} +6 -6
- package/templates/libRoot/lib/___libName__/__libName__.service.ts +13 -0
- package/templates/libRoot/lib/___libName__/__libName__.store.ts +15 -0
- package/templates/libRoot/lib/option.ts +18 -0
- package/templates/libRoot/srvkit/backendLogic.ts +13 -0
- package/templates/libRoot/srvkit/index.ts +8 -0
- package/templates/libRoot/ui/index.ts +8 -0
- package/templates/libRoot/webkit/frontendLogic.ts +13 -0
- package/templates/libRoot/webkit/index.ts +8 -0
- package/templates/localDev/docker-compose.yaml.template +37 -0
- package/{esm/src/templates/module/__Model__.Template.js → templates/module/__Model__.Template.tsx} +11 -8
- package/templates/module/__Model__.Unit.tsx +26 -0
- package/templates/module/__Model__.Util.tsx +30 -0
- package/{esm/src/templates/module/__Model__.View.js → templates/module/__Model__.View.tsx} +11 -8
- package/{esm/src/templates/module/__Model__.Zone.js → templates/module/__Model__.Zone.tsx} +15 -12
- package/{esm/src/templates/module/__model__.constant.js → templates/module/__model__.constant.ts} +9 -6
- package/{esm/src/templates/module/__model__.dictionary.js → templates/module/__model__.dictionary.ts} +12 -9
- package/templates/module/__model__.document.ts +23 -0
- package/templates/module/__model__.service.ts +16 -0
- package/{esm/src/templates/module/__model__.signal.js → templates/module/__model__.signal.ts} +10 -7
- package/templates/module/__model__.store.ts +21 -0
- package/templates/moduleRoot/index.tsx +31 -0
- package/{esm/src/templates/libRoot → templates/pkgRoot}/tsconfig.json.template +2 -3
- package/templates/server.ts +45 -0
- package/templates/service/__model__.dictionary.ts +19 -0
- package/templates/service/__model__.service.ts +13 -0
- package/templates/service/__model__.signal.ts +17 -0
- package/templates/service/__model__.store.ts +17 -0
- package/templates/workspaceRoot/.env.template +14 -0
- package/{cjs/src/templates → templates}/workspaceRoot/.gitignore.template +14 -13
- package/templates/workspaceRoot/.vscode/settings.json.template +23 -0
- package/templates/workspaceRoot/biome.json.template +191 -0
- package/templates/workspaceRoot/bunfig.toml +4 -0
- package/templates/workspaceRoot/package.json.template +7 -0
- package/templates/workspaceRoot/tsconfig.json.template +29 -0
- package/README.md +0 -301
- package/cjs/index.js +0 -7778
- package/cjs/src/guidelines/___library/sharedUiStructureDescription.en.md +0 -767
- package/cjs/src/guidelines/___library/utilUiStructureDescription.en.md +0 -395
- package/cjs/src/guidelines/___lint/lintRuleDescription.en.md +0 -64
- package/cjs/src/guidelines/___module/moduleStructureDescription.en.md +0 -80
- package/cjs/src/guidelines/componentRule/componentRule.generate.json +0 -131
- package/cjs/src/guidelines/componentRule/componentRule.instruction.md +0 -637
- package/cjs/src/guidelines/cssRule/cssRule.generate.json +0 -93
- package/cjs/src/guidelines/cssRule/cssRule.instruction.md +0 -435
- package/cjs/src/guidelines/databaseModule/databaseModule.generate.json +0 -51
- package/cjs/src/guidelines/databaseModule/databaseModule.instruction.md +0 -631
- package/cjs/src/guidelines/docPageRule/docPageRule.generate.json +0 -72
- package/cjs/src/guidelines/docPageRule/docPageRule.instruction.md +0 -389
- package/cjs/src/guidelines/enumConstant/enumConstant.generate.json +0 -24
- package/cjs/src/guidelines/enumConstant/enumConstant.instruction.md +0 -232
- package/cjs/src/guidelines/framework/framework.generate.json +0 -119
- package/cjs/src/guidelines/framework/framework.instruction.md +0 -1110
- package/cjs/src/guidelines/howToUseStore/howToUseStore.generate.json +0 -0
- package/cjs/src/guidelines/modelConstant/modelConstant.generate.json +0 -128
- package/cjs/src/guidelines/modelConstant/modelConstant.instruction.md +0 -506
- package/cjs/src/guidelines/modelDictionary/modelDictionary.generate.json +0 -108
- package/cjs/src/guidelines/modelDictionary/modelDictionary.instruction.md +0 -547
- package/cjs/src/guidelines/modelDocument/modelDocument.generate.json +0 -129
- package/cjs/src/guidelines/modelDocument/modelDocument.instruction.md +0 -659
- package/cjs/src/guidelines/modelService/modelService.generate.json +0 -135
- package/cjs/src/guidelines/modelService/modelService.instruction.md +0 -708
- package/cjs/src/guidelines/modelSignal/modelSignal.generate.json +0 -201
- package/cjs/src/guidelines/modelSignal/modelSignal.instruction.md +0 -552
- package/cjs/src/guidelines/modelStore/modelStore.generate.json +0 -130
- package/cjs/src/guidelines/modelStore/modelStore.instruction.md +0 -590
- package/cjs/src/guidelines/modelTemplate/modelTemplate.generate.json +0 -104
- package/cjs/src/guidelines/modelTemplate/modelTemplate.instruction.md +0 -604
- package/cjs/src/guidelines/modelUnit/modelUnit.generate.json +0 -92
- package/cjs/src/guidelines/modelUnit/modelUnit.instruction.md +0 -541
- package/cjs/src/guidelines/modelUtil/modelUtil.generate.json +0 -93
- package/cjs/src/guidelines/modelUtil/modelUtil.instruction.md +0 -752
- package/cjs/src/guidelines/modelView/modelView.generate.json +0 -80
- package/cjs/src/guidelines/modelView/modelView.instruction.md +0 -1005
- package/cjs/src/guidelines/modelZone/modelZone.generate.json +0 -126
- package/cjs/src/guidelines/modelZone/modelZone.instruction.md +0 -528
- package/cjs/src/guidelines/scalarConstant/scalarConstant.generate.json +0 -106
- package/cjs/src/guidelines/scalarConstant/scalarConstant.instruction.md +0 -442
- package/cjs/src/guidelines/scalarDictionary/scalarDictionary.generate.json +0 -83
- package/cjs/src/guidelines/scalarDictionary/scalarDictionary.instruction.md +0 -273
- package/cjs/src/guidelines/scalarModule/scalarModule.generate.json +0 -35
- package/cjs/src/guidelines/scalarModule/scalarModule.instruction.md +0 -81
- package/cjs/src/guidelines/sharedUiUsage/sharedUiUsage.generate.json +0 -108
- package/cjs/src/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +0 -310
- package/cjs/src/guidelines/utilUiUsage/utilUiUsage.generate.json +0 -140
- package/cjs/src/guidelines/utilUiUsage/utilUiUsage.instruction.md +0 -339
- package/cjs/src/templates/__scalar/__model__/__model__.constant.js +0 -33
- package/cjs/src/templates/__scalar/__model__/__model__.dictionary.js +0 -37
- package/cjs/src/templates/__scalar/__model__/__model__.document.js +0 -33
- package/cjs/src/templates/app/akan.config.js +0 -33
- package/cjs/src/templates/app/app/[lang]/layout.js +0 -55
- package/cjs/src/templates/app/app/[lang]/page.js +0 -111
- package/cjs/src/templates/app/app/[lang]/styles.css.template +0 -20
- package/cjs/src/templates/app/app/csr.js +0 -36
- package/cjs/src/templates/app/app/index.html.template +0 -13
- package/cjs/src/templates/app/app/layout.js +0 -41
- package/cjs/src/templates/app/app/robots.js +0 -40
- package/cjs/src/templates/app/app/sitemap.js +0 -36
- package/cjs/src/templates/app/base/baseLogic.js +0 -35
- package/cjs/src/templates/app/base/index.js +0 -29
- package/cjs/src/templates/app/capacitor.config.ts.template +0 -8
- package/cjs/src/templates/app/common/commonLogic.js +0 -35
- package/cjs/src/templates/app/common/index.js +0 -29
- package/cjs/src/templates/app/env/env.client.debug.ts.template +0 -7
- package/cjs/src/templates/app/env/env.client.develop.ts.template +0 -7
- package/cjs/src/templates/app/env/env.client.js +0 -40
- package/cjs/src/templates/app/env/env.client.local.ts.template +0 -7
- package/cjs/src/templates/app/env/env.client.main.ts.template +0 -7
- package/cjs/src/templates/app/env/env.client.testing.ts.template +0 -7
- package/cjs/src/templates/app/env/env.client.type.js +0 -35
- package/cjs/src/templates/app/env/env.server.debug.ts.template +0 -10
- package/cjs/src/templates/app/env/env.server.develop.ts.template +0 -10
- package/cjs/src/templates/app/env/env.server.js +0 -39
- package/cjs/src/templates/app/env/env.server.local.ts.template +0 -10
- package/cjs/src/templates/app/env/env.server.main.ts.template +0 -10
- package/cjs/src/templates/app/instrumentation.js +0 -32
- package/cjs/src/templates/app/jest.config.js +0 -36
- package/cjs/src/templates/app/lib/___appName__/__appName__.dictionary.js +0 -35
- package/cjs/src/templates/app/lib/___appName__/__appName__.service.js +0 -31
- package/cjs/src/templates/app/lib/___appName__/__appName__.signal.js +0 -35
- package/cjs/src/templates/app/lib/___appName__/__appName__.store.js +0 -35
- package/cjs/src/templates/app/lib/option.js +0 -47
- package/cjs/src/templates/app/main.js +0 -39
- package/cjs/src/templates/app/nest/backendLogic.js +0 -34
- package/cjs/src/templates/app/nest/index.js +0 -29
- package/cjs/src/templates/app/next/frontendLogic.js +0 -34
- package/cjs/src/templates/app/next/index.js +0 -29
- package/cjs/src/templates/app/postcss.config.js.template +0 -8
- package/cjs/src/templates/app/proxy.js +0 -35
- package/cjs/src/templates/app/public/favicon.ico +0 -0
- package/cjs/src/templates/app/public/icons/icon-128x128.png +0 -0
- package/cjs/src/templates/app/public/icons/icon-144x144.png +0 -0
- package/cjs/src/templates/app/public/icons/icon-152x152.png +0 -0
- package/cjs/src/templates/app/public/icons/icon-192x192.png +0 -0
- package/cjs/src/templates/app/public/icons/icon-256x256.png +0 -0
- package/cjs/src/templates/app/public/icons/icon-384x384.png +0 -0
- package/cjs/src/templates/app/public/icons/icon-48x48.png +0 -0
- package/cjs/src/templates/app/public/icons/icon-512x512.png +0 -0
- package/cjs/src/templates/app/public/icons/icon-72x72.png +0 -0
- package/cjs/src/templates/app/public/icons/icon-96x96.png +0 -0
- package/cjs/src/templates/app/public/logo.svg +0 -70
- package/cjs/src/templates/app/public/manifest.json.template +0 -67
- package/cjs/src/templates/app/tsconfig.json.template +0 -22
- package/cjs/src/templates/app/tsconfig.spec.json.template +0 -7
- package/cjs/src/templates/app/ui/UiComponent.js +0 -38
- package/cjs/src/templates/app/ui/index.js +0 -29
- package/cjs/src/templates/client.js +0 -47
- package/cjs/src/templates/crudPages/[__model__Id]/edit/page.js +0 -72
- package/cjs/src/templates/crudPages/[__model__Id]/page.js +0 -78
- package/cjs/src/templates/crudPages/new/page.js +0 -67
- package/cjs/src/templates/crudPages/page.js +0 -68
- package/cjs/src/templates/crudSinglePage/page.js +0 -62
- package/cjs/src/templates/env/_env.server.type.js +0 -39
- package/cjs/src/templates/index.js +0 -29
- package/cjs/src/templates/lib/__lib/lib.constant.js +0 -57
- package/cjs/src/templates/lib/__lib/lib.dictionary.js +0 -50
- package/cjs/src/templates/lib/__lib/lib.document.js +0 -52
- package/cjs/src/templates/lib/__lib/lib.service.js +0 -59
- package/cjs/src/templates/lib/__lib/lib.signal.js +0 -55
- package/cjs/src/templates/lib/__lib/lib.store.js +0 -52
- package/cjs/src/templates/lib/cnst.js +0 -56
- package/cjs/src/templates/lib/db.js +0 -53
- package/cjs/src/templates/lib/dict.js +0 -69
- package/cjs/src/templates/lib/sig.js +0 -71
- package/cjs/src/templates/lib/srv.js +0 -50
- package/cjs/src/templates/lib/st.js +0 -50
- package/cjs/src/templates/lib/useClient.js +0 -40
- package/cjs/src/templates/lib/useServer.js +0 -31
- package/cjs/src/templates/libRoot/akan.config.js +0 -33
- package/cjs/src/templates/libRoot/base/baseLogic.js +0 -35
- package/cjs/src/templates/libRoot/base/index.js +0 -29
- package/cjs/src/templates/libRoot/common/commonLogic.js +0 -35
- package/cjs/src/templates/libRoot/common/index.js +0 -29
- package/cjs/src/templates/libRoot/jest.config.js +0 -36
- package/cjs/src/templates/libRoot/lib/___libName__/__libName__.dictionary.js +0 -35
- package/cjs/src/templates/libRoot/lib/___libName__/__libName__.service.js +0 -33
- package/cjs/src/templates/libRoot/lib/___libName__/__libName__.store.js +0 -35
- package/cjs/src/templates/libRoot/lib/option.js +0 -46
- package/cjs/src/templates/libRoot/nest/backendLogic.js +0 -34
- package/cjs/src/templates/libRoot/nest/index.js +0 -29
- package/cjs/src/templates/libRoot/next/frontendLogic.js +0 -34
- package/cjs/src/templates/libRoot/next/index.js +0 -29
- package/cjs/src/templates/libRoot/tsconfig.spec.json.template +0 -7
- package/cjs/src/templates/libRoot/ui/index.js +0 -29
- package/cjs/src/templates/localDev/docker-compose.yaml.template +0 -42
- package/cjs/src/templates/module/__Model__.Template.js +0 -53
- package/cjs/src/templates/module/__Model__.Unit.js +0 -43
- package/cjs/src/templates/module/__Model__.Util.js +0 -47
- package/cjs/src/templates/module/__Model__.View.js +0 -46
- package/cjs/src/templates/module/__Model__.Zone.js +0 -60
- package/cjs/src/templates/module/__model__.constant.js +0 -41
- package/cjs/src/templates/module/__model__.dictionary.js +0 -47
- package/cjs/src/templates/module/__model__.document.js +0 -46
- package/cjs/src/templates/module/__model__.service.js +0 -33
- package/cjs/src/templates/module/__model__.signal.js +0 -44
- package/cjs/src/templates/module/__model__.store.js +0 -38
- package/cjs/src/templates/module/index.js +0 -61
- package/cjs/src/templates/moduleRoot/index.js +0 -49
- package/cjs/src/templates/pkgRoot/tsconfig.json.template +0 -15
- package/cjs/src/templates/server.js +0 -87
- package/cjs/src/templates/workspaceRoot/.env.template +0 -20
- package/cjs/src/templates/workspaceRoot/.prettierignore.template +0 -10
- package/cjs/src/templates/workspaceRoot/.prettierrc.json.template +0 -6
- package/cjs/src/templates/workspaceRoot/.swcrc.template +0 -9
- package/cjs/src/templates/workspaceRoot/.vscode/settings.json.template +0 -12
- package/cjs/src/templates/workspaceRoot/README.md.template +0 -37
- package/cjs/src/templates/workspaceRoot/eslint.config.ts.template +0 -3
- package/cjs/src/templates/workspaceRoot/infra/app/Chart.yaml.template +0 -6
- package/cjs/src/templates/workspaceRoot/infra/app/templates/frontend.yaml.template +0 -182
- package/cjs/src/templates/workspaceRoot/infra/app/values/_common-values.yaml.template +0 -183
- package/cjs/src/templates/workspaceRoot/package.json.template +0 -47
- package/cjs/src/templates/workspaceRoot/tsconfig.json.template +0 -27
- package/esm/index.js +0 -7758
- package/esm/src/guidelines/___library/sharedUiStructureDescription.en.md +0 -767
- package/esm/src/guidelines/___library/utilUiStructureDescription.en.md +0 -395
- package/esm/src/guidelines/___lint/lintRuleDescription.en.md +0 -64
- package/esm/src/guidelines/___module/moduleStructureDescription.en.md +0 -80
- package/esm/src/guidelines/componentRule/componentRule.generate.json +0 -131
- package/esm/src/guidelines/componentRule/componentRule.instruction.md +0 -637
- package/esm/src/guidelines/cssRule/cssRule.generate.json +0 -93
- package/esm/src/guidelines/cssRule/cssRule.instruction.md +0 -435
- package/esm/src/guidelines/databaseModule/databaseModule.generate.json +0 -51
- package/esm/src/guidelines/databaseModule/databaseModule.instruction.md +0 -631
- package/esm/src/guidelines/docPageRule/docPageRule.generate.json +0 -72
- package/esm/src/guidelines/docPageRule/docPageRule.instruction.md +0 -389
- package/esm/src/guidelines/enumConstant/enumConstant.generate.json +0 -24
- package/esm/src/guidelines/enumConstant/enumConstant.instruction.md +0 -232
- package/esm/src/guidelines/framework/framework.generate.json +0 -119
- package/esm/src/guidelines/framework/framework.instruction.md +0 -1110
- package/esm/src/guidelines/howToUseStore/howToUseStore.generate.json +0 -0
- package/esm/src/guidelines/modelConstant/modelConstant.generate.json +0 -128
- package/esm/src/guidelines/modelConstant/modelConstant.instruction.md +0 -506
- package/esm/src/guidelines/modelDictionary/modelDictionary.generate.json +0 -108
- package/esm/src/guidelines/modelDictionary/modelDictionary.instruction.md +0 -547
- package/esm/src/guidelines/modelDocument/modelDocument.generate.json +0 -129
- package/esm/src/guidelines/modelDocument/modelDocument.instruction.md +0 -659
- package/esm/src/guidelines/modelService/modelService.generate.json +0 -135
- package/esm/src/guidelines/modelService/modelService.instruction.md +0 -708
- package/esm/src/guidelines/modelSignal/modelSignal.generate.json +0 -201
- package/esm/src/guidelines/modelSignal/modelSignal.instruction.md +0 -552
- package/esm/src/guidelines/modelStore/modelStore.generate.json +0 -130
- package/esm/src/guidelines/modelStore/modelStore.instruction.md +0 -590
- package/esm/src/guidelines/modelTemplate/modelTemplate.generate.json +0 -104
- package/esm/src/guidelines/modelTemplate/modelTemplate.instruction.md +0 -604
- package/esm/src/guidelines/modelUnit/modelUnit.generate.json +0 -92
- package/esm/src/guidelines/modelUnit/modelUnit.instruction.md +0 -541
- package/esm/src/guidelines/modelUtil/modelUtil.generate.json +0 -93
- package/esm/src/guidelines/modelUtil/modelUtil.instruction.md +0 -752
- package/esm/src/guidelines/modelView/modelView.generate.json +0 -80
- package/esm/src/guidelines/modelView/modelView.instruction.md +0 -1005
- package/esm/src/guidelines/modelZone/modelZone.generate.json +0 -126
- package/esm/src/guidelines/modelZone/modelZone.instruction.md +0 -528
- package/esm/src/guidelines/scalarConstant/scalarConstant.generate.json +0 -106
- package/esm/src/guidelines/scalarConstant/scalarConstant.instruction.md +0 -442
- package/esm/src/guidelines/scalarDictionary/scalarDictionary.generate.json +0 -83
- package/esm/src/guidelines/scalarDictionary/scalarDictionary.instruction.md +0 -273
- package/esm/src/guidelines/scalarModule/scalarModule.generate.json +0 -35
- package/esm/src/guidelines/scalarModule/scalarModule.instruction.md +0 -81
- package/esm/src/guidelines/sharedUiUsage/sharedUiUsage.generate.json +0 -108
- package/esm/src/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +0 -310
- package/esm/src/guidelines/utilUiUsage/utilUiUsage.generate.json +0 -140
- package/esm/src/guidelines/utilUiUsage/utilUiUsage.instruction.md +0 -339
- package/esm/src/templates/__scalar/__model__/__model__.constant.js +0 -13
- package/esm/src/templates/__scalar/__model__/__model__.dictionary.js +0 -17
- package/esm/src/templates/__scalar/__model__/__model__.document.js +0 -13
- package/esm/src/templates/app/akan.config.js +0 -13
- package/esm/src/templates/app/app/[lang]/layout.js +0 -35
- package/esm/src/templates/app/app/[lang]/page.js +0 -91
- package/esm/src/templates/app/app/[lang]/styles.css.template +0 -20
- package/esm/src/templates/app/app/csr.js +0 -16
- package/esm/src/templates/app/app/index.html.template +0 -13
- package/esm/src/templates/app/app/layout.js +0 -21
- package/esm/src/templates/app/app/robots.js +0 -20
- package/esm/src/templates/app/app/sitemap.js +0 -16
- package/esm/src/templates/app/base/baseLogic.js +0 -15
- package/esm/src/templates/app/base/index.js +0 -9
- package/esm/src/templates/app/capacitor.config.ts.template +0 -8
- package/esm/src/templates/app/common/commonLogic.js +0 -15
- package/esm/src/templates/app/common/index.js +0 -9
- package/esm/src/templates/app/env/env.client.debug.ts.template +0 -7
- package/esm/src/templates/app/env/env.client.develop.ts.template +0 -7
- package/esm/src/templates/app/env/env.client.local.ts.template +0 -7
- package/esm/src/templates/app/env/env.client.main.ts.template +0 -7
- package/esm/src/templates/app/env/env.client.testing.ts.template +0 -7
- package/esm/src/templates/app/env/env.client.type.js +0 -15
- package/esm/src/templates/app/env/env.server.debug.ts.template +0 -10
- package/esm/src/templates/app/env/env.server.develop.ts.template +0 -10
- package/esm/src/templates/app/env/env.server.local.ts.template +0 -10
- package/esm/src/templates/app/env/env.server.main.ts.template +0 -10
- package/esm/src/templates/app/instrumentation.js +0 -12
- package/esm/src/templates/app/jest.config.js +0 -16
- package/esm/src/templates/app/lib/___appName__/__appName__.dictionary.js +0 -15
- package/esm/src/templates/app/lib/___appName__/__appName__.service.js +0 -11
- package/esm/src/templates/app/lib/___appName__/__appName__.signal.js +0 -15
- package/esm/src/templates/app/lib/___appName__/__appName__.store.js +0 -15
- package/esm/src/templates/app/lib/option.js +0 -27
- package/esm/src/templates/app/main.js +0 -19
- package/esm/src/templates/app/nest/backendLogic.js +0 -14
- package/esm/src/templates/app/nest/index.js +0 -9
- package/esm/src/templates/app/next/frontendLogic.js +0 -14
- package/esm/src/templates/app/next/index.js +0 -9
- package/esm/src/templates/app/package.json.template +0 -5
- package/esm/src/templates/app/postcss.config.js.template +0 -8
- package/esm/src/templates/app/proxy.js +0 -15
- package/esm/src/templates/app/public/favicon.ico +0 -0
- package/esm/src/templates/app/public/icons/icon-128x128.png +0 -0
- package/esm/src/templates/app/public/icons/icon-144x144.png +0 -0
- package/esm/src/templates/app/public/icons/icon-152x152.png +0 -0
- package/esm/src/templates/app/public/icons/icon-192x192.png +0 -0
- package/esm/src/templates/app/public/icons/icon-256x256.png +0 -0
- package/esm/src/templates/app/public/icons/icon-384x384.png +0 -0
- package/esm/src/templates/app/public/icons/icon-48x48.png +0 -0
- package/esm/src/templates/app/public/icons/icon-512x512.png +0 -0
- package/esm/src/templates/app/public/icons/icon-72x72.png +0 -0
- package/esm/src/templates/app/public/icons/icon-96x96.png +0 -0
- package/esm/src/templates/app/public/logo.svg +0 -70
- package/esm/src/templates/app/public/manifest.json.template +0 -67
- package/esm/src/templates/app/tsconfig.spec.json.template +0 -7
- package/esm/src/templates/app/ui/UiComponent.js +0 -18
- package/esm/src/templates/app/ui/index.js +0 -9
- package/esm/src/templates/client.js +0 -27
- package/esm/src/templates/crudPages/[__model__Id]/edit/page.js +0 -52
- package/esm/src/templates/crudPages/[__model__Id]/page.js +0 -58
- package/esm/src/templates/crudPages/new/page.js +0 -47
- package/esm/src/templates/crudPages/page.js +0 -48
- package/esm/src/templates/crudSinglePage/page.js +0 -42
- package/esm/src/templates/env/_env.server.type.js +0 -19
- package/esm/src/templates/index.js +0 -9
- package/esm/src/templates/lib/__lib/lib.constant.js +0 -37
- package/esm/src/templates/lib/__lib/lib.dictionary.js +0 -30
- package/esm/src/templates/lib/__lib/lib.document.js +0 -32
- package/esm/src/templates/lib/__lib/lib.service.js +0 -39
- package/esm/src/templates/lib/__lib/lib.signal.js +0 -35
- package/esm/src/templates/lib/__lib/lib.store.js +0 -32
- package/esm/src/templates/lib/cnst.js +0 -36
- package/esm/src/templates/lib/db.js +0 -33
- package/esm/src/templates/lib/sig.js +0 -51
- package/esm/src/templates/lib/srv.js +0 -30
- package/esm/src/templates/lib/st.js +0 -30
- package/esm/src/templates/lib/useClient.js +0 -20
- package/esm/src/templates/lib/useServer.js +0 -11
- package/esm/src/templates/libRoot/.gitignore.template +0 -16
- package/esm/src/templates/libRoot/akan.config.js +0 -13
- package/esm/src/templates/libRoot/base/baseLogic.js +0 -15
- package/esm/src/templates/libRoot/base/index.js +0 -9
- package/esm/src/templates/libRoot/common/commonLogic.js +0 -15
- package/esm/src/templates/libRoot/common/index.js +0 -9
- package/esm/src/templates/libRoot/env/env.server.example.ts.template +0 -6
- package/esm/src/templates/libRoot/env/env.server.testing.ts.template +0 -6
- package/esm/src/templates/libRoot/jest.config.js +0 -16
- package/esm/src/templates/libRoot/lib/___libName__/__libName__.service.js +0 -13
- package/esm/src/templates/libRoot/lib/___libName__/__libName__.store.js +0 -15
- package/esm/src/templates/libRoot/lib/option.js +0 -26
- package/esm/src/templates/libRoot/nest/backendLogic.js +0 -14
- package/esm/src/templates/libRoot/nest/index.js +0 -9
- package/esm/src/templates/libRoot/next/frontendLogic.js +0 -14
- package/esm/src/templates/libRoot/next/index.js +0 -9
- package/esm/src/templates/libRoot/package.json.template +0 -5
- package/esm/src/templates/libRoot/tsconfig.spec.json.template +0 -7
- package/esm/src/templates/libRoot/ui/index.js +0 -9
- package/esm/src/templates/localDev/docker-compose.yaml.template +0 -42
- package/esm/src/templates/module/__Model__.Unit.js +0 -23
- package/esm/src/templates/module/__Model__.Util.js +0 -27
- package/esm/src/templates/module/__model__.document.js +0 -26
- package/esm/src/templates/module/__model__.service.js +0 -13
- package/esm/src/templates/module/__model__.store.js +0 -18
- package/esm/src/templates/module/index.js +0 -41
- package/esm/src/templates/moduleRoot/index.js +0 -29
- package/esm/src/templates/pkgRoot/tsconfig.json.template +0 -15
- package/esm/src/templates/server.js +0 -67
- package/esm/src/templates/workspaceRoot/.env.template +0 -20
- package/esm/src/templates/workspaceRoot/.gitignore.template +0 -119
- package/esm/src/templates/workspaceRoot/.prettierignore.template +0 -10
- package/esm/src/templates/workspaceRoot/.prettierrc.json.template +0 -6
- package/esm/src/templates/workspaceRoot/.swcrc.template +0 -9
- package/esm/src/templates/workspaceRoot/.vscode/settings.json.template +0 -12
- package/esm/src/templates/workspaceRoot/README.md.template +0 -37
- package/esm/src/templates/workspaceRoot/eslint.config.ts.template +0 -3
- package/esm/src/templates/workspaceRoot/infra/app/Chart.yaml.template +0 -6
- package/esm/src/templates/workspaceRoot/infra/app/templates/frontend.yaml.template +0 -182
- package/esm/src/templates/workspaceRoot/infra/app/values/_common-values.yaml.template +0 -183
- package/esm/src/templates/workspaceRoot/package.json.template +0 -47
- package/esm/src/templates/workspaceRoot/tsconfig.json.template +0 -27
- package/index.d.ts +0 -2
- package/src/application/application.command.d.ts +0 -31
- package/src/application/application.interface.d.ts +0 -40
- package/src/application/application.runner.d.ts +0 -73
- package/src/application/application.script.d.ts +0 -83
- package/src/cloud/cloud.command.d.ts +0 -12
- package/src/cloud/cloud.runner.d.ts +0 -11
- package/src/cloud/cloud.script.d.ts +0 -11
- package/src/guideline/guideline.command.d.ts +0 -9
- package/src/guideline/guideline.prompt.d.ts +0 -29
- package/src/guideline/guideline.runner.d.ts +0 -19
- package/src/guideline/guideline.script.d.ts +0 -12
- package/src/guidelines/___library/sharedUiStructureDescription.en.md +0 -767
- package/src/guidelines/___library/utilUiStructureDescription.en.md +0 -395
- package/src/guidelines/___lint/lintRuleDescription.en.md +0 -64
- package/src/guidelines/___module/moduleStructureDescription.en.md +0 -80
- package/src/guidelines/componentRule/componentRule.instruction.md +0 -637
- package/src/guidelines/cssRule/cssRule.instruction.md +0 -435
- package/src/guidelines/databaseModule/databaseModule.instruction.md +0 -631
- package/src/guidelines/docPageRule/docPageRule.instruction.md +0 -389
- package/src/guidelines/enumConstant/enumConstant.instruction.md +0 -232
- package/src/guidelines/framework/framework.instruction.md +0 -1110
- package/src/guidelines/modelConstant/modelConstant.instruction.md +0 -506
- package/src/guidelines/modelDictionary/modelDictionary.instruction.md +0 -547
- package/src/guidelines/modelDocument/modelDocument.instruction.md +0 -659
- package/src/guidelines/modelService/modelService.instruction.md +0 -708
- package/src/guidelines/modelSignal/modelSignal.instruction.md +0 -552
- package/src/guidelines/modelStore/modelStore.instruction.md +0 -590
- package/src/guidelines/modelTemplate/modelTemplate.instruction.md +0 -604
- package/src/guidelines/modelUnit/modelUnit.instruction.md +0 -541
- package/src/guidelines/modelUtil/modelUtil.instruction.md +0 -752
- package/src/guidelines/modelView/modelView.instruction.md +0 -1005
- package/src/guidelines/modelZone/modelZone.instruction.md +0 -528
- package/src/guidelines/scalarConstant/scalarConstant.instruction.md +0 -442
- package/src/guidelines/scalarDictionary/scalarDictionary.instruction.md +0 -273
- package/src/guidelines/scalarModule/scalarModule.instruction.md +0 -81
- package/src/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +0 -310
- package/src/guidelines/utilUiUsage/utilUiUsage.instruction.md +0 -339
- package/src/library/library.command.d.ts +0 -9
- package/src/library/library.runner.d.ts +0 -9
- package/src/library/library.script.d.ts +0 -9
- package/src/module/module.command.d.ts +0 -10
- package/src/module/module.prompt.d.ts +0 -13
- package/src/module/module.request.d.ts +0 -63
- package/src/module/module.runner.d.ts +0 -53
- package/src/module/module.script.d.ts +0 -17
- package/src/package/package.command.d.ts +0 -10
- package/src/package/package.runner.d.ts +0 -9
- package/src/package/package.script.d.ts +0 -10
- package/src/page/page.command.d.ts +0 -6
- package/src/page/page.runner.d.ts +0 -8
- package/src/page/page.script.d.ts +0 -9
- package/src/scalar/scalar.command.d.ts +0 -7
- package/src/scalar/scalar.prompt.d.ts +0 -23
- package/src/scalar/scalar.runner.d.ts +0 -14
- package/src/scalar/scalar.script.d.ts +0 -7
- package/src/templates/__scalar/__model__/__model__.constant.d.ts +0 -7
- package/src/templates/__scalar/__model__/__model__.dictionary.d.ts +0 -7
- package/src/templates/__scalar/__model__/__model__.document.d.ts +0 -7
- package/src/templates/app/akan.config.d.ts +0 -6
- package/src/templates/app/app/[lang]/layout.d.ts +0 -11
- package/src/templates/app/app/[lang]/page.d.ts +0 -9
- package/src/templates/app/app/csr.d.ts +0 -9
- package/src/templates/app/app/layout.d.ts +0 -9
- package/src/templates/app/app/robots.d.ts +0 -6
- package/src/templates/app/app/sitemap.d.ts +0 -6
- package/src/templates/app/base/baseLogic.d.ts +0 -6
- package/src/templates/app/base/index.d.ts +0 -6
- package/src/templates/app/common/commonLogic.d.ts +0 -6
- package/src/templates/app/common/index.d.ts +0 -6
- package/src/templates/app/env/env.client.d.ts +0 -6
- package/src/templates/app/env/env.client.type.d.ts +0 -6
- package/src/templates/app/env/env.server.d.ts +0 -6
- package/src/templates/app/instrumentation.d.ts +0 -6
- package/src/templates/app/jest.config.d.ts +0 -6
- package/src/templates/app/lib/___appName__/__appName__.dictionary.d.ts +0 -7
- package/src/templates/app/lib/___appName__/__appName__.service.d.ts +0 -7
- package/src/templates/app/lib/___appName__/__appName__.signal.d.ts +0 -7
- package/src/templates/app/lib/___appName__/__appName__.store.d.ts +0 -7
- package/src/templates/app/lib/option.d.ts +0 -6
- package/src/templates/app/main.d.ts +0 -6
- package/src/templates/app/nest/backendLogic.d.ts +0 -6
- package/src/templates/app/nest/index.d.ts +0 -6
- package/src/templates/app/next/frontendLogic.d.ts +0 -6
- package/src/templates/app/next/index.d.ts +0 -6
- package/src/templates/app/proxy.d.ts +0 -6
- package/src/templates/app/ui/UiComponent.d.ts +0 -9
- package/src/templates/app/ui/index.d.ts +0 -6
- package/src/templates/client.d.ts +0 -4
- package/src/templates/crudPages/[__model__Id]/edit/page.d.ts +0 -11
- package/src/templates/crudPages/[__model__Id]/page.d.ts +0 -11
- package/src/templates/crudPages/new/page.d.ts +0 -11
- package/src/templates/crudPages/page.d.ts +0 -11
- package/src/templates/crudSinglePage/page.d.ts +0 -11
- package/src/templates/env/_env.server.type.d.ts +0 -7
- package/src/templates/index.d.ts +0 -6
- package/src/templates/lib/__lib/lib.constant.d.ts +0 -4
- package/src/templates/lib/__lib/lib.dictionary.d.ts +0 -4
- package/src/templates/lib/__lib/lib.document.d.ts +0 -4
- package/src/templates/lib/__lib/lib.service.d.ts +0 -4
- package/src/templates/lib/__lib/lib.signal.d.ts +0 -4
- package/src/templates/lib/__lib/lib.store.d.ts +0 -4
- package/src/templates/lib/cnst.d.ts +0 -4
- package/src/templates/lib/db.d.ts +0 -4
- package/src/templates/lib/dict.d.ts +0 -4
- package/src/templates/lib/sig.d.ts +0 -4
- package/src/templates/lib/srv.d.ts +0 -4
- package/src/templates/lib/st.d.ts +0 -4
- package/src/templates/lib/useClient.d.ts +0 -4
- package/src/templates/lib/useServer.d.ts +0 -4
- package/src/templates/libRoot/akan.config.d.ts +0 -5
- package/src/templates/libRoot/base/baseLogic.d.ts +0 -5
- package/src/templates/libRoot/base/index.d.ts +0 -5
- package/src/templates/libRoot/common/commonLogic.d.ts +0 -5
- package/src/templates/libRoot/common/index.d.ts +0 -5
- package/src/templates/libRoot/jest.config.d.ts +0 -6
- package/src/templates/libRoot/lib/___libName__/__libName__.dictionary.d.ts +0 -6
- package/src/templates/libRoot/lib/___libName__/__libName__.service.d.ts +0 -6
- package/src/templates/libRoot/lib/___libName__/__libName__.store.d.ts +0 -6
- package/src/templates/libRoot/lib/option.d.ts +0 -6
- package/src/templates/libRoot/nest/backendLogic.d.ts +0 -5
- package/src/templates/libRoot/nest/index.d.ts +0 -5
- package/src/templates/libRoot/next/frontendLogic.d.ts +0 -5
- package/src/templates/libRoot/next/index.d.ts +0 -5
- package/src/templates/libRoot/ui/index.d.ts +0 -5
- package/src/templates/module/__Model__.Template.d.ts +0 -11
- package/src/templates/module/__Model__.Unit.d.ts +0 -11
- package/src/templates/module/__Model__.Util.d.ts +0 -11
- package/src/templates/module/__Model__.View.d.ts +0 -11
- package/src/templates/module/__Model__.Zone.d.ts +0 -11
- package/src/templates/module/__model__.constant.d.ts +0 -8
- package/src/templates/module/__model__.dictionary.d.ts +0 -8
- package/src/templates/module/__model__.document.d.ts +0 -8
- package/src/templates/module/__model__.service.d.ts +0 -8
- package/src/templates/module/__model__.signal.d.ts +0 -9
- package/src/templates/module/__model__.store.d.ts +0 -8
- package/src/templates/module/index.d.ts +0 -11
- package/src/templates/moduleRoot/index.d.ts +0 -11
- package/src/templates/server.d.ts +0 -4
- package/src/workspace/workspace.command.d.ts +0 -12
- package/src/workspace/workspace.runner.d.ts +0 -13
- package/src/workspace/workspace.script.d.ts +0 -24
- package/ui/MultiScrollList.d.ts +0 -14
- /package/{cjs/src/templates → templates}/app/package.json.template +0 -0
- /package/{cjs/src/templates → templates}/libRoot/.gitignore.template +0 -0
- /package/{cjs/src/templates → templates}/libRoot/env/env.server.example.ts.template +0 -0
- /package/{cjs/src/templates → templates}/libRoot/env/env.server.testing.ts.template +0 -0
- /package/{cjs/src/templates → templates}/libRoot/package.json.template +0 -0
- /package/{cjs/src/templates → templates}/libRoot/tsconfig.json.template +0 -0
|
@@ -1,590 +0,0 @@
|
|
|
1
|
-
# Model Store Implementation Guide
|
|
2
|
-
|
|
3
|
-
## Purpose and Role of model.store.ts
|
|
4
|
-
|
|
5
|
-
The `model.store.ts` file is a crucial component in the Akan.js framework that serves as the state management layer connecting your UI components with GraphQL operations. Built on Zustand, model stores provide:
|
|
6
|
-
|
|
7
|
-
1. **Centralized State Management**: Single source of truth for model data
|
|
8
|
-
2. **GraphQL Integration**: Automatic CRUD operations with backend services
|
|
9
|
-
3. **Form Handling**: Comprehensive form state, validation, and submission
|
|
10
|
-
4. **Reactive UI Updates**: Optimized re-rendering through selectors
|
|
11
|
-
5. **Business Logic**: Centralized place for domain-specific operations
|
|
12
|
-
6. **Sliced Data Access**: Contextual data lists with pagination, filtering, and sorting
|
|
13
|
-
|
|
14
|
-
## Store Architecture Overview
|
|
15
|
-
|
|
16
|
-
Model stores follow a consistent architecture pattern:
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
|
|
20
|
-
│ model.store.ts │ ←── │ fetch.ts │ ←─ │ model.signal.ts│
|
|
21
|
-
│ (Zustand) │ │ (GraphQL API) │ │ (Backend API) │
|
|
22
|
-
└────────┬────────┘ └─────────────────┘ └─────────────────┘
|
|
23
|
-
│
|
|
24
|
-
▼
|
|
25
|
-
┌─────────────────┐ ┌─────────────────┐
|
|
26
|
-
│ st.ts │ ──→ │ Components │
|
|
27
|
-
│(Store Registry) │ │ (React/UI) │
|
|
28
|
-
└─────────────────┘ └─────────────────┘
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Basic Store Implementation
|
|
32
|
-
|
|
33
|
-
### Store Structure
|
|
34
|
-
|
|
35
|
-
```typescript
|
|
36
|
-
import { stateOf, Store } from "@akanjs/store";
|
|
37
|
-
import * as cnst from "../cnst";
|
|
38
|
-
import { fetch } from "../useServer";
|
|
39
|
-
|
|
40
|
-
export class ProductStore extends stateOf(fetch.productGql, {
|
|
41
|
-
// Custom state properties
|
|
42
|
-
featuredProducts: [] as cnst.LightProduct[],
|
|
43
|
-
viewMode: "grid" as "grid" | "list",
|
|
44
|
-
}) {
|
|
45
|
-
// Custom actions
|
|
46
|
-
async featureProduct(id: string) {
|
|
47
|
-
const product = await fetch.featureProduct(id);
|
|
48
|
-
this.set({
|
|
49
|
-
featuredProducts: [...this.get().featuredProducts, product],
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### Core Components
|
|
56
|
-
|
|
57
|
-
1. **`@Store` Decorator**: Registers the store class with metadata
|
|
58
|
-
2. **`stateOf` Function**: Creates the base store with generated state and actions
|
|
59
|
-
3. **Custom State**: Additional state properties specific to your model
|
|
60
|
-
4. **Custom Actions**: Business logic methods for model operations
|
|
61
|
-
|
|
62
|
-
## State Management
|
|
63
|
-
|
|
64
|
-
### Base State (Automatically Generated)
|
|
65
|
-
|
|
66
|
-
Each store automatically creates the following state properties:
|
|
67
|
-
|
|
68
|
-
```typescript
|
|
69
|
-
// Standard state properties
|
|
70
|
-
{
|
|
71
|
-
model: null, // Current active model instance
|
|
72
|
-
modelList: [], // Main list of models
|
|
73
|
-
modelForm: {}, // Form state for create/update
|
|
74
|
-
modelLoading: false, // Loading state for current model
|
|
75
|
-
modelListLoading: false, // Loading state for model list
|
|
76
|
-
modelFormLoading: false, // Loading state for form submission
|
|
77
|
-
modelTotal: 0, // Total count of models
|
|
78
|
-
modelPage: 1, // Current page number
|
|
79
|
-
modelLimit: 20, // Items per page
|
|
80
|
-
modelSort: "createdAt", // Current sort field
|
|
81
|
-
modelQuery: {}, // Query arguments for filtering
|
|
82
|
-
}
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
### Custom State
|
|
86
|
-
|
|
87
|
-
Add custom state properties in the second parameter of `stateOf`:
|
|
88
|
-
|
|
89
|
-
```typescript
|
|
90
|
-
extends stateOf(fetch.productGql, {
|
|
91
|
-
// UI state
|
|
92
|
-
productViewMode: "grid" as "grid" | "list",
|
|
93
|
-
selectedProductIds: [] as string[],
|
|
94
|
-
|
|
95
|
-
// Business state
|
|
96
|
-
featuredProducts: [] as cnst.LightProduct[],
|
|
97
|
-
productAnalytics: null as ProductAnalytics | null,
|
|
98
|
-
|
|
99
|
-
// Complex state
|
|
100
|
-
productCategoryMap: new Map<string, cnst.ProductCategory[]>(),
|
|
101
|
-
})
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### Accessing State
|
|
105
|
-
|
|
106
|
-
In your store actions, use these methods to access state:
|
|
107
|
-
|
|
108
|
-
```typescript
|
|
109
|
-
// Get the entire state
|
|
110
|
-
const state = this.get();
|
|
111
|
-
|
|
112
|
-
// Get specific properties
|
|
113
|
-
const { productList, selectedProductIds } = this.pick("productList", "selectedProductIds");
|
|
114
|
-
|
|
115
|
-
// Set state (triggers UI updates)
|
|
116
|
-
this.set({ productViewMode: "list" });
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
## Store Actions
|
|
120
|
-
|
|
121
|
-
### Core Actions (Automatically Generated)
|
|
122
|
-
|
|
123
|
-
Each store comes with standard CRUD operations:
|
|
124
|
-
|
|
125
|
-
```typescript
|
|
126
|
-
// Core model actions
|
|
127
|
-
st.do.createModel(); // Create a new model
|
|
128
|
-
st.do.updateModel(); // Update an existing model
|
|
129
|
-
st.do.removeModel(); // Delete a model
|
|
130
|
-
st.do.getModel(); // Get a single model by ID
|
|
131
|
-
st.do.listModel(); // Get a list of models
|
|
132
|
-
|
|
133
|
-
// Initialization
|
|
134
|
-
st.do.initModel(); // Initialize the store
|
|
135
|
-
st.do.refreshModel(); // Refresh data
|
|
136
|
-
|
|
137
|
-
// Pagination/Sorting
|
|
138
|
-
st.do.setPageOfModel(); // Change page number
|
|
139
|
-
st.do.setLimitOfModel(); // Change items per page
|
|
140
|
-
st.do.setSortOfModel(); // Change sort field
|
|
141
|
-
st.do.setQueryArgsOfModel(); // Set filter query arguments
|
|
142
|
-
|
|
143
|
-
// Form management
|
|
144
|
-
st.do.setFieldOnModel(); // Set a form field
|
|
145
|
-
st.do.addFieldOnModel(); // Add to an array field
|
|
146
|
-
st.do.submitModel(); // Submit the form
|
|
147
|
-
st.do.checkModelSubmitable(); // Check form validity
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
### Custom Actions
|
|
151
|
-
|
|
152
|
-
Define custom business logic by adding methods to your store class:
|
|
153
|
-
|
|
154
|
-
```typescript
|
|
155
|
-
// Basic custom action
|
|
156
|
-
async archiveProduct(id: string) {
|
|
157
|
-
const product = await fetch.archiveProduct(id);
|
|
158
|
-
this.setProduct(product);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
// Action with loading state
|
|
162
|
-
async generateProductReport(id: string) {
|
|
163
|
-
this.set({ productReportLoading: true });
|
|
164
|
-
try {
|
|
165
|
-
const report = await fetch.generateProductReport(id);
|
|
166
|
-
this.set({ productReport: report });
|
|
167
|
-
} finally {
|
|
168
|
-
this.set({ productReportLoading: false });
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
// Action with notification
|
|
173
|
-
@Toast({ root: "product" })
|
|
174
|
-
async bulkUpdatePrices(percentage: number) {
|
|
175
|
-
const { selectedProductIds } = this.pick("selectedProductIds");
|
|
176
|
-
await fetch.updatePrices(selectedProductIds, percentage);
|
|
177
|
-
this.refreshProductList();
|
|
178
|
-
}
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
## Using Slices for List Operations
|
|
182
|
-
|
|
183
|
-
Slices are specialized query operations for retrieving contextual lists of data.
|
|
184
|
-
|
|
185
|
-
### Slice Definition
|
|
186
|
-
|
|
187
|
-
Slices are defined in your GraphQL fetch operations:
|
|
188
|
-
|
|
189
|
-
```typescript
|
|
190
|
-
// In fetch.ts
|
|
191
|
-
export const productGql = {
|
|
192
|
-
// Basic operations
|
|
193
|
-
product: (id: string) => [id],
|
|
194
|
-
productList: () => [],
|
|
195
|
-
|
|
196
|
-
// Slice operations (contextual lists)
|
|
197
|
-
productListByCategory: (categoryId: string) => [categoryId],
|
|
198
|
-
productListByVendor: (vendorId: string) => [vendorId],
|
|
199
|
-
};
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
### Slice State
|
|
203
|
-
|
|
204
|
-
Each slice automatically creates these state properties:
|
|
205
|
-
|
|
206
|
-
```typescript
|
|
207
|
-
{
|
|
208
|
-
productListByCategory: [], // Slice data
|
|
209
|
-
productListByCategoryLoading: false, // Loading state
|
|
210
|
-
productListByCategoryTotal: 0, // Total count
|
|
211
|
-
productListByCategoryPage: 1, // Current page
|
|
212
|
-
productListByCategoryLimit: 20, // Items per page
|
|
213
|
-
productListByCategorySort: "createdAt", // Sort field
|
|
214
|
-
productListByCategoryQuery: {}, // Query args
|
|
215
|
-
}
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
### Using Slice State in Components
|
|
219
|
-
|
|
220
|
-
```typescript
|
|
221
|
-
const ProductCategoryPage = ({ categoryId }) => {
|
|
222
|
-
// Initialize slice when component mounts
|
|
223
|
-
useEffect(() => {
|
|
224
|
-
st.do.initProductListByCategory(categoryId);
|
|
225
|
-
}, [categoryId]);
|
|
226
|
-
|
|
227
|
-
// Access slice state
|
|
228
|
-
const products = st.use.productListByCategory();
|
|
229
|
-
const loading = st.use.productListByCategoryLoading();
|
|
230
|
-
const total = st.use.productListByCategoryTotal();
|
|
231
|
-
|
|
232
|
-
// Pagination control
|
|
233
|
-
const handlePageChange = (page: number) => {
|
|
234
|
-
st.do.setPageOfProductListByCategory(page);
|
|
235
|
-
};
|
|
236
|
-
|
|
237
|
-
// Rendering
|
|
238
|
-
return (
|
|
239
|
-
<div>
|
|
240
|
-
{loading ? (
|
|
241
|
-
<Spinner />
|
|
242
|
-
) : (
|
|
243
|
-
<ProductGrid products={products} />
|
|
244
|
-
)}
|
|
245
|
-
|
|
246
|
-
<Pagination
|
|
247
|
-
total={total}
|
|
248
|
-
onChange={handlePageChange}
|
|
249
|
-
/>
|
|
250
|
-
</div>
|
|
251
|
-
);
|
|
252
|
-
};
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
### Slice Actions
|
|
256
|
-
|
|
257
|
-
Each slice gets these automatically generated actions:
|
|
258
|
-
|
|
259
|
-
```typescript
|
|
260
|
-
// Initialize slice
|
|
261
|
-
st.do.initProductListByCategory(categoryId);
|
|
262
|
-
|
|
263
|
-
// Refresh slice data
|
|
264
|
-
st.do.refreshProductListByCategory(categoryId);
|
|
265
|
-
|
|
266
|
-
// Pagination/Sorting
|
|
267
|
-
st.do.setPageOfProductListByCategory(2);
|
|
268
|
-
st.do.setLimitOfProductListByCategory(50);
|
|
269
|
-
st.do.setSortOfProductListByCategory("price");
|
|
270
|
-
|
|
271
|
-
// Filtering
|
|
272
|
-
st.do.setQueryArgsOfProductListByCategory({
|
|
273
|
-
minPrice: 100,
|
|
274
|
-
inStock: true,
|
|
275
|
-
});
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
## Form Management
|
|
279
|
-
|
|
280
|
-
Stores provide comprehensive form handling capabilities.
|
|
281
|
-
|
|
282
|
-
### Form State Handling
|
|
283
|
-
|
|
284
|
-
```typescript
|
|
285
|
-
// Form initialization
|
|
286
|
-
useEffect(() => {
|
|
287
|
-
if (productId) {
|
|
288
|
-
st.do.getProduct(productId);
|
|
289
|
-
} else {
|
|
290
|
-
st.do.initProduct(); // Create empty form
|
|
291
|
-
}
|
|
292
|
-
}, [productId]);
|
|
293
|
-
|
|
294
|
-
// Access form state
|
|
295
|
-
const productForm = st.use.productForm();
|
|
296
|
-
const loading = st.use.productFormLoading();
|
|
297
|
-
const submitable = st.use.productSubmitable();
|
|
298
|
-
|
|
299
|
-
// Form component
|
|
300
|
-
return (
|
|
301
|
-
<Form onSubmit={st.do.submitProduct}>
|
|
302
|
-
<Input
|
|
303
|
-
value={productForm.name}
|
|
304
|
-
onChange={(value) => st.do.setNameOnProduct(value)}
|
|
305
|
-
/>
|
|
306
|
-
|
|
307
|
-
<Select
|
|
308
|
-
value={productForm.category}
|
|
309
|
-
onChange={(value) => st.do.setCategoryOnProduct(value)}
|
|
310
|
-
options={categories}
|
|
311
|
-
/>
|
|
312
|
-
|
|
313
|
-
<FileUpload
|
|
314
|
-
files={productForm.images || []}
|
|
315
|
-
onAdd={(files) => st.do.addImagesOnProduct(files)}
|
|
316
|
-
onRemove={(index) => st.do.removeImagesOnProduct(index)}
|
|
317
|
-
/>
|
|
318
|
-
|
|
319
|
-
<Button
|
|
320
|
-
type="submit"
|
|
321
|
-
disabled={!submitable || loading}
|
|
322
|
-
>
|
|
323
|
-
Save Product
|
|
324
|
-
</Button>
|
|
325
|
-
</Form>
|
|
326
|
-
);
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
### Form Submission
|
|
330
|
-
|
|
331
|
-
```typescript
|
|
332
|
-
// Basic submission
|
|
333
|
-
st.do.submitProduct();
|
|
334
|
-
|
|
335
|
-
// With callbacks
|
|
336
|
-
st.do.submitProduct({
|
|
337
|
-
onSuccess: (product) => {
|
|
338
|
-
router.push(`/products/${product.id}`);
|
|
339
|
-
},
|
|
340
|
-
onError: (error) => {
|
|
341
|
-
console.error("Failed to save product:", error);
|
|
342
|
-
},
|
|
343
|
-
});
|
|
344
|
-
|
|
345
|
-
// With validation
|
|
346
|
-
useEffect(() => {
|
|
347
|
-
st.do.checkProductSubmitable();
|
|
348
|
-
}, [st.sel((s) => s.productForm)]);
|
|
349
|
-
```
|
|
350
|
-
|
|
351
|
-
## Advanced Store Patterns
|
|
352
|
-
|
|
353
|
-
### Store Composition
|
|
354
|
-
|
|
355
|
-
For complex applications, compose multiple stores:
|
|
356
|
-
|
|
357
|
-
```typescript
|
|
358
|
-
// In store.ts
|
|
359
|
-
export class RootStore extends MixStore(ProductStore, CategoryStore, VendorStore, CartStore) {}
|
|
360
|
-
|
|
361
|
-
export const storeRoot = rootStoreOf(RootStore);
|
|
362
|
-
```
|
|
363
|
-
|
|
364
|
-
### Cross-Store Operations
|
|
365
|
-
|
|
366
|
-
Access other stores from within a store:
|
|
367
|
-
|
|
368
|
-
```typescript
|
|
369
|
-
async addToCart(productId: string, quantity: number) {
|
|
370
|
-
const product = await fetch.getProduct(productId);
|
|
371
|
-
|
|
372
|
-
// Access another store
|
|
373
|
-
(this as unknown as RootStore).do.addItemToCart({
|
|
374
|
-
productId: product.id,
|
|
375
|
-
name: product.name,
|
|
376
|
-
price: product.price,
|
|
377
|
-
quantity
|
|
378
|
-
});
|
|
379
|
-
}
|
|
380
|
-
```
|
|
381
|
-
|
|
382
|
-
### Optimistic Updates
|
|
383
|
-
|
|
384
|
-
Update UI before API operations complete:
|
|
385
|
-
|
|
386
|
-
```typescript
|
|
387
|
-
async toggleProductFavorite(id: string) {
|
|
388
|
-
const { productList } = this.pick("productList");
|
|
389
|
-
|
|
390
|
-
// Find product in list
|
|
391
|
-
const index = productList.findIndex(p => p.id === id);
|
|
392
|
-
if (index === -1) return;
|
|
393
|
-
|
|
394
|
-
// Clone the list
|
|
395
|
-
const newList = [...productList];
|
|
396
|
-
|
|
397
|
-
// Optimistically update
|
|
398
|
-
newList[index] = {
|
|
399
|
-
...newList[index],
|
|
400
|
-
isFavorite: !newList[index].isFavorite
|
|
401
|
-
};
|
|
402
|
-
|
|
403
|
-
// Update UI immediately
|
|
404
|
-
this.set({ productList: newList });
|
|
405
|
-
|
|
406
|
-
// Perform actual API call
|
|
407
|
-
try {
|
|
408
|
-
await fetch.toggleProductFavorite(id);
|
|
409
|
-
} catch (error) {
|
|
410
|
-
// Revert on error
|
|
411
|
-
this.refreshProductList();
|
|
412
|
-
throw error;
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
```
|
|
416
|
-
|
|
417
|
-
### Real-time Updates
|
|
418
|
-
|
|
419
|
-
Connect stores with GraphQL subscriptions:
|
|
420
|
-
|
|
421
|
-
```typescript
|
|
422
|
-
initProductChat(productId: string) {
|
|
423
|
-
this.set({ productChatLoading: true });
|
|
424
|
-
|
|
425
|
-
// Set up subscription
|
|
426
|
-
fetch.subscribeToProductChat(productId, (message) => {
|
|
427
|
-
const { productChatMessages } = this.pick("productChatMessages");
|
|
428
|
-
this.set({
|
|
429
|
-
productChatMessages: [...productChatMessages, message]
|
|
430
|
-
});
|
|
431
|
-
});
|
|
432
|
-
|
|
433
|
-
this.set({ productChatLoading: false });
|
|
434
|
-
}
|
|
435
|
-
```
|
|
436
|
-
|
|
437
|
-
## Best Practices
|
|
438
|
-
|
|
439
|
-
1. **Naming Conventions**:
|
|
440
|
-
|
|
441
|
-
- Use `modelList{Context}` for slice names (e.g., `productListByCategory`)
|
|
442
|
-
- Use camelCase for state properties
|
|
443
|
-
- Use action verbs for method names
|
|
444
|
-
|
|
445
|
-
2. **State Management**:
|
|
446
|
-
|
|
447
|
-
- Keep UI state (loading, selected items) in the store
|
|
448
|
-
- Use `this.pick()` for accessing multiple properties
|
|
449
|
-
- Create new references for objects/arrays when updating
|
|
450
|
-
|
|
451
|
-
3. **Performance**:
|
|
452
|
-
|
|
453
|
-
- Use selective subscriptions in components:
|
|
454
|
-
```typescript
|
|
455
|
-
// Subscribe to specific state properties
|
|
456
|
-
const name = st.use.product((s) => s.name);
|
|
457
|
-
```
|
|
458
|
-
- Initialize slices only when needed
|
|
459
|
-
- Clean up subscriptions when components unmount
|
|
460
|
-
|
|
461
|
-
4. **Error Handling**:
|
|
462
|
-
|
|
463
|
-
- Use the `@Toast` decorator for user notifications
|
|
464
|
-
- Always reset loading states in finally blocks
|
|
465
|
-
- Implement retry logic for critical operations
|
|
466
|
-
|
|
467
|
-
5. **Testing**:
|
|
468
|
-
|
|
469
|
-
- Mock stores with initial state for unit tests
|
|
470
|
-
|
|
471
|
-
```typescript
|
|
472
|
-
const testStore = makeStore(
|
|
473
|
-
{
|
|
474
|
-
productList: [mockProduct1, mockProduct2],
|
|
475
|
-
},
|
|
476
|
-
ProductStore
|
|
477
|
-
);
|
|
478
|
-
|
|
479
|
-
await testStore.do.submitProduct();
|
|
480
|
-
expect(testStore.get().product).toEqual(expectedProduct);
|
|
481
|
-
```
|
|
482
|
-
|
|
483
|
-
## Complete Example
|
|
484
|
-
|
|
485
|
-
```typescript
|
|
486
|
-
import { stateOf, Store, Toast } from "@akanjs/store";
|
|
487
|
-
import * as cnst from "../cnst";
|
|
488
|
-
import { fetch } from "../useServer";
|
|
489
|
-
import { msg } from "../msg";
|
|
490
|
-
|
|
491
|
-
export class ProductStore extends stateOf(fetch.productGql, {
|
|
492
|
-
// UI State
|
|
493
|
-
productViewMode: "grid" as "grid" | "list",
|
|
494
|
-
selectedProductIds: [] as string[],
|
|
495
|
-
productFilterDrawerOpen: false,
|
|
496
|
-
|
|
497
|
-
// Business State
|
|
498
|
-
featuredProducts: [] as cnst.LightProduct[],
|
|
499
|
-
relatedProductMap: new Map<string, cnst.LightProduct[]>(),
|
|
500
|
-
|
|
501
|
-
// Reports
|
|
502
|
-
productAnalytics: null as ProductAnalytics | null,
|
|
503
|
-
productReportLoading: false,
|
|
504
|
-
}) {
|
|
505
|
-
// Selection Management
|
|
506
|
-
selectProduct(id: string) {
|
|
507
|
-
const { selectedProductIds } = this.pick("selectedProductIds");
|
|
508
|
-
this.set({
|
|
509
|
-
selectedProductIds: [...selectedProductIds, id],
|
|
510
|
-
});
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
deselectProduct(id: string) {
|
|
514
|
-
const { selectedProductIds } = this.pick("selectedProductIds");
|
|
515
|
-
this.set({
|
|
516
|
-
selectedProductIds: selectedProductIds.filter((pid) => pid !== id),
|
|
517
|
-
});
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
clearSelectedProducts() {
|
|
521
|
-
this.set({ selectedProductIds: [] });
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
// Business Operations
|
|
525
|
-
@Toast({ root: "product" })
|
|
526
|
-
async featureProduct(id: string) {
|
|
527
|
-
const product = await fetch.featureProduct(id);
|
|
528
|
-
const { featuredProducts } = this.pick("featuredProducts");
|
|
529
|
-
|
|
530
|
-
this.set({
|
|
531
|
-
featuredProducts: [...featuredProducts, product],
|
|
532
|
-
});
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
@Toast({ root: "product" })
|
|
536
|
-
async bulkUpdatePrices(percentage: number) {
|
|
537
|
-
const { selectedProductIds } = this.pick("selectedProductIds");
|
|
538
|
-
|
|
539
|
-
if (selectedProductIds.length === 0) {
|
|
540
|
-
msg.error("product.noProductsSelectedError");
|
|
541
|
-
return;
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
await fetch.updatePrices(selectedProductIds, percentage);
|
|
545
|
-
this.refreshProductList();
|
|
546
|
-
this.clearSelectedProducts();
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
// Analytics
|
|
550
|
-
async loadProductAnalytics(id: string) {
|
|
551
|
-
this.set({ productReportLoading: true });
|
|
552
|
-
|
|
553
|
-
try {
|
|
554
|
-
const analytics = await fetch.getProductAnalytics(id);
|
|
555
|
-
this.set({ productAnalytics: analytics });
|
|
556
|
-
} catch (error) {
|
|
557
|
-
msg.error("product.analyticsLoadError");
|
|
558
|
-
this.set({ productAnalytics: null });
|
|
559
|
-
} finally {
|
|
560
|
-
this.set({ productReportLoading: false });
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
// Related Products
|
|
565
|
-
async loadRelatedProducts(id: string) {
|
|
566
|
-
const { relatedProductMap } = this.pick("relatedProductMap");
|
|
567
|
-
|
|
568
|
-
// Check cache
|
|
569
|
-
if (relatedProductMap.has(id)) return;
|
|
570
|
-
|
|
571
|
-
const relatedProducts = await fetch.getRelatedProducts(id);
|
|
572
|
-
|
|
573
|
-
// Update map immutably
|
|
574
|
-
const newMap = new Map(relatedProductMap);
|
|
575
|
-
newMap.set(id, relatedProducts);
|
|
576
|
-
|
|
577
|
-
this.set({ relatedProductMap: newMap });
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
```
|
|
581
|
-
|
|
582
|
-
## File Structure Convention
|
|
583
|
-
|
|
584
|
-
Store files should follow this pattern:
|
|
585
|
-
`{apps,libs}/*/lib/{feature}/{feature}.store.ts`
|
|
586
|
-
|
|
587
|
-
Examples:
|
|
588
|
-
|
|
589
|
-
- `apps/commerce/lib/products/product.store.ts`
|
|
590
|
-
- `libs/shared/lib/auth/auth.store.ts`
|