@akanjs/cli 0.0.149 → 0.0.150
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/cjs/index.js +17 -11
- package/cjs/src/guidelines/componentRule/componentRule.generate.json +131 -0
- package/cjs/src/guidelines/cssRule/cssRule.generate.json +93 -0
- package/cjs/src/guidelines/databaseModule/databaseModule.generate.json +51 -0
- package/cjs/src/guidelines/docPageRule/docPageRule.generate.json +72 -0
- package/cjs/src/guidelines/enumConstant/enumConstant.generate.json +24 -0
- package/cjs/src/guidelines/fieldDecorator/fieldDecorator.generate.json +135 -0
- package/cjs/src/guidelines/framework/framework.generate.json +119 -0
- package/cjs/src/guidelines/howToUseStore/howToUseStore.generate.json +0 -0
- package/cjs/src/guidelines/modelConstant/modelConstant.generate.json +135 -0
- package/cjs/src/guidelines/modelDictionary/modelDictionary.generate.json +115 -0
- package/cjs/src/guidelines/modelDocument/modelDocument.generate.json +129 -0
- package/cjs/src/guidelines/modelService/modelService.generate.json +179 -0
- package/cjs/src/guidelines/modelSignal/modelSignal.generate.json +202 -0
- package/cjs/src/guidelines/modelStore/modelStore.generate.json +130 -0
- package/cjs/src/guidelines/modelTemplate/modelTemplate.generate.json +104 -0
- package/cjs/src/guidelines/modelUnit/modelUnit.generate.json +92 -0
- package/cjs/src/guidelines/modelUtil/modelUtil.generate.json +93 -0
- package/cjs/src/guidelines/modelView/modelView.generate.json +80 -0
- package/cjs/src/guidelines/modelZone/modelZone.generate.json +126 -0
- package/cjs/src/guidelines/scalarConstant/scalarConstant.generate.json +102 -0
- package/cjs/src/guidelines/scalarDictionary/scalarDictionary.generate.json +83 -0
- package/cjs/src/guidelines/scalarModule/scalarModule.generate.json +35 -0
- package/cjs/src/guidelines/sharedUiUsage/sharedUiUsage.generate.json +115 -0
- package/cjs/src/guidelines/utilUiUsage/utilUiUsage.generate.json +140 -0
- package/cjs/src/templates/app/app/[lang]/(__appName__)/(public)/forgotpassword/page.js +47 -0
- package/cjs/src/templates/app/app/[lang]/(__appName__)/(public)/page.js +128 -0
- package/cjs/src/templates/app/app/[lang]/(__appName__)/(public)/privacy/page.js +42 -0
- package/cjs/src/templates/app/app/[lang]/(__appName__)/(public)/signin/page.js +50 -0
- package/cjs/src/templates/app/app/[lang]/(__appName__)/(public)/termsofservice/page.js +41 -0
- package/cjs/src/templates/app/app/[lang]/(__appName__)/(public)/unknown/page.js +51 -0
- package/cjs/src/templates/app/app/[lang]/(__appName__)/(user)/layout.js +43 -0
- package/cjs/src/templates/app/app/[lang]/(__appName__)/(user)/self/page.js +60 -0
- package/cjs/src/templates/app/app/[lang]/(__appName__)/layout.js +54 -0
- package/cjs/src/templates/app/app/[lang]/admin/layout.js +54 -0
- package/cjs/src/templates/app/app/[lang]/admin/page.js +63 -0
- package/cjs/src/templates/app/app/csr.js +34 -0
- package/cjs/src/templates/app/app/layout.js +38 -0
- package/cjs/src/templates/app/lib/setting/Setting.Template.js +57 -0
- package/cjs/src/templates/app/lib/setting/Setting.Unit.js +38 -0
- package/cjs/src/templates/app/lib/setting/Setting.Util.js +34 -0
- package/cjs/src/templates/app/lib/setting/Setting.View.js +51 -0
- package/cjs/src/templates/app/lib/setting/Setting.Zone.js +80 -0
- package/cjs/src/templates/app/lib/setting/index.js +61 -0
- package/cjs/src/templates/app/lib/summary/Summary.Template.js +43 -0
- package/cjs/src/templates/app/lib/summary/Summary.Unit.js +38 -0
- package/cjs/src/templates/app/lib/summary/Summary.Util.js +33 -0
- package/cjs/src/templates/app/lib/summary/Summary.View.js +51 -0
- package/cjs/src/templates/app/lib/summary/Summary.Zone.js +62 -0
- package/cjs/src/templates/app/lib/summary/index.js +67 -0
- package/cjs/src/templates/app/lib/user/User.Template.js +65 -0
- package/cjs/src/templates/app/lib/user/User.Unit.js +38 -0
- package/cjs/src/templates/app/lib/user/User.Util.js +94 -0
- package/cjs/src/templates/app/lib/user/User.View.js +66 -0
- package/cjs/src/templates/app/lib/user/User.Zone.js +74 -0
- package/cjs/src/templates/app/lib/user/index.js +61 -0
- 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 +70 -0
- package/cjs/src/templates/app/ui/Footer.js +67 -0
- package/cjs/src/templates/app/ui/MainHeader.js +131 -0
- package/cjs/src/templates/crudPages/[__model__Id]/edit/page.js +73 -0
- package/cjs/src/templates/crudPages/[__model__Id]/page.js +83 -0
- package/cjs/src/templates/crudPages/new/page.js +70 -0
- package/cjs/src/templates/crudPages/page.js +71 -0
- package/cjs/src/templates/libRoot/lib/setting/Setting.Template.js +57 -0
- package/cjs/src/templates/libRoot/lib/setting/Setting.Unit.js +38 -0
- package/cjs/src/templates/libRoot/lib/setting/Setting.Util.js +34 -0
- package/cjs/src/templates/libRoot/lib/setting/Setting.View.js +51 -0
- package/cjs/src/templates/libRoot/lib/setting/Setting.Zone.js +80 -0
- package/cjs/src/templates/libRoot/lib/setting/index.js +61 -0
- package/cjs/src/templates/libRoot/lib/summary/Summary.Template.js +43 -0
- package/cjs/src/templates/libRoot/lib/summary/Summary.Unit.js +38 -0
- package/cjs/src/templates/libRoot/lib/summary/Summary.Util.js +33 -0
- package/cjs/src/templates/libRoot/lib/summary/Summary.View.js +51 -0
- package/cjs/src/templates/libRoot/lib/summary/Summary.Zone.js +62 -0
- package/cjs/src/templates/libRoot/lib/summary/index.js +67 -0
- package/cjs/src/templates/libRoot/lib/user/User.Template.js +65 -0
- package/cjs/src/templates/libRoot/lib/user/User.Unit.js +38 -0
- package/cjs/src/templates/libRoot/lib/user/User.Util.js +94 -0
- package/cjs/src/templates/libRoot/lib/user/User.View.js +66 -0
- package/cjs/src/templates/libRoot/lib/user/User.Zone.js +74 -0
- package/cjs/src/templates/libRoot/lib/user/index.js +61 -0
- package/cjs/src/templates/module/__Model__.Template.js +54 -0
- package/cjs/src/templates/module/__Model__.Unit.js +42 -0
- package/cjs/src/templates/module/__Model__.Util.js +70 -0
- package/cjs/src/templates/module/__Model__.View.js +48 -0
- package/cjs/src/templates/module/__Model__.Zone.js +83 -0
- package/cjs/src/templates/module/index.js +61 -0
- package/esm/index.js +17 -11
- package/esm/src/guidelines/componentRule/componentRule.generate.json +131 -0
- package/esm/src/guidelines/cssRule/cssRule.generate.json +93 -0
- package/esm/src/guidelines/databaseModule/databaseModule.generate.json +51 -0
- package/esm/src/guidelines/docPageRule/docPageRule.generate.json +72 -0
- package/esm/src/guidelines/enumConstant/enumConstant.generate.json +24 -0
- package/esm/src/guidelines/fieldDecorator/fieldDecorator.generate.json +135 -0
- package/esm/src/guidelines/framework/framework.generate.json +119 -0
- package/esm/src/guidelines/howToUseStore/howToUseStore.generate.json +0 -0
- package/esm/src/guidelines/modelConstant/modelConstant.generate.json +135 -0
- package/esm/src/guidelines/modelDictionary/modelDictionary.generate.json +115 -0
- package/esm/src/guidelines/modelDocument/modelDocument.generate.json +129 -0
- package/esm/src/guidelines/modelService/modelService.generate.json +179 -0
- package/esm/src/guidelines/modelSignal/modelSignal.generate.json +202 -0
- package/esm/src/guidelines/modelStore/modelStore.generate.json +130 -0
- package/esm/src/guidelines/modelTemplate/modelTemplate.generate.json +104 -0
- package/esm/src/guidelines/modelUnit/modelUnit.generate.json +92 -0
- package/esm/src/guidelines/modelUtil/modelUtil.generate.json +93 -0
- package/esm/src/guidelines/modelView/modelView.generate.json +80 -0
- package/esm/src/guidelines/modelZone/modelZone.generate.json +126 -0
- package/esm/src/guidelines/scalarConstant/scalarConstant.generate.json +102 -0
- package/esm/src/guidelines/scalarDictionary/scalarDictionary.generate.json +83 -0
- package/esm/src/guidelines/scalarModule/scalarModule.generate.json +35 -0
- package/esm/src/guidelines/sharedUiUsage/sharedUiUsage.generate.json +115 -0
- package/esm/src/guidelines/utilUiUsage/utilUiUsage.generate.json +140 -0
- package/esm/src/templates/app/app/[lang]/(__appName__)/(public)/forgotpassword/page.js +27 -0
- package/esm/src/templates/app/app/[lang]/(__appName__)/(public)/page.js +108 -0
- package/esm/src/templates/app/app/[lang]/(__appName__)/(public)/privacy/page.js +22 -0
- package/esm/src/templates/app/app/[lang]/(__appName__)/(public)/signin/page.js +30 -0
- package/esm/src/templates/app/app/[lang]/(__appName__)/(public)/termsofservice/page.js +21 -0
- package/esm/src/templates/app/app/[lang]/(__appName__)/(public)/unknown/page.js +31 -0
- package/esm/src/templates/app/app/[lang]/(__appName__)/(user)/layout.js +23 -0
- package/esm/src/templates/app/app/[lang]/(__appName__)/(user)/self/page.js +40 -0
- package/esm/src/templates/app/app/[lang]/(__appName__)/layout.js +34 -0
- package/esm/src/templates/app/app/[lang]/admin/layout.js +34 -0
- package/esm/src/templates/app/app/[lang]/admin/page.js +43 -0
- package/esm/src/templates/app/app/csr.js +14 -0
- package/esm/src/templates/app/app/layout.js +18 -0
- package/esm/src/templates/app/lib/setting/Setting.Template.js +37 -0
- package/esm/src/templates/app/lib/setting/Setting.Unit.js +18 -0
- package/esm/src/templates/app/lib/setting/Setting.Util.js +14 -0
- package/esm/src/templates/app/lib/setting/Setting.View.js +31 -0
- package/esm/src/templates/app/lib/setting/Setting.Zone.js +60 -0
- package/esm/src/templates/app/lib/setting/index.js +41 -0
- package/esm/src/templates/app/lib/summary/Summary.Template.js +23 -0
- package/esm/src/templates/app/lib/summary/Summary.Unit.js +18 -0
- package/esm/src/templates/app/lib/summary/Summary.Util.js +13 -0
- package/esm/src/templates/app/lib/summary/Summary.View.js +31 -0
- package/esm/src/templates/app/lib/summary/Summary.Zone.js +42 -0
- package/esm/src/templates/app/lib/summary/index.js +47 -0
- package/esm/src/templates/app/lib/user/User.Template.js +45 -0
- package/esm/src/templates/app/lib/user/User.Unit.js +18 -0
- package/esm/src/templates/app/lib/user/User.Util.js +74 -0
- package/esm/src/templates/app/lib/user/User.View.js +46 -0
- package/esm/src/templates/app/lib/user/User.Zone.js +54 -0
- package/esm/src/templates/app/lib/user/index.js +41 -0
- 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 +70 -0
- package/esm/src/templates/app/ui/Footer.js +47 -0
- package/esm/src/templates/app/ui/MainHeader.js +111 -0
- package/esm/src/templates/crudPages/[__model__Id]/edit/page.js +53 -0
- package/esm/src/templates/crudPages/[__model__Id]/page.js +63 -0
- package/esm/src/templates/crudPages/new/page.js +50 -0
- package/esm/src/templates/crudPages/page.js +51 -0
- package/esm/src/templates/libRoot/lib/setting/Setting.Template.js +37 -0
- package/esm/src/templates/libRoot/lib/setting/Setting.Unit.js +18 -0
- package/esm/src/templates/libRoot/lib/setting/Setting.Util.js +14 -0
- package/esm/src/templates/libRoot/lib/setting/Setting.View.js +31 -0
- package/esm/src/templates/libRoot/lib/setting/Setting.Zone.js +60 -0
- package/esm/src/templates/libRoot/lib/setting/index.js +41 -0
- package/esm/src/templates/libRoot/lib/summary/Summary.Template.js +23 -0
- package/esm/src/templates/libRoot/lib/summary/Summary.Unit.js +18 -0
- package/esm/src/templates/libRoot/lib/summary/Summary.Util.js +13 -0
- package/esm/src/templates/libRoot/lib/summary/Summary.View.js +31 -0
- package/esm/src/templates/libRoot/lib/summary/Summary.Zone.js +42 -0
- package/esm/src/templates/libRoot/lib/summary/index.js +47 -0
- package/esm/src/templates/libRoot/lib/user/User.Template.js +45 -0
- package/esm/src/templates/libRoot/lib/user/User.Unit.js +18 -0
- package/esm/src/templates/libRoot/lib/user/User.Util.js +74 -0
- package/esm/src/templates/libRoot/lib/user/User.View.js +46 -0
- package/esm/src/templates/libRoot/lib/user/User.Zone.js +54 -0
- package/esm/src/templates/libRoot/lib/user/index.js +41 -0
- package/esm/src/templates/module/__Model__.Template.js +34 -0
- package/esm/src/templates/module/__Model__.Unit.js +22 -0
- package/esm/src/templates/module/__Model__.Util.js +50 -0
- package/esm/src/templates/module/__Model__.View.js +28 -0
- package/esm/src/templates/module/__Model__.Zone.js +63 -0
- package/esm/src/templates/module/index.js +41 -0
- package/package.json +1 -1
- package/src/templates/app/app/[lang]/(__appName__)/(public)/forgotpassword/page.d.ts +9 -0
- package/src/templates/app/app/[lang]/(__appName__)/(public)/page.d.ts +9 -0
- package/src/templates/app/app/[lang]/(__appName__)/(public)/privacy/page.d.ts +9 -0
- package/src/templates/app/app/[lang]/(__appName__)/(public)/signin/page.d.ts +9 -0
- package/src/templates/app/app/[lang]/(__appName__)/(public)/termsofservice/page.d.ts +10 -0
- package/src/templates/app/app/[lang]/(__appName__)/(public)/unknown/page.d.ts +9 -0
- package/src/templates/app/app/[lang]/(__appName__)/(user)/layout.d.ts +9 -0
- package/src/templates/app/app/[lang]/(__appName__)/(user)/self/page.d.ts +9 -0
- package/src/templates/app/app/[lang]/(__appName__)/layout.d.ts +9 -0
- package/src/templates/app/app/[lang]/admin/layout.d.ts +9 -0
- package/src/templates/app/app/[lang]/admin/page.d.ts +9 -0
- package/src/templates/app/app/csr.d.ts +9 -0
- package/src/templates/app/app/layout.d.ts +9 -0
- package/src/templates/app/lib/setting/Setting.Template.d.ts +9 -0
- package/src/templates/app/lib/setting/Setting.Unit.d.ts +9 -0
- package/src/templates/app/lib/setting/Setting.Util.d.ts +9 -0
- package/src/templates/app/lib/setting/Setting.View.d.ts +9 -0
- package/src/templates/app/lib/setting/Setting.Zone.d.ts +9 -0
- package/src/templates/app/lib/setting/index.d.ts +9 -0
- package/src/templates/app/lib/summary/Summary.Template.d.ts +9 -0
- package/src/templates/app/lib/summary/Summary.Unit.d.ts +9 -0
- package/src/templates/app/lib/summary/Summary.Util.d.ts +9 -0
- package/src/templates/app/lib/summary/Summary.View.d.ts +9 -0
- package/src/templates/app/lib/summary/Summary.Zone.d.ts +9 -0
- package/src/templates/app/lib/summary/index.d.ts +9 -0
- package/src/templates/app/lib/user/User.Template.d.ts +9 -0
- package/src/templates/app/lib/user/User.Unit.d.ts +9 -0
- package/src/templates/app/lib/user/User.Util.d.ts +9 -0
- package/src/templates/app/lib/user/User.View.d.ts +9 -0
- package/src/templates/app/lib/user/User.Zone.d.ts +9 -0
- package/src/templates/app/lib/user/index.d.ts +9 -0
- package/src/templates/app/ui/Footer.d.ts +9 -0
- package/src/templates/app/ui/MainHeader.d.ts +10 -0
- package/src/templates/crudPages/[__model__Id]/edit/page.d.ts +11 -0
- package/src/templates/crudPages/[__model__Id]/page.d.ts +11 -0
- package/src/templates/crudPages/new/page.d.ts +11 -0
- package/src/templates/crudPages/page.d.ts +11 -0
- package/src/templates/libRoot/lib/setting/Setting.Template.d.ts +9 -0
- package/src/templates/libRoot/lib/setting/Setting.Unit.d.ts +9 -0
- package/src/templates/libRoot/lib/setting/Setting.Util.d.ts +9 -0
- package/src/templates/libRoot/lib/setting/Setting.View.d.ts +9 -0
- package/src/templates/libRoot/lib/setting/Setting.Zone.d.ts +9 -0
- package/src/templates/libRoot/lib/setting/index.d.ts +9 -0
- package/src/templates/libRoot/lib/summary/Summary.Template.d.ts +9 -0
- package/src/templates/libRoot/lib/summary/Summary.Unit.d.ts +9 -0
- package/src/templates/libRoot/lib/summary/Summary.Util.d.ts +9 -0
- package/src/templates/libRoot/lib/summary/Summary.View.d.ts +9 -0
- package/src/templates/libRoot/lib/summary/Summary.Zone.d.ts +9 -0
- package/src/templates/libRoot/lib/summary/index.d.ts +9 -0
- package/src/templates/libRoot/lib/user/User.Template.d.ts +9 -0
- package/src/templates/libRoot/lib/user/User.Unit.d.ts +9 -0
- package/src/templates/libRoot/lib/user/User.Util.d.ts +9 -0
- package/src/templates/libRoot/lib/user/User.View.d.ts +9 -0
- package/src/templates/libRoot/lib/user/User.Zone.d.ts +9 -0
- package/src/templates/libRoot/lib/user/index.d.ts +9 -0
- package/src/templates/module/__Model__.Template.d.ts +11 -0
- package/src/templates/module/__Model__.Unit.d.ts +11 -0
- package/src/templates/module/__Model__.Util.d.ts +11 -0
- package/src/templates/module/__Model__.View.d.ts +11 -0
- package/src/templates/module/__Model__.Zone.d.ts +11 -0
- package/src/templates/module/index.d.ts +11 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Model Signal",
|
|
3
|
+
"description": "How to create and implement model.signal.ts files in Akan.js",
|
|
4
|
+
"scans": [
|
|
5
|
+
{
|
|
6
|
+
"type": "source",
|
|
7
|
+
"description": "Core signal implementation files",
|
|
8
|
+
"path": "pkgs/@akanjs/signal/src/*.ts"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"type": "source",
|
|
12
|
+
"description": "Signal decorator implementation",
|
|
13
|
+
"path": "pkgs/@akanjs/signal/src/decorator/*.ts"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"type": "source",
|
|
17
|
+
"description": "DbSignal and other signal higher-order functions",
|
|
18
|
+
"path": "pkgs/@akanjs/signal/src/function/*.ts"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"type": "source",
|
|
22
|
+
"description": "Signal helper functions (resolve, emit, done, subscribe)",
|
|
23
|
+
"path": "pkgs/@akanjs/signal/src/helper/*.ts"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "source",
|
|
27
|
+
"description": "Signal converts to nestjs module",
|
|
28
|
+
"path": "pkgs/@akanjs/server/src/module.ts"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"type": "example",
|
|
32
|
+
"description": "Signal converts to nestjs controller",
|
|
33
|
+
"path": "pkgs/@akanjs/server/src/controller.ts"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"type": "example",
|
|
37
|
+
"description": "Signal converts to nestjs resolver",
|
|
38
|
+
"path": "pkgs/@akanjs/server/src/resolver.ts"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"type": "example",
|
|
42
|
+
"description": "Signal converts to nestjs processor",
|
|
43
|
+
"path": "pkgs/@akanjs/server/src/processor.ts"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "example",
|
|
47
|
+
"description": "Signal converts to nestjs websocket",
|
|
48
|
+
"path": "pkgs/@akanjs/server/src/websocket.ts"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"type": "example",
|
|
52
|
+
"description": "DbSignal usage examples",
|
|
53
|
+
"path": "{apps,libs}/*/lib/*/*.signal.ts",
|
|
54
|
+
"filterText": "extends DbSignal",
|
|
55
|
+
"sample": 3
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "example",
|
|
59
|
+
"description": "@Query.Public decorator examples",
|
|
60
|
+
"path": "{apps,libs}/*/lib/*/*.signal.ts",
|
|
61
|
+
"filterText": "@Query.Public",
|
|
62
|
+
"sample": 2
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "example",
|
|
66
|
+
"description": "@Query.User decorator examples",
|
|
67
|
+
"path": "{apps,libs}/*/lib/*/*.signal.ts",
|
|
68
|
+
"filterText": "@Query.User",
|
|
69
|
+
"sample": 2
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"type": "example",
|
|
73
|
+
"description": "@Query.Admin decorator examples",
|
|
74
|
+
"path": "{apps,libs}/*/lib/*/*.signal.ts",
|
|
75
|
+
"filterText": "@Query.Admin",
|
|
76
|
+
"sample": 2
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"type": "example",
|
|
80
|
+
"description": "@Mutation.User decorator examples",
|
|
81
|
+
"path": "{apps,libs}/*/lib/*/*.signal.ts",
|
|
82
|
+
"filterText": "@Mutation.User",
|
|
83
|
+
"sample": 2
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"type": "example",
|
|
87
|
+
"description": "@Mutation.Admin decorator examples",
|
|
88
|
+
"path": "{apps,libs}/*/lib/*/*.signal.ts",
|
|
89
|
+
"filterText": "@Mutation.Admin",
|
|
90
|
+
"sample": 2
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"type": "example",
|
|
94
|
+
"description": "@Message decorator examples",
|
|
95
|
+
"path": "{apps,libs}/*/lib/*/*.signal.ts",
|
|
96
|
+
"filterText": "@Message",
|
|
97
|
+
"sample": 2
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"type": "example",
|
|
101
|
+
"description": "@Process decorator examples",
|
|
102
|
+
"path": "{apps,libs}/*/lib/*/*.signal.ts",
|
|
103
|
+
"filterText": "@Process",
|
|
104
|
+
"sample": 2
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"type": "example",
|
|
108
|
+
"description": "@Pubsub decorator examples",
|
|
109
|
+
"path": "{apps,libs}/*/lib/*/*.signal.ts",
|
|
110
|
+
"filterText": "@Pubsub",
|
|
111
|
+
"sample": 2
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"type": "example",
|
|
115
|
+
"description": "How to create slice signals with modelListIn<SliceName>",
|
|
116
|
+
"path": "{apps,libs}/*/lib/*/*.signal.ts",
|
|
117
|
+
"filterText": "ListIn",
|
|
118
|
+
"sample": 3
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"type": "example",
|
|
122
|
+
"description": "How to create slice insights with modelInsightIn<SliceName>",
|
|
123
|
+
"path": "{apps,libs}/*/lib/*/*.signal.ts",
|
|
124
|
+
"filterText": "InsightIn",
|
|
125
|
+
"sample": 3
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"type": "example",
|
|
129
|
+
"description": "Complete real-time chat implementation",
|
|
130
|
+
"path": "libs/social/lib/chatRoom/chatRoom.signal.ts",
|
|
131
|
+
"sample": 1
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"type": "example",
|
|
135
|
+
"description": "Background processing examples",
|
|
136
|
+
"path": "apps/akasys/lib/dbBackup/dbBackup.signal.ts",
|
|
137
|
+
"sample": 1
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"type": "example",
|
|
141
|
+
"description": "Search functionality examples",
|
|
142
|
+
"path": "libs/util/lib/_search/search.signal.ts",
|
|
143
|
+
"sample": 1
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"type": "example",
|
|
147
|
+
"description": "API argument decorators usage",
|
|
148
|
+
"path": "{apps,libs}/*/lib/*/*.signal.ts",
|
|
149
|
+
"filterText": "@Arg",
|
|
150
|
+
"sample": 4
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"type": "example",
|
|
154
|
+
"description": "Examples of @Self() decorator usage",
|
|
155
|
+
"path": "{apps,libs}/*/lib/*/*.signal.ts",
|
|
156
|
+
"filterText": "@Self()",
|
|
157
|
+
"sample": 3
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"type": "example",
|
|
161
|
+
"description": "Error handling in signals",
|
|
162
|
+
"path": "{apps,libs}/*/lib/*/*.signal.ts",
|
|
163
|
+
"filterText": "try {",
|
|
164
|
+
"sample": 2
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"type": "example",
|
|
168
|
+
"description": "Client-side signal imports",
|
|
169
|
+
"path": "{apps,libs}/*/lib/*/*.store.ts",
|
|
170
|
+
"filterText": "import {",
|
|
171
|
+
"sample": 3
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"update": {
|
|
175
|
+
"filePath": "./modelSignal.instruction.md",
|
|
176
|
+
"contents": [
|
|
177
|
+
"Purpose and role of model.signal.ts files",
|
|
178
|
+
"Signal class structure and core components",
|
|
179
|
+
"@Signal decorator and Signal class definition",
|
|
180
|
+
"DbSignal and other higher-order functions",
|
|
181
|
+
"Endpoint decorators (@Query, @Mutation, @Message, @Process, @Pubsub)",
|
|
182
|
+
"Parameter decorators (@Arg.Query, @Arg.Param, @Arg.Body, @Self, etc.)",
|
|
183
|
+
"Return helper functions (resolve, emit, done, subscribe)",
|
|
184
|
+
"Slice pattern for data access (modelListIn<SliceName>, modelInsightIn<SliceName>)",
|
|
185
|
+
"Client-side signal usage (direct API calls, store integration)",
|
|
186
|
+
"React component integration with signals",
|
|
187
|
+
"Real-time communication with Message and Pubsub",
|
|
188
|
+
"Background processing with Process decorator",
|
|
189
|
+
"Advanced patterns and best practices",
|
|
190
|
+
"Troubleshooting and debugging tips",
|
|
191
|
+
"Type safety and code generation"
|
|
192
|
+
],
|
|
193
|
+
"rules": [
|
|
194
|
+
"Signal should be pure JavaScript/TypeScript, and should not use any other libraries or frameworks. It is imported and converted from both server and client side.",
|
|
195
|
+
"Always use parameter decorators (@Arg.*) for all method parameters in signals.",
|
|
196
|
+
"Always use appropriate helper functions to return data (resolve, emit, done, subscribe).",
|
|
197
|
+
"Always specify explicit return types in decorators and helper functions.",
|
|
198
|
+
"Follow consistent naming conventions for signals, especially for slice methods."
|
|
199
|
+
]
|
|
200
|
+
},
|
|
201
|
+
"page": "/[lang]/akanjs/(docs)/docs/module/signal/page.tsx"
|
|
202
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Model Store",
|
|
3
|
+
"description": "How to create and implement model.store.ts files in Akan.js",
|
|
4
|
+
"scans": [
|
|
5
|
+
{
|
|
6
|
+
"type": "source",
|
|
7
|
+
"description": "Core store implementation",
|
|
8
|
+
"path": "pkgs/@akanjs/store/src/stateOf.ts"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"type": "source",
|
|
12
|
+
"description": "Store decorator implementation",
|
|
13
|
+
"path": "pkgs/@akanjs/store/src/Store.ts"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"type": "source",
|
|
17
|
+
"description": "Toast decorator implementation",
|
|
18
|
+
"path": "pkgs/@akanjs/store/src/Toast.ts"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"type": "source",
|
|
22
|
+
"description": "Store utility functions",
|
|
23
|
+
"path": "pkgs/@akanjs/store/src/makeStore.ts"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "example",
|
|
27
|
+
"description": "Basic store implementation examples",
|
|
28
|
+
"path": "{apps,libs}/*/lib/*/*.store.ts",
|
|
29
|
+
"filterText": "@Store",
|
|
30
|
+
"sample": 5
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "example",
|
|
34
|
+
"description": "Store examples with custom actions",
|
|
35
|
+
"path": "{apps,libs}/*/lib/*/*.store.ts",
|
|
36
|
+
"filterText": "async",
|
|
37
|
+
"sample": 5
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"type": "example",
|
|
41
|
+
"description": "Store examples with toast notifications",
|
|
42
|
+
"path": "{apps,libs}/*/lib/*/*.store.ts",
|
|
43
|
+
"filterText": "@Toast",
|
|
44
|
+
"sample": 3
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"type": "example",
|
|
48
|
+
"description": "Complex state management examples",
|
|
49
|
+
"path": "{apps,libs}/*/lib/*/*.store.ts",
|
|
50
|
+
"filterText": "this.pick",
|
|
51
|
+
"sample": 3
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "example",
|
|
55
|
+
"description": "Store composition examples",
|
|
56
|
+
"path": "{apps,libs}/*/lib/store.ts",
|
|
57
|
+
"filterText": "MixStore",
|
|
58
|
+
"sample": 3
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"type": "usage",
|
|
62
|
+
"description": "Store usage in forms (Template files)",
|
|
63
|
+
"path": "{apps,libs}/*/lib/*/*.Template.ts{,x}",
|
|
64
|
+
"filterText": "st.use.modelForm",
|
|
65
|
+
"sample": 3
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"type": "usage",
|
|
69
|
+
"description": "Store form submission examples",
|
|
70
|
+
"path": "{apps,libs}/*/lib/*/*.Template.ts{,x}",
|
|
71
|
+
"filterText": "submitModel",
|
|
72
|
+
"sample": 3
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"type": "usage",
|
|
76
|
+
"description": "Store list rendering examples",
|
|
77
|
+
"path": "{apps,libs}/*/lib/*/*.Zone.ts{,x}",
|
|
78
|
+
"filterText": "st.use.modelList",
|
|
79
|
+
"sample": 3
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"type": "usage",
|
|
83
|
+
"description": "Store pagination examples",
|
|
84
|
+
"path": "{apps,libs}/*/lib/*/*.Zone.ts{,x}",
|
|
85
|
+
"filterText": "setPageOf",
|
|
86
|
+
"sample": 3
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"type": "usage",
|
|
90
|
+
"description": "Store filtering examples",
|
|
91
|
+
"path": "{apps,libs}/*/lib/*/*.Util.ts{,x}",
|
|
92
|
+
"filterText": "setQueryArgsOf",
|
|
93
|
+
"sample": 3
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"type": "usage",
|
|
97
|
+
"description": "Store slice initialization examples",
|
|
98
|
+
"path": "{apps,libs}/*/lib/*/*.{View,Zone}.ts{,x}",
|
|
99
|
+
"filterText": "initModelList",
|
|
100
|
+
"sample": 3
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"update": {
|
|
104
|
+
"filePath": "./modelStore.instruction.md",
|
|
105
|
+
"contents": [
|
|
106
|
+
"Purpose and role of model.store.ts files",
|
|
107
|
+
"Store architecture overview and integration with other framework components",
|
|
108
|
+
"Basic store implementation with Store decorator and stateOf",
|
|
109
|
+
"State management: base state, custom state, and accessing state",
|
|
110
|
+
"Store actions: core CRUD operations and custom business logic",
|
|
111
|
+
"Using slices for contextual list operations",
|
|
112
|
+
"Form management: state handling, field updates, and submission",
|
|
113
|
+
"Advanced patterns: store composition, cross-store operations, optimistic updates, real-time",
|
|
114
|
+
"Best practices for naming, state management, performance, error handling, and testing",
|
|
115
|
+
"Complete example with comprehensive implementation",
|
|
116
|
+
"File structure conventions"
|
|
117
|
+
],
|
|
118
|
+
"rules": [
|
|
119
|
+
"Include diagrams showing store architecture",
|
|
120
|
+
"Provide real-world examples for all major concepts",
|
|
121
|
+
"Explain both simple and advanced usage patterns",
|
|
122
|
+
"Cover form handling in detail",
|
|
123
|
+
"Include error handling and loading state management",
|
|
124
|
+
"Explain the relationship with model.signal.ts and GraphQL operations",
|
|
125
|
+
"Include performance optimization techniques",
|
|
126
|
+
"Provide testing strategies for stores"
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
"page": "/[lang]/akanjs/(docs)/docs/module/store/page.tsx"
|
|
130
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Model Template",
|
|
3
|
+
"description": "How to create and implement Model.Template.ts files in Akan.js",
|
|
4
|
+
"scans": [
|
|
5
|
+
{
|
|
6
|
+
"type": "example",
|
|
7
|
+
"description": "Model Template examples",
|
|
8
|
+
"path": "{apps,libs}/*/lib/*/*.Template.ts{,x}",
|
|
9
|
+
"sample": 5
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"type": "usage",
|
|
13
|
+
"description": "Model Template usage in pages",
|
|
14
|
+
"path": "apps/*/app/**/page.tsx",
|
|
15
|
+
"filterText": ".Template.",
|
|
16
|
+
"sample": 3
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"type": "usage",
|
|
20
|
+
"description": "Model Template usage in Utils",
|
|
21
|
+
"path": "{apps,libs}/*/lib/*/*.Util.tsx",
|
|
22
|
+
"filterText": ".Template.",
|
|
23
|
+
"sample": 3
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "usage",
|
|
27
|
+
"description": "Model Template usage in Zones",
|
|
28
|
+
"path": "{apps,libs}/*/lib/*/*.Zone.tsx",
|
|
29
|
+
"filterText": ".Template.",
|
|
30
|
+
"sample": 3
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "reference",
|
|
34
|
+
"description": "Form Field components",
|
|
35
|
+
"path": "libs/shared/ui/Field.tsx",
|
|
36
|
+
"sample": 5
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "reference",
|
|
40
|
+
"description": "Form validation examples",
|
|
41
|
+
"path": "{apps,libs}/*/lib/**/*.Template.tsx",
|
|
42
|
+
"filterText": "validate",
|
|
43
|
+
"sample": 3
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "reference",
|
|
47
|
+
"description": "Store integration examples",
|
|
48
|
+
"path": "{apps,libs}/*/lib/**/*.store.ts",
|
|
49
|
+
"filterText": "Form",
|
|
50
|
+
"sample": 3
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"type": "reference",
|
|
54
|
+
"description": "Internationalization with usePage",
|
|
55
|
+
"path": "{apps,libs}/*/lib/**/usePage.{ts,tsx}",
|
|
56
|
+
"sample": 1
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"type": "reference",
|
|
60
|
+
"description": "Integration with Model.constant.ts",
|
|
61
|
+
"path": "{apps,libs}/*/lib/**/*.constant.ts",
|
|
62
|
+
"filterText": "@Model.Input",
|
|
63
|
+
"sample": 3
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"update": {
|
|
67
|
+
"filePath": "./modelTemplate.instruction.md",
|
|
68
|
+
"contents": [
|
|
69
|
+
"Purpose and role of Model.Template.tsx files",
|
|
70
|
+
"File location and naming conventions",
|
|
71
|
+
"Basic structure and component patterns",
|
|
72
|
+
"Integration with store state management",
|
|
73
|
+
"Field types and form components",
|
|
74
|
+
"Form validation approaches",
|
|
75
|
+
"Internationalization with usePage",
|
|
76
|
+
"Form layout patterns and best practices",
|
|
77
|
+
"Using templates in pages, utilities, and zones",
|
|
78
|
+
"State management and lifecycle methods",
|
|
79
|
+
"Performance optimization techniques",
|
|
80
|
+
"Accessibility considerations",
|
|
81
|
+
"Common patterns and reusable components",
|
|
82
|
+
"Form state integration with database models",
|
|
83
|
+
"Troubleshooting common issues",
|
|
84
|
+
"Integration with API calls and form submission"
|
|
85
|
+
],
|
|
86
|
+
"rules": [
|
|
87
|
+
"Model.Template.tsx is a client component, so it should include 'use client' directive",
|
|
88
|
+
"Model.Template.tsx components should accept an optional id parameter to support both creation and editing",
|
|
89
|
+
"Use Form components from the Field namespace for consistent UI and validation",
|
|
90
|
+
"Always connect form state to Zustand store via st.use.[model]Form()",
|
|
91
|
+
"Update form state using st.do.set[Field]On[Model]() actions",
|
|
92
|
+
"Use usePage() hook for internationalization of labels and messages",
|
|
93
|
+
"Implement form validation at field level when possible",
|
|
94
|
+
"Reset form state on component unmount to prevent stale data",
|
|
95
|
+
"Split complex forms into smaller, focused components",
|
|
96
|
+
"Follow accessibility best practices for all form fields",
|
|
97
|
+
"Use consistent layout patterns across the application",
|
|
98
|
+
"Provide clear validation feedback and error messages",
|
|
99
|
+
"Initialize form data from API when editing existing models",
|
|
100
|
+
"Implement proper error handling for form submissions"
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
"page": "/[lang]/akanjs/(docs)/docs/module/template/page.tsx"
|
|
104
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Model Unit",
|
|
3
|
+
"description": "How to create and implement Model.Unit.tsx files in Akan.js",
|
|
4
|
+
"scans": [
|
|
5
|
+
{
|
|
6
|
+
"type": "example",
|
|
7
|
+
"description": "Model Unit examples",
|
|
8
|
+
"path": "{apps,libs}/*/lib/*/*.Unit.tsx",
|
|
9
|
+
"sample": 5
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"type": "implementation",
|
|
13
|
+
"description": "Model Unit typical implementations",
|
|
14
|
+
"path": "{apps,libs}/*/lib/**/*.Unit.tsx",
|
|
15
|
+
"filterText": "export const Abstract",
|
|
16
|
+
"sample": 3
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"type": "implementation",
|
|
20
|
+
"description": "Model Unit Card implementations",
|
|
21
|
+
"path": "{apps,libs}/*/lib/**/*.Unit.tsx",
|
|
22
|
+
"filterText": "export const Card",
|
|
23
|
+
"sample": 2
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "usage",
|
|
27
|
+
"description": "Model Unit usage in pages",
|
|
28
|
+
"path": "apps/*/app/**/page.tsx",
|
|
29
|
+
"filterText": ".Unit.",
|
|
30
|
+
"sample": 1
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "usage",
|
|
34
|
+
"description": "Model Unit usage in Utils",
|
|
35
|
+
"path": "{apps,libs}/*/lib/*/*.Util.tsx",
|
|
36
|
+
"filterText": ".Unit.",
|
|
37
|
+
"sample": 1
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"type": "usage",
|
|
41
|
+
"description": "Model Unit usage in Templates",
|
|
42
|
+
"path": "{apps,libs}/*/lib/*/*.Template.tsx",
|
|
43
|
+
"filterText": ".Unit.",
|
|
44
|
+
"sample": 1
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"type": "usage",
|
|
48
|
+
"description": "Model Unit usage in Zones",
|
|
49
|
+
"path": "{apps,libs}/*/lib/*/*.Zone.tsx",
|
|
50
|
+
"filterText": ".Unit.",
|
|
51
|
+
"sample": 3
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "reference",
|
|
55
|
+
"description": "Integration with database models",
|
|
56
|
+
"path": "{apps,libs}/*/lib/*/*.document.ts",
|
|
57
|
+
"sample": 1
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"type": "reference",
|
|
61
|
+
"description": "Integration with model constants",
|
|
62
|
+
"path": "{apps,libs}/*/lib/*/*.constant.ts",
|
|
63
|
+
"sample": 1
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"update": {
|
|
67
|
+
"filePath": "./modelUnit.instruction.md",
|
|
68
|
+
"contents": [
|
|
69
|
+
"Purpose and role of Model.Unit.tsx files",
|
|
70
|
+
"How to create Model.Unit.tsx files",
|
|
71
|
+
"Common export patterns (Abstract, Card, Full, etc.)",
|
|
72
|
+
"Integration with LightModel types from constants",
|
|
73
|
+
"How to use Model.Unit.tsx files in pages",
|
|
74
|
+
"How to use Model.Unit.tsx files in Utils",
|
|
75
|
+
"How to use Model.Unit.tsx files in Zones",
|
|
76
|
+
"How to use Model.Unit.tsx files in Templates",
|
|
77
|
+
"Best practices for performance optimization",
|
|
78
|
+
"Common component patterns and variations"
|
|
79
|
+
],
|
|
80
|
+
"rules": [
|
|
81
|
+
"Model.Unit.tsx is a server component, so it should not use client-side hooks like useEffect, useState, etc.",
|
|
82
|
+
"Model.Unit.tsx is a presentation component of cnst.LightModel to reuse in pages, Utils, Zones, and Templates, etc.",
|
|
83
|
+
"Always accept className prop for styling customization",
|
|
84
|
+
"Create multiple export variations (Abstract, Card, Full) for different use cases",
|
|
85
|
+
"Use semantic HTML and ensure accessibility",
|
|
86
|
+
"Focus on presentation only - do not include business logic",
|
|
87
|
+
"Include href prop for navigation when appropriate",
|
|
88
|
+
"Ensure proper image handling with the Image component from @util/ui"
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
"page": "/[lang]/akanjs/(docs)/docs/module/unit/page.tsx"
|
|
92
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Model Util",
|
|
3
|
+
"description": "How to create and implement Model.Util.ts files in Akan.js",
|
|
4
|
+
"scans": [
|
|
5
|
+
{
|
|
6
|
+
"type": "example",
|
|
7
|
+
"description": "Model Util examples",
|
|
8
|
+
"path": "{apps,libs}/*/lib/*/*.Util.ts{,x}",
|
|
9
|
+
"sample": 5
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"type": "source",
|
|
13
|
+
"description": "Example of high-quality Model.Util implementation",
|
|
14
|
+
"path": "libs/shared/lib/admin/Admin.Util.tsx"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"type": "source",
|
|
18
|
+
"description": "Example of complex Model.Util implementation",
|
|
19
|
+
"path": "libs/shared/lib/user/User.Util.tsx"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "usage",
|
|
23
|
+
"description": "Model Util usage in pages",
|
|
24
|
+
"path": "apps/*/app/**/page.tsx",
|
|
25
|
+
"filterText": ".Util.",
|
|
26
|
+
"sample": 3
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"type": "usage",
|
|
30
|
+
"description": "Model Util usage in Units",
|
|
31
|
+
"path": "{apps,libs}/*/lib/*/*.Unit.tsx",
|
|
32
|
+
"filterText": ".Util.",
|
|
33
|
+
"sample": 3
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"type": "usage",
|
|
37
|
+
"description": "Model Util usage in Templates",
|
|
38
|
+
"path": "{apps,libs}/*/lib/*/*.Template.tsx",
|
|
39
|
+
"filterText": ".Util.",
|
|
40
|
+
"sample": 2
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"type": "usage",
|
|
44
|
+
"description": "Model Util usage in Views",
|
|
45
|
+
"path": "{apps,libs}/*/lib/*/*.View.tsx",
|
|
46
|
+
"filterText": ".Util.",
|
|
47
|
+
"sample": 3
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"type": "usage",
|
|
51
|
+
"description": "Model Util usage in Zones",
|
|
52
|
+
"path": "{apps,libs}/*/lib/*/*.Zone.tsx",
|
|
53
|
+
"filterText": ".Util.",
|
|
54
|
+
"sample": 3
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"type": "related",
|
|
58
|
+
"description": "Relationship with model.store.ts",
|
|
59
|
+
"path": "{apps,libs}/*/lib/*/*.{store,signal}.ts",
|
|
60
|
+
"sample": 2
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"update": {
|
|
64
|
+
"filePath": "./modelUtil.instruction.md",
|
|
65
|
+
"contents": [
|
|
66
|
+
"Purpose and role of Model.Util.ts files",
|
|
67
|
+
"How to create Model.Util.ts files",
|
|
68
|
+
"Common patterns and implementations",
|
|
69
|
+
"Using with store actions and state",
|
|
70
|
+
"Using with signal API calls",
|
|
71
|
+
"Performance optimization techniques",
|
|
72
|
+
"How to use Model.Util.ts files in pages",
|
|
73
|
+
"How to use Model.Util.ts files in Units",
|
|
74
|
+
"How to use Model.Util.ts files in Templates",
|
|
75
|
+
"How to use Model.Util.ts files in Views",
|
|
76
|
+
"How to use Model.Util.ts files in Zones",
|
|
77
|
+
"Best practices and error handling"
|
|
78
|
+
],
|
|
79
|
+
"rules": [
|
|
80
|
+
"Model.Util.tsx is a client component, so it can use client-side hooks like useEffect, useState, etc.",
|
|
81
|
+
"Model.Util.tsx is a utility component to reuse in pages, Units, Templates, Views, and Zones, etc.",
|
|
82
|
+
"Util components should be focused on a single responsibility",
|
|
83
|
+
"Util can be a wrapper component for using in server components",
|
|
84
|
+
"Util can be a wrapper component for store actions or signal api calls",
|
|
85
|
+
"Util components should handle their own loading and error states",
|
|
86
|
+
"Always use TypeScript for type safety in props and returned values",
|
|
87
|
+
"Consider memoization for performance-critical components",
|
|
88
|
+
"Follow consistent naming conventions (e.g., ActionButton, FilterPanel)",
|
|
89
|
+
"Document props with JSDoc comments for better IDE support"
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
"page": "/[lang]/akanjs/(docs)/docs/module/util/page.tsx"
|
|
93
|
+
}
|