@akanjs/cli 0.0.142 → 0.0.144

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (349) hide show
  1. package/README.md +8 -0
  2. package/cjs/index.js +2437 -3204
  3. package/cjs/src/guidelines/___library/sharedUiStructureDescription.en.md +786 -0
  4. package/cjs/src/guidelines/___library/utilUiStructureDescription.en.md +395 -0
  5. package/cjs/src/guidelines/___lint/lintRuleDescription.en.md +64 -0
  6. package/cjs/src/guidelines/___module/moduleStructureDescription.en.md +80 -0
  7. package/cjs/src/guidelines/componentRule/componentRule.instruction.md +732 -0
  8. package/cjs/src/guidelines/databaseModule/databaseModule.instruction.md +691 -0
  9. package/cjs/src/guidelines/enumConstant/enumConstant.instruction.md +232 -0
  10. package/cjs/src/guidelines/fieldDecorator/fieldDecorator.instruction.md +611 -0
  11. package/cjs/src/guidelines/framework/framework.instruction.md +1112 -0
  12. package/cjs/src/guidelines/modelConstant/modelConstant.instruction.md +958 -0
  13. package/cjs/src/guidelines/modelDictionary/modelDictionary.instruction.md +583 -0
  14. package/cjs/src/guidelines/modelDocument/modelDocument.instruction.md +683 -0
  15. package/cjs/src/guidelines/modelService/modelService.instruction.md +935 -0
  16. package/cjs/src/guidelines/modelSignal/modelSignal.instruction.md +588 -0
  17. package/cjs/src/guidelines/modelStore/modelStore.instruction.md +591 -0
  18. package/cjs/src/guidelines/modelTemplate/modelTemplate.instruction.md +577 -0
  19. package/cjs/src/guidelines/modelUnit/modelUnit.instruction.md +833 -0
  20. package/cjs/src/guidelines/modelUtil/modelUtil.instruction.md +752 -0
  21. package/cjs/src/guidelines/modelView/modelView.instruction.md +1005 -0
  22. package/cjs/src/guidelines/modelZone/modelZone.instruction.md +528 -0
  23. package/cjs/src/guidelines/scalarConstant/scalarConstant.instruction.md +489 -0
  24. package/cjs/src/guidelines/scalarDictionary/scalarDictionary.instruction.md +347 -0
  25. package/cjs/src/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +318 -0
  26. package/cjs/src/guidelines/utilUiUsage/utilUiUsage.instruction.md +339 -0
  27. package/cjs/src/templates/module/__model__.dictionary.js +4 -5
  28. package/esm/index.js +2524 -3286
  29. package/esm/src/guidelines/___library/sharedUiStructureDescription.en.md +786 -0
  30. package/esm/src/guidelines/___library/utilUiStructureDescription.en.md +395 -0
  31. package/esm/src/guidelines/___lint/lintRuleDescription.en.md +64 -0
  32. package/esm/src/guidelines/___module/moduleStructureDescription.en.md +80 -0
  33. package/esm/src/guidelines/componentRule/componentRule.instruction.md +732 -0
  34. package/esm/src/guidelines/databaseModule/databaseModule.instruction.md +691 -0
  35. package/esm/src/guidelines/enumConstant/enumConstant.instruction.md +232 -0
  36. package/esm/src/guidelines/fieldDecorator/fieldDecorator.instruction.md +611 -0
  37. package/esm/src/guidelines/framework/framework.instruction.md +1112 -0
  38. package/esm/src/guidelines/modelConstant/modelConstant.instruction.md +958 -0
  39. package/esm/src/guidelines/modelDictionary/modelDictionary.instruction.md +583 -0
  40. package/esm/src/guidelines/modelDocument/modelDocument.instruction.md +683 -0
  41. package/esm/src/guidelines/modelService/modelService.instruction.md +935 -0
  42. package/esm/src/guidelines/modelSignal/modelSignal.instruction.md +588 -0
  43. package/esm/src/guidelines/modelStore/modelStore.instruction.md +591 -0
  44. package/esm/src/guidelines/modelTemplate/modelTemplate.instruction.md +577 -0
  45. package/esm/src/guidelines/modelUnit/modelUnit.instruction.md +833 -0
  46. package/esm/src/guidelines/modelUtil/modelUtil.instruction.md +752 -0
  47. package/esm/src/guidelines/modelView/modelView.instruction.md +1005 -0
  48. package/esm/src/guidelines/modelZone/modelZone.instruction.md +528 -0
  49. package/esm/src/guidelines/scalarConstant/scalarConstant.instruction.md +489 -0
  50. package/esm/src/guidelines/scalarDictionary/scalarDictionary.instruction.md +347 -0
  51. package/esm/src/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +318 -0
  52. package/esm/src/guidelines/utilUiUsage/utilUiUsage.instruction.md +339 -0
  53. package/esm/src/templates/module/__model__.dictionary.js +4 -5
  54. package/package.json +3 -1
  55. package/src/guideline/guideline.command.d.ts +7 -0
  56. package/src/guideline/guideline.prompt.d.ts +15 -0
  57. package/src/guideline/guideline.runner.d.ts +5 -0
  58. package/src/guideline/guideline.script.d.ts +6 -0
  59. package/src/guidelines/___library/sharedUiStructureDescription.en.md +786 -0
  60. package/src/guidelines/___library/utilUiStructureDescription.en.md +395 -0
  61. package/src/guidelines/___lint/lintRuleDescription.en.md +64 -0
  62. package/src/guidelines/___module/moduleStructureDescription.en.md +80 -0
  63. package/src/guidelines/componentRule/componentRule.instruction.md +732 -0
  64. package/src/guidelines/databaseModule/databaseModule.instruction.md +691 -0
  65. package/src/guidelines/enumConstant/enumConstant.instruction.md +232 -0
  66. package/src/guidelines/fieldDecorator/fieldDecorator.instruction.md +611 -0
  67. package/src/guidelines/framework/framework.instruction.md +1112 -0
  68. package/src/guidelines/modelConstant/modelConstant.instruction.md +958 -0
  69. package/src/guidelines/modelDictionary/modelDictionary.instruction.md +583 -0
  70. package/src/guidelines/modelDocument/modelDocument.instruction.md +683 -0
  71. package/src/guidelines/modelService/modelService.instruction.md +935 -0
  72. package/src/guidelines/modelSignal/modelSignal.instruction.md +588 -0
  73. package/src/guidelines/modelStore/modelStore.instruction.md +591 -0
  74. package/src/guidelines/modelTemplate/modelTemplate.instruction.md +577 -0
  75. package/src/guidelines/modelUnit/modelUnit.instruction.md +833 -0
  76. package/src/guidelines/modelUtil/modelUtil.instruction.md +752 -0
  77. package/src/guidelines/modelView/modelView.instruction.md +1005 -0
  78. package/src/guidelines/modelZone/modelZone.instruction.md +528 -0
  79. package/src/guidelines/scalarConstant/scalarConstant.instruction.md +489 -0
  80. package/src/guidelines/scalarDictionary/scalarDictionary.instruction.md +347 -0
  81. package/src/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +318 -0
  82. package/src/guidelines/utilUiUsage/utilUiUsage.instruction.md +339 -0
  83. package/src/module/module.command.d.ts +6 -8
  84. package/src/module/module.prompt.d.ts +2 -15
  85. package/src/module/module.request.d.ts +22 -18
  86. package/src/module/module.runner.d.ts +4 -20
  87. package/src/module/module.script.d.ts +6 -7
  88. package/src/scalar/scalar.command.d.ts +7 -0
  89. package/src/scalar/scalar.prompt.d.ts +23 -0
  90. package/src/scalar/scalar.runner.d.ts +13 -0
  91. package/src/scalar/scalar.script.d.ts +6 -0
  92. package/cjs/src/templates/app/app/[lang]/(__appName__)/(public)/forgotpassword/page.js +0 -47
  93. package/cjs/src/templates/app/app/[lang]/(__appName__)/(public)/page.js +0 -128
  94. package/cjs/src/templates/app/app/[lang]/(__appName__)/(public)/privacy/page.js +0 -42
  95. package/cjs/src/templates/app/app/[lang]/(__appName__)/(public)/signin/page.js +0 -50
  96. package/cjs/src/templates/app/app/[lang]/(__appName__)/(public)/termsofservice/page.js +0 -41
  97. package/cjs/src/templates/app/app/[lang]/(__appName__)/(public)/unknown/page.js +0 -51
  98. package/cjs/src/templates/app/app/[lang]/(__appName__)/(user)/layout.js +0 -43
  99. package/cjs/src/templates/app/app/[lang]/(__appName__)/(user)/self/page.js +0 -60
  100. package/cjs/src/templates/app/app/[lang]/(__appName__)/layout.js +0 -54
  101. package/cjs/src/templates/app/app/[lang]/(__appName__)/styles.css.template +0 -19
  102. package/cjs/src/templates/app/app/[lang]/admin/layout.js +0 -54
  103. package/cjs/src/templates/app/app/[lang]/admin/page.js +0 -63
  104. package/cjs/src/templates/app/app/csr.js +0 -34
  105. package/cjs/src/templates/app/app/index.html.template +0 -13
  106. package/cjs/src/templates/app/app/layout.js +0 -38
  107. package/cjs/src/templates/app/capacitor.config.ts.template +0 -8
  108. package/cjs/src/templates/app/env/env.client.debug.ts.template +0 -7
  109. package/cjs/src/templates/app/env/env.client.develop.ts.template +0 -7
  110. package/cjs/src/templates/app/env/env.client.local.ts.template +0 -7
  111. package/cjs/src/templates/app/env/env.client.main.ts.template +0 -7
  112. package/cjs/src/templates/app/env/env.client.testing.ts.template +0 -7
  113. package/cjs/src/templates/app/env/env.server.debug.ts.template +0 -15
  114. package/cjs/src/templates/app/env/env.server.develop.ts.template +0 -15
  115. package/cjs/src/templates/app/env/env.server.local.ts.template +0 -15
  116. package/cjs/src/templates/app/env/env.server.main.ts.template +0 -15
  117. package/cjs/src/templates/app/env/env.server.testing.ts.template +0 -7
  118. package/cjs/src/templates/app/lib/setting/Setting.Template.js +0 -57
  119. package/cjs/src/templates/app/lib/setting/Setting.Unit.js +0 -38
  120. package/cjs/src/templates/app/lib/setting/Setting.Util.js +0 -34
  121. package/cjs/src/templates/app/lib/setting/Setting.View.js +0 -51
  122. package/cjs/src/templates/app/lib/setting/Setting.Zone.js +0 -80
  123. package/cjs/src/templates/app/lib/setting/index.js +0 -61
  124. package/cjs/src/templates/app/lib/summary/Summary.Template.js +0 -43
  125. package/cjs/src/templates/app/lib/summary/Summary.Unit.js +0 -38
  126. package/cjs/src/templates/app/lib/summary/Summary.Util.js +0 -33
  127. package/cjs/src/templates/app/lib/summary/Summary.View.js +0 -51
  128. package/cjs/src/templates/app/lib/summary/Summary.Zone.js +0 -62
  129. package/cjs/src/templates/app/lib/summary/index.js +0 -67
  130. package/cjs/src/templates/app/lib/user/User.Template.js +0 -65
  131. package/cjs/src/templates/app/lib/user/User.Unit.js +0 -38
  132. package/cjs/src/templates/app/lib/user/User.Util.js +0 -94
  133. package/cjs/src/templates/app/lib/user/User.View.js +0 -66
  134. package/cjs/src/templates/app/lib/user/User.Zone.js +0 -74
  135. package/cjs/src/templates/app/lib/user/index.js +0 -61
  136. package/cjs/src/templates/app/page.test.ts.template +0 -10
  137. package/cjs/src/templates/app/playwright.config.ts.template +0 -6
  138. package/cjs/src/templates/app/postcss.config.js.template +0 -10
  139. package/cjs/src/templates/app/public/manifest.json.template +0 -67
  140. package/cjs/src/templates/app/tsconfig.json.template +0 -22
  141. package/cjs/src/templates/app/tsconfig.spec.json.template +0 -7
  142. package/cjs/src/templates/app/ui/Footer.js +0 -67
  143. package/cjs/src/templates/app/ui/MainHeader.js +0 -131
  144. package/cjs/src/templates/crudPages/[__model__Id]/edit/page.js +0 -73
  145. package/cjs/src/templates/crudPages/[__model__Id]/page.js +0 -83
  146. package/cjs/src/templates/crudPages/new/page.js +0 -70
  147. package/cjs/src/templates/crudPages/page.js +0 -71
  148. package/cjs/src/templates/libRoot/.gitignore.template +0 -15
  149. package/cjs/src/templates/libRoot/env/env.server.example.ts.template +0 -7
  150. package/cjs/src/templates/libRoot/env/env.server.testing.ts.template +0 -7
  151. package/cjs/src/templates/libRoot/lib/setting/Setting.Template.js +0 -57
  152. package/cjs/src/templates/libRoot/lib/setting/Setting.Unit.js +0 -38
  153. package/cjs/src/templates/libRoot/lib/setting/Setting.Util.js +0 -34
  154. package/cjs/src/templates/libRoot/lib/setting/Setting.View.js +0 -51
  155. package/cjs/src/templates/libRoot/lib/setting/Setting.Zone.js +0 -80
  156. package/cjs/src/templates/libRoot/lib/setting/index.js +0 -61
  157. package/cjs/src/templates/libRoot/lib/summary/Summary.Template.js +0 -43
  158. package/cjs/src/templates/libRoot/lib/summary/Summary.Unit.js +0 -38
  159. package/cjs/src/templates/libRoot/lib/summary/Summary.Util.js +0 -33
  160. package/cjs/src/templates/libRoot/lib/summary/Summary.View.js +0 -51
  161. package/cjs/src/templates/libRoot/lib/summary/Summary.Zone.js +0 -62
  162. package/cjs/src/templates/libRoot/lib/summary/index.js +0 -67
  163. package/cjs/src/templates/libRoot/lib/user/User.Template.js +0 -65
  164. package/cjs/src/templates/libRoot/lib/user/User.Unit.js +0 -38
  165. package/cjs/src/templates/libRoot/lib/user/User.Util.js +0 -94
  166. package/cjs/src/templates/libRoot/lib/user/User.View.js +0 -66
  167. package/cjs/src/templates/libRoot/lib/user/User.Zone.js +0 -74
  168. package/cjs/src/templates/libRoot/lib/user/index.js +0 -61
  169. package/cjs/src/templates/libRoot/package.json.template +0 -4
  170. package/cjs/src/templates/libRoot/tsconfig.json.template +0 -13
  171. package/cjs/src/templates/libRoot/tsconfig.spec.json.template +0 -7
  172. package/cjs/src/templates/localDev/docker-compose.yaml.template +0 -36
  173. package/cjs/src/templates/module/__Model__.Template.js +0 -54
  174. package/cjs/src/templates/module/__Model__.Unit.js +0 -42
  175. package/cjs/src/templates/module/__Model__.Util.js +0 -70
  176. package/cjs/src/templates/module/__Model__.View.js +0 -48
  177. package/cjs/src/templates/module/__Model__.Zone.js +0 -83
  178. package/cjs/src/templates/module/index.js +0 -61
  179. package/cjs/src/templates/pkgRoot/tsconfig.json.template +0 -15
  180. package/cjs/src/templates/workspaceRoot/.env.template +0 -20
  181. package/cjs/src/templates/workspaceRoot/.gitignore.template +0 -118
  182. package/cjs/src/templates/workspaceRoot/.prettierignore.template +0 -10
  183. package/cjs/src/templates/workspaceRoot/.prettierrc.json.template +0 -6
  184. package/cjs/src/templates/workspaceRoot/.swcrc.template +0 -9
  185. package/cjs/src/templates/workspaceRoot/.vscode/settings.json.template +0 -13
  186. package/cjs/src/templates/workspaceRoot/README.md.template +0 -37
  187. package/cjs/src/templates/workspaceRoot/eslint.config.ts.template +0 -3
  188. package/cjs/src/templates/workspaceRoot/package.json.template +0 -43
  189. package/cjs/src/templates/workspaceRoot/tsconfig.json.template +0 -29
  190. package/esm/src/templates/app/app/[lang]/(__appName__)/(public)/forgotpassword/page.js +0 -27
  191. package/esm/src/templates/app/app/[lang]/(__appName__)/(public)/page.js +0 -108
  192. package/esm/src/templates/app/app/[lang]/(__appName__)/(public)/privacy/page.js +0 -22
  193. package/esm/src/templates/app/app/[lang]/(__appName__)/(public)/signin/page.js +0 -30
  194. package/esm/src/templates/app/app/[lang]/(__appName__)/(public)/termsofservice/page.js +0 -21
  195. package/esm/src/templates/app/app/[lang]/(__appName__)/(public)/unknown/page.js +0 -31
  196. package/esm/src/templates/app/app/[lang]/(__appName__)/(user)/layout.js +0 -23
  197. package/esm/src/templates/app/app/[lang]/(__appName__)/(user)/self/page.js +0 -40
  198. package/esm/src/templates/app/app/[lang]/(__appName__)/layout.js +0 -34
  199. package/esm/src/templates/app/app/[lang]/(__appName__)/styles.css.template +0 -19
  200. package/esm/src/templates/app/app/[lang]/admin/layout.js +0 -34
  201. package/esm/src/templates/app/app/[lang]/admin/page.js +0 -43
  202. package/esm/src/templates/app/app/csr.js +0 -14
  203. package/esm/src/templates/app/app/index.html.template +0 -13
  204. package/esm/src/templates/app/app/layout.js +0 -18
  205. package/esm/src/templates/app/capacitor.config.ts.template +0 -8
  206. package/esm/src/templates/app/env/env.client.debug.ts.template +0 -7
  207. package/esm/src/templates/app/env/env.client.develop.ts.template +0 -7
  208. package/esm/src/templates/app/env/env.client.local.ts.template +0 -7
  209. package/esm/src/templates/app/env/env.client.main.ts.template +0 -7
  210. package/esm/src/templates/app/env/env.client.testing.ts.template +0 -7
  211. package/esm/src/templates/app/env/env.server.debug.ts.template +0 -15
  212. package/esm/src/templates/app/env/env.server.develop.ts.template +0 -15
  213. package/esm/src/templates/app/env/env.server.local.ts.template +0 -15
  214. package/esm/src/templates/app/env/env.server.main.ts.template +0 -15
  215. package/esm/src/templates/app/env/env.server.testing.ts.template +0 -7
  216. package/esm/src/templates/app/lib/setting/Setting.Template.js +0 -37
  217. package/esm/src/templates/app/lib/setting/Setting.Unit.js +0 -18
  218. package/esm/src/templates/app/lib/setting/Setting.Util.js +0 -14
  219. package/esm/src/templates/app/lib/setting/Setting.View.js +0 -31
  220. package/esm/src/templates/app/lib/setting/Setting.Zone.js +0 -60
  221. package/esm/src/templates/app/lib/setting/index.js +0 -41
  222. package/esm/src/templates/app/lib/summary/Summary.Template.js +0 -23
  223. package/esm/src/templates/app/lib/summary/Summary.Unit.js +0 -18
  224. package/esm/src/templates/app/lib/summary/Summary.Util.js +0 -13
  225. package/esm/src/templates/app/lib/summary/Summary.View.js +0 -31
  226. package/esm/src/templates/app/lib/summary/Summary.Zone.js +0 -42
  227. package/esm/src/templates/app/lib/summary/index.js +0 -47
  228. package/esm/src/templates/app/lib/user/User.Template.js +0 -45
  229. package/esm/src/templates/app/lib/user/User.Unit.js +0 -18
  230. package/esm/src/templates/app/lib/user/User.Util.js +0 -74
  231. package/esm/src/templates/app/lib/user/User.View.js +0 -46
  232. package/esm/src/templates/app/lib/user/User.Zone.js +0 -54
  233. package/esm/src/templates/app/lib/user/index.js +0 -41
  234. package/esm/src/templates/app/page.test.ts.template +0 -10
  235. package/esm/src/templates/app/playwright.config.ts.template +0 -6
  236. package/esm/src/templates/app/postcss.config.js.template +0 -10
  237. package/esm/src/templates/app/public/manifest.json.template +0 -67
  238. package/esm/src/templates/app/tsconfig.json.template +0 -22
  239. package/esm/src/templates/app/tsconfig.spec.json.template +0 -7
  240. package/esm/src/templates/app/ui/Footer.js +0 -47
  241. package/esm/src/templates/app/ui/MainHeader.js +0 -111
  242. package/esm/src/templates/crudPages/[__model__Id]/edit/page.js +0 -53
  243. package/esm/src/templates/crudPages/[__model__Id]/page.js +0 -63
  244. package/esm/src/templates/crudPages/new/page.js +0 -50
  245. package/esm/src/templates/crudPages/page.js +0 -51
  246. package/esm/src/templates/libRoot/.gitignore.template +0 -15
  247. package/esm/src/templates/libRoot/env/env.server.example.ts.template +0 -7
  248. package/esm/src/templates/libRoot/env/env.server.testing.ts.template +0 -7
  249. package/esm/src/templates/libRoot/lib/setting/Setting.Template.js +0 -37
  250. package/esm/src/templates/libRoot/lib/setting/Setting.Unit.js +0 -18
  251. package/esm/src/templates/libRoot/lib/setting/Setting.Util.js +0 -14
  252. package/esm/src/templates/libRoot/lib/setting/Setting.View.js +0 -31
  253. package/esm/src/templates/libRoot/lib/setting/Setting.Zone.js +0 -60
  254. package/esm/src/templates/libRoot/lib/setting/index.js +0 -41
  255. package/esm/src/templates/libRoot/lib/summary/Summary.Template.js +0 -23
  256. package/esm/src/templates/libRoot/lib/summary/Summary.Unit.js +0 -18
  257. package/esm/src/templates/libRoot/lib/summary/Summary.Util.js +0 -13
  258. package/esm/src/templates/libRoot/lib/summary/Summary.View.js +0 -31
  259. package/esm/src/templates/libRoot/lib/summary/Summary.Zone.js +0 -42
  260. package/esm/src/templates/libRoot/lib/summary/index.js +0 -47
  261. package/esm/src/templates/libRoot/lib/user/User.Template.js +0 -45
  262. package/esm/src/templates/libRoot/lib/user/User.Unit.js +0 -18
  263. package/esm/src/templates/libRoot/lib/user/User.Util.js +0 -74
  264. package/esm/src/templates/libRoot/lib/user/User.View.js +0 -46
  265. package/esm/src/templates/libRoot/lib/user/User.Zone.js +0 -54
  266. package/esm/src/templates/libRoot/lib/user/index.js +0 -41
  267. package/esm/src/templates/libRoot/package.json.template +0 -4
  268. package/esm/src/templates/libRoot/tsconfig.json.template +0 -13
  269. package/esm/src/templates/libRoot/tsconfig.spec.json.template +0 -7
  270. package/esm/src/templates/localDev/docker-compose.yaml.template +0 -36
  271. package/esm/src/templates/module/__Model__.Template.js +0 -34
  272. package/esm/src/templates/module/__Model__.Unit.js +0 -22
  273. package/esm/src/templates/module/__Model__.Util.js +0 -50
  274. package/esm/src/templates/module/__Model__.View.js +0 -28
  275. package/esm/src/templates/module/__Model__.Zone.js +0 -63
  276. package/esm/src/templates/module/index.js +0 -41
  277. package/esm/src/templates/pkgRoot/tsconfig.json.template +0 -15
  278. package/esm/src/templates/workspaceRoot/.env.template +0 -20
  279. package/esm/src/templates/workspaceRoot/.gitignore.template +0 -118
  280. package/esm/src/templates/workspaceRoot/.prettierignore.template +0 -10
  281. package/esm/src/templates/workspaceRoot/.prettierrc.json.template +0 -6
  282. package/esm/src/templates/workspaceRoot/.swcrc.template +0 -9
  283. package/esm/src/templates/workspaceRoot/.vscode/settings.json.template +0 -13
  284. package/esm/src/templates/workspaceRoot/README.md.template +0 -37
  285. package/esm/src/templates/workspaceRoot/eslint.config.ts.template +0 -3
  286. package/esm/src/templates/workspaceRoot/package.json.template +0 -43
  287. package/esm/src/templates/workspaceRoot/tsconfig.json.template +0 -29
  288. package/src/application/application.prompt.d.ts +0 -2
  289. package/src/templates/app/app/[lang]/(__appName__)/(public)/forgotpassword/page.d.ts +0 -9
  290. package/src/templates/app/app/[lang]/(__appName__)/(public)/page.d.ts +0 -9
  291. package/src/templates/app/app/[lang]/(__appName__)/(public)/privacy/page.d.ts +0 -9
  292. package/src/templates/app/app/[lang]/(__appName__)/(public)/signin/page.d.ts +0 -9
  293. package/src/templates/app/app/[lang]/(__appName__)/(public)/termsofservice/page.d.ts +0 -10
  294. package/src/templates/app/app/[lang]/(__appName__)/(public)/unknown/page.d.ts +0 -9
  295. package/src/templates/app/app/[lang]/(__appName__)/(user)/layout.d.ts +0 -9
  296. package/src/templates/app/app/[lang]/(__appName__)/(user)/self/page.d.ts +0 -9
  297. package/src/templates/app/app/[lang]/(__appName__)/layout.d.ts +0 -9
  298. package/src/templates/app/app/[lang]/admin/layout.d.ts +0 -9
  299. package/src/templates/app/app/[lang]/admin/page.d.ts +0 -9
  300. package/src/templates/app/app/csr.d.ts +0 -9
  301. package/src/templates/app/app/layout.d.ts +0 -9
  302. package/src/templates/app/lib/setting/Setting.Template.d.ts +0 -9
  303. package/src/templates/app/lib/setting/Setting.Unit.d.ts +0 -9
  304. package/src/templates/app/lib/setting/Setting.Util.d.ts +0 -9
  305. package/src/templates/app/lib/setting/Setting.View.d.ts +0 -9
  306. package/src/templates/app/lib/setting/Setting.Zone.d.ts +0 -9
  307. package/src/templates/app/lib/setting/index.d.ts +0 -9
  308. package/src/templates/app/lib/summary/Summary.Template.d.ts +0 -9
  309. package/src/templates/app/lib/summary/Summary.Unit.d.ts +0 -9
  310. package/src/templates/app/lib/summary/Summary.Util.d.ts +0 -9
  311. package/src/templates/app/lib/summary/Summary.View.d.ts +0 -9
  312. package/src/templates/app/lib/summary/Summary.Zone.d.ts +0 -9
  313. package/src/templates/app/lib/summary/index.d.ts +0 -9
  314. package/src/templates/app/lib/user/User.Template.d.ts +0 -9
  315. package/src/templates/app/lib/user/User.Unit.d.ts +0 -9
  316. package/src/templates/app/lib/user/User.Util.d.ts +0 -9
  317. package/src/templates/app/lib/user/User.View.d.ts +0 -9
  318. package/src/templates/app/lib/user/User.Zone.d.ts +0 -9
  319. package/src/templates/app/lib/user/index.d.ts +0 -9
  320. package/src/templates/app/ui/Footer.d.ts +0 -9
  321. package/src/templates/app/ui/MainHeader.d.ts +0 -10
  322. package/src/templates/crudPages/[__model__Id]/edit/page.d.ts +0 -11
  323. package/src/templates/crudPages/[__model__Id]/page.d.ts +0 -11
  324. package/src/templates/crudPages/new/page.d.ts +0 -11
  325. package/src/templates/crudPages/page.d.ts +0 -11
  326. package/src/templates/libRoot/lib/setting/Setting.Template.d.ts +0 -9
  327. package/src/templates/libRoot/lib/setting/Setting.Unit.d.ts +0 -9
  328. package/src/templates/libRoot/lib/setting/Setting.Util.d.ts +0 -9
  329. package/src/templates/libRoot/lib/setting/Setting.View.d.ts +0 -9
  330. package/src/templates/libRoot/lib/setting/Setting.Zone.d.ts +0 -9
  331. package/src/templates/libRoot/lib/setting/index.d.ts +0 -9
  332. package/src/templates/libRoot/lib/summary/Summary.Template.d.ts +0 -9
  333. package/src/templates/libRoot/lib/summary/Summary.Unit.d.ts +0 -9
  334. package/src/templates/libRoot/lib/summary/Summary.Util.d.ts +0 -9
  335. package/src/templates/libRoot/lib/summary/Summary.View.d.ts +0 -9
  336. package/src/templates/libRoot/lib/summary/Summary.Zone.d.ts +0 -9
  337. package/src/templates/libRoot/lib/summary/index.d.ts +0 -9
  338. package/src/templates/libRoot/lib/user/User.Template.d.ts +0 -9
  339. package/src/templates/libRoot/lib/user/User.Unit.d.ts +0 -9
  340. package/src/templates/libRoot/lib/user/User.Util.d.ts +0 -9
  341. package/src/templates/libRoot/lib/user/User.View.d.ts +0 -9
  342. package/src/templates/libRoot/lib/user/User.Zone.d.ts +0 -9
  343. package/src/templates/libRoot/lib/user/index.d.ts +0 -9
  344. package/src/templates/module/__Model__.Template.d.ts +0 -11
  345. package/src/templates/module/__Model__.Unit.d.ts +0 -11
  346. package/src/templates/module/__Model__.Util.d.ts +0 -11
  347. package/src/templates/module/__Model__.View.d.ts +0 -11
  348. package/src/templates/module/__Model__.Zone.d.ts +0 -11
  349. package/src/templates/module/index.d.ts +0 -11
@@ -0,0 +1,611 @@
1
+ # Field Decorator Usage Guide for Akan.js
2
+
3
+ ## Purpose of Field Decorators
4
+
5
+ Field decorators in Akan.js serve as the foundation for data modeling by:
6
+
7
+ - Defining properties in model classes with type safety
8
+ - Configuring GraphQL schema generation for API endpoints
9
+ - Setting up MongoDB schema properties and validation
10
+ - Enabling search indexing and optimization
11
+ - Managing relationships between data models
12
+ - Controlling data visibility and access patterns
13
+
14
+ ## Decorator Types and Their Uses
15
+
16
+ | Decorator | Purpose | Database | GraphQL | Default Behavior |
17
+ | ------------------ | ------------------------------------- | ------------- | ---------- | ----------------------------------- |
18
+ | `@Field.Prop()` | Standard visible property | ✅ Stored | ✅ Exposed | Included in all operations |
19
+ | `@Field.Hidden()` | Internal data not exposed in API | ✅ Stored | ❌ Hidden | Excluded from GraphQL schema |
20
+ | `@Field.Secret()` | Sensitive data with restricted access | ✅ Stored | ✅ Exposed | Not selected by default in queries |
21
+ | `@Field.Resolve()` | Computed property (no DB storage) | ❌ Not stored | ✅ Exposed | Calculated at runtime via resolvers |
22
+
23
+ ## Basic Syntax and Structure
24
+
25
+ ```typescript
26
+ @Field.Prop(() => Type, { ...options })
27
+ propertyName: TypeScriptType;
28
+ ```
29
+
30
+ ### Key Components
31
+
32
+ 1. **Decorator Function**: Determines field behavior (`Field.Prop`, `Field.Hidden`, etc.)
33
+ 2. **Type Arrow Function**: Specifies GraphQL/MongoDB type using `() => Type` syntax
34
+ 3. **Options Object**: Configures field behavior with various options
35
+ 4. **TypeScript Type**: Defines the type for static analysis and development
36
+
37
+ ## Field.Prop for Standard Properties
38
+
39
+ Used for typical model properties that should be stored in the database and exposed in the GraphQL API.
40
+
41
+ ```typescript
42
+ // String property
43
+ @Field.Prop(() => String)
44
+ name: string;
45
+
46
+ // Number property with validation
47
+ @Field.Prop(() => Int, { min: 0, max: 100 })
48
+ score: number;
49
+
50
+ // Boolean property with default
51
+ @Field.Prop(() => Boolean, { default: false })
52
+ isActive: boolean;
53
+ ```
54
+
55
+ ## Field.Hidden for Database-Only Properties
56
+
57
+ Used for properties that should be stored in the database but not exposed in the GraphQL API.
58
+
59
+ ```typescript
60
+ // Internal tracking data
61
+ @Field.Hidden(() => String)
62
+ internalId: string;
63
+
64
+ // Technical metadata
65
+ @Field.Hidden(() => JSON, { default: {} })
66
+ systemMetadata: Record<string, any>;
67
+ ```
68
+
69
+ ## Field.Secret for Sensitive Data
70
+
71
+ Used for sensitive properties that are stored but not selected by default in queries.
72
+
73
+ ```typescript
74
+ // Personal information
75
+ @Field.Secret(() => String, { nullable: true })
76
+ phoneNumber: string | null;
77
+
78
+ // Security data
79
+ @Field.Secret(() => String)
80
+ apiKey: string;
81
+ ```
82
+
83
+ ## Field.Resolve for Computed Properties
84
+
85
+ Used for properties that are calculated at runtime and not stored in the database.
86
+
87
+ ```typescript
88
+ // Computed property from other fields
89
+ @Field.Resolve(() => String)
90
+ get fullName(): string {
91
+ return `${this.firstName} ${this.lastName}`;
92
+ }
93
+
94
+ // Calculated numeric value
95
+ @Field.Resolve(() => Int)
96
+ get age(): number {
97
+ return dayjs().diff(this.birthDate, 'year');
98
+ }
99
+ ```
100
+
101
+ ## Field Options Reference
102
+
103
+ | Option | Type | Description | Default | Example |
104
+ | ------------ | ----------------------------------- | ------------------------------------ | ------- | ---------------------------------- |
105
+ | `default` | `any` | Default value | `null` | `{ default: "active" }` |
106
+ | `nullable` | `boolean` | Allows null values | `false` | `{ nullable: true }` |
107
+ | `enum` | `Enum` | Restricts to enum values | - | `{ enum: StatusEnum }` |
108
+ | `immutable` | `boolean` | Prevents modification after creation | `false` | `{ immutable: true }` |
109
+ | `min` | `number` | Minimum value (numbers) | - | `{ min: 0 }` |
110
+ | `max` | `number` | Maximum value (numbers) | - | `{ max: 100 }` |
111
+ | `minlength` | `number` | Minimum length (strings) | - | `{ minlength: 3 }` |
112
+ | `maxlength` | `number` | Maximum length (strings) | - | `{ maxlength: 255 }` |
113
+ | `type` | `"email"`, `"url"`, `"password"` | Special validation type | - | `{ type: "email" }` |
114
+ | `validate` | `function` | Custom validation function | - | `{ validate: isEmail }` |
115
+ | `select` | `boolean` | Include in default queries | `true` | `{ select: false }` |
116
+ | `ref` | `string` | Reference to another model | - | `{ ref: "User" }` |
117
+ | `refPath` | `string` | Dynamic reference path | - | `{ refPath: "modelType" }` |
118
+ | `refType` | `"child"`, `"parent"`, `"relation"` | Relationship type | - | `{ refType: "child" }` |
119
+ | `of` | `GqlScalar` | Type for Map values | - | `{ of: String }` |
120
+ | `text` | `"search"`, `"filter"` | Search indexing behavior | - | `{ text: "search" }` |
121
+ | `query` | `QueryOf<any>` | Default MongoDB query | - | `{ query: { active: true } }` |
122
+ | `accumulate` | `AccumulatorOperator` | MongoDB aggregation | - | `{ accumulate: { $sum: 1 } }` |
123
+ | `example` | `any` | Example value for docs | - | `{ example: "example@email.com" }` |
124
+
125
+ ## Working with Primitive Types
126
+
127
+ ### String Fields
128
+
129
+ ```typescript
130
+ // Basic string
131
+ @Field.Prop(() => String)
132
+ name: string;
133
+
134
+ // With length constraints
135
+ @Field.Prop(() => String, { minlength: 3, maxlength: 50 })
136
+ username: string;
137
+
138
+ // With special validation type
139
+ @Field.Prop(() => String, { type: "email" })
140
+ email: string;
141
+ ```
142
+
143
+ ### Number Fields
144
+
145
+ ```typescript
146
+ // Integer
147
+ @Field.Prop(() => Int)
148
+ count: number;
149
+
150
+ // Float with range
151
+ @Field.Prop(() => Float, { min: 0, max: 1 })
152
+ percentage: number;
153
+ ```
154
+
155
+ ### Boolean Fields
156
+
157
+ ```typescript
158
+ // Boolean with default
159
+ @Field.Prop(() => Boolean, { default: false })
160
+ isPublished: boolean;
161
+ ```
162
+
163
+ ## Working with Enums
164
+
165
+ ```typescript
166
+ // Define enum with enumOf
167
+ export const Status = enumOf(["active", "inactive", "pending"] as const);
168
+ export type Status = enumOf<typeof Status>;
169
+
170
+ // Use in field
171
+ @Field.Prop(() => String, { enum: Status, default: "active" })
172
+ status: Status;
173
+ ```
174
+
175
+ ## Working with Arrays and Nested Structures
176
+
177
+ ### Simple Arrays
178
+
179
+ ```typescript
180
+ // String array
181
+ @Field.Prop(() => [String], { default: [] })
182
+ tags: string[];
183
+
184
+ // Number array
185
+ @Field.Prop(() => [Int], { default: [] })
186
+ scores: number[];
187
+ ```
188
+
189
+ ### Nested Arrays
190
+
191
+ ```typescript
192
+ // 2D array
193
+ @Field.Prop(() => [[Int]], { default: [] })
194
+ matrix: number[][];
195
+ ```
196
+
197
+ ### Arrays of Custom Types
198
+
199
+ ```typescript
200
+ // Array of references
201
+ @Field.Prop(() => [LightComment], { ref: "Comment" })
202
+ comments: LightComment[];
203
+
204
+ // Array of embedded scalars
205
+ @Field.Prop(() => [Address])
206
+ addresses: Address[];
207
+ ```
208
+
209
+ ## Reference Fields and Relationships
210
+
211
+ ### Single References
212
+
213
+ ```typescript
214
+ // Basic reference
215
+ @Field.Prop(() => LightUser, { ref: "User" })
216
+ owner: LightUser;
217
+
218
+ // Optional reference
219
+ @Field.Prop(() => LightCategory, { ref: "Category", nullable: true })
220
+ category: LightCategory | null;
221
+ ```
222
+
223
+ ### Dynamic References
224
+
225
+ ```typescript
226
+ // Reference determined by path
227
+ @Field.Prop(() => String, { enum: ModelType })
228
+ modelType: ModelType;
229
+
230
+ @Field.Prop(() => LightModel, { refPath: "modelType" })
231
+ model: LightModel;
232
+ ```
233
+
234
+ ### Relationship Types
235
+
236
+ ```typescript
237
+ // Parent-child relationship
238
+ @Field.Prop(() => LightProject, { ref: "Project", refType: "parent" })
239
+ project: LightProject;
240
+
241
+ // Many-to-many relationship
242
+ @Field.Prop(() => [LightTag], { ref: "Tag", refType: "relation" })
243
+ tags: LightTag[];
244
+ ```
245
+
246
+ ## Date and Special Type Handling
247
+
248
+ ### Date Fields
249
+
250
+ ```typescript
251
+ // Current date default
252
+ @Field.Prop(() => Date, { default: () => dayjs() })
253
+ createdAt: Dayjs;
254
+
255
+ // Immutable timestamp
256
+ @Field.Prop(() => Date, { default: () => dayjs(), immutable: true })
257
+ createdAt: Dayjs;
258
+ ```
259
+
260
+ ### JSON and Map Types
261
+
262
+ ```typescript
263
+ // JSON object
264
+ @Field.Prop(() => JSON, { default: {} })
265
+ metadata: Record<string, any>;
266
+
267
+ // Map type
268
+ @Field.Prop(() => Map, { of: String, default: new Map() })
269
+ translations: Map<string, string>;
270
+ ```
271
+
272
+ ## Validation and Constraints
273
+
274
+ ### Built-in Validation
275
+
276
+ ```typescript
277
+ // Numeric range
278
+ @Field.Prop(() => Int, { min: 1, max: 10 })
279
+ rating: number;
280
+
281
+ // String length
282
+ @Field.Prop(() => String, { minlength: 8, maxlength: 100 })
283
+ password: string;
284
+ ```
285
+
286
+ ### Custom Validation
287
+
288
+ ```typescript
289
+ // Custom validation function
290
+ @Field.Prop(() => String, {
291
+ validate: (value, model) => {
292
+ return /^[A-Z][a-z]+$/.test(value);
293
+ }
294
+ })
295
+ properName: string;
296
+ ```
297
+
298
+ ## Search Optimization
299
+
300
+ ### Full-Text Search
301
+
302
+ ```typescript
303
+ // Searchable text field
304
+ @Field.Prop(() => String, { text: "search" })
305
+ description: string;
306
+ ```
307
+
308
+ ### Filter-Only Fields
309
+
310
+ ```typescript
311
+ // Filterable but not searchable
312
+ @Field.Prop(() => String, { text: "filter" })
313
+ category: string;
314
+ ```
315
+
316
+ ## Default Values and Immutability
317
+
318
+ ### Static Defaults
319
+
320
+ ```typescript
321
+ // Static default value
322
+ @Field.Prop(() => String, { default: "Guest" })
323
+ role: string;
324
+ ```
325
+
326
+ ### Dynamic Defaults
327
+
328
+ ```typescript
329
+ // Function-based default
330
+ @Field.Prop(() => Date, { default: () => dayjs() })
331
+ createdAt: Dayjs;
332
+
333
+ // Complex default value
334
+ @Field.Prop(() => JSON, { default: () => ({ version: 1, settings: {} }) })
335
+ config: Record<string, any>;
336
+ ```
337
+
338
+ ### Immutable Fields
339
+
340
+ ```typescript
341
+ // Cannot be changed after creation
342
+ @Field.Prop(() => String, { immutable: true })
343
+ code: string;
344
+ ```
345
+
346
+ ## Integration with Model Types
347
+
348
+ ### Input Models
349
+
350
+ ```typescript
351
+ @Model.Input("ProductInput")
352
+ export class ProductInput {
353
+ @Field.Prop(() => String)
354
+ name: string;
355
+
356
+ @Field.Prop(() => Float, { min: 0 })
357
+ price: number;
358
+ }
359
+ ```
360
+
361
+ ### Object Models
362
+
363
+ ```typescript
364
+ @Model.Object("ProductObject")
365
+ export class ProductObject extends via(ProductInput) {
366
+ @Field.Prop(() => Date, { default: dayjs() })
367
+ createdAt: Dayjs;
368
+ }
369
+ ```
370
+
371
+ ### Light Models
372
+
373
+ ```typescript
374
+ @Model.Light("LightProduct")
375
+ export class LightProduct extends via(ProductObject, ["name", "price", "status"] as const) {}
376
+ ```
377
+
378
+ ### Full Models
379
+
380
+ ```typescript
381
+ @Model.Full("Product")
382
+ export class Product extends via(ProductObject, LightProduct) {}
383
+ ```
384
+
385
+ ### Scalar Models
386
+
387
+ ```typescript
388
+ @Model.Scalar("Address")
389
+ export class Address {
390
+ @Field.Prop(() => String)
391
+ street: string;
392
+
393
+ @Field.Prop(() => String)
394
+ city: string;
395
+ }
396
+ ```
397
+
398
+ ## Best Practices
399
+
400
+ ### Type Safety
401
+
402
+ Always ensure TypeScript types match GraphQL types:
403
+
404
+ ```typescript
405
+ // ✅ Correct
406
+ @Field.Prop(() => Int)
407
+ count: number;
408
+
409
+ // ❌ Incorrect (type mismatch)
410
+ @Field.Prop(() => String)
411
+ count: number;
412
+ ```
413
+
414
+ ### Nullable Fields
415
+
416
+ Always add both the decorator option and TypeScript union type:
417
+
418
+ ```typescript
419
+ // ✅ Correct
420
+ @Field.Prop(() => String, { nullable: true })
421
+ middleName: string | null;
422
+
423
+ // ❌ Incorrect (missing union type)
424
+ @Field.Prop(() => String, { nullable: true })
425
+ middleName: string;
426
+ ```
427
+
428
+ ### Default Values
429
+
430
+ Provide sensible defaults for required fields:
431
+
432
+ ```typescript
433
+ // ✅ Correct
434
+ @Field.Prop(() => [String], { default: [] })
435
+ tags: string[];
436
+
437
+ // ❌ Incorrect (missing default for array)
438
+ @Field.Prop(() => [String])
439
+ tags: string[];
440
+ ```
441
+
442
+ ### Sensitive Data
443
+
444
+ Use `Field.Secret` for sensitive information:
445
+
446
+ ```typescript
447
+ // ✅ Correct
448
+ @Field.Secret(() => String)
449
+ apiKey: string;
450
+
451
+ // ❌ Incorrect (exposes sensitive data by default)
452
+ @Field.Prop(() => String)
453
+ apiKey: string;
454
+ ```
455
+
456
+ ### Array Type Syntax
457
+
458
+ Use bracket notation instead of generics:
459
+
460
+ ```typescript
461
+ // ✅ Correct
462
+ @Field.Prop(() => [String])
463
+ tags: string[];
464
+
465
+ // ❌ Incorrect (using generics)
466
+ @Field.Prop(() => Array<String>)
467
+ tags: string[];
468
+ ```
469
+
470
+ ### Date Handling
471
+
472
+ Always use `Dayjs` type for date fields:
473
+
474
+ ```typescript
475
+ // ✅ Correct
476
+ @Field.Prop(() => Date)
477
+ createdAt: Dayjs;
478
+
479
+ // ❌ Incorrect (using JavaScript Date)
480
+ @Field.Prop(() => Date)
481
+ createdAt: Date;
482
+ ```
483
+
484
+ ## Troubleshooting Common Issues
485
+
486
+ ### Field Not Appearing in GraphQL
487
+
488
+ **Problem**: Field is defined but not showing up in GraphQL schema
489
+ **Possible Causes**:
490
+
491
+ - Using `@Field.Hidden()` instead of `@Field.Prop()`
492
+ - Field has `{ select: false }` option
493
+ - GraphQL schema not regenerated after changes
494
+
495
+ **Solution**:
496
+
497
+ ```typescript
498
+ // Change this
499
+ @Field.Hidden(() => String)
500
+ name: string;
501
+
502
+ // To this
503
+ @Field.Prop(() => String)
504
+ name: string;
505
+ ```
506
+
507
+ ### Default Value Not Applied
508
+
509
+ **Problem**: Default value isn't set when creating new documents
510
+ **Possible Causes**:
511
+
512
+ - Default value type doesn't match field type
513
+ - Default function throws an error
514
+ - Middleware overriding the value
515
+
516
+ **Solution**:
517
+
518
+ ```typescript
519
+ // Ensure type consistency
520
+ @Field.Prop(() => Int, { default: 0 }) // number default for number field
521
+ count: number;
522
+ ```
523
+
524
+ ### Validation Errors
525
+
526
+ **Problem**: Unexpected validation failures
527
+ **Possible Causes**:
528
+
529
+ - Value outside min/max range
530
+ - String length outside minlength/maxlength
531
+ - Custom validation function returning false
532
+
533
+ **Solution**:
534
+
535
+ ```typescript
536
+ // Check constraints
537
+ @Field.Prop(() => String, {
538
+ minlength: 3,
539
+ validate: (value) => /^[A-Z]/.test(value) // Must start with uppercase
540
+ })
541
+ username: string;
542
+ ```
543
+
544
+ ### Enum Values Not Working
545
+
546
+ **Problem**: Enum validation not working properly
547
+ **Possible Causes**:
548
+
549
+ - Enum not created with `enumOf()`
550
+ - Enum values don't match expected format
551
+ - Missing `{ enum: YourEnum }` in options
552
+
553
+ **Solution**:
554
+
555
+ ```typescript
556
+ // Proper enum definition
557
+ export const Status = enumOf(["active", "inactive"] as const);
558
+ export type Status = enumOf<typeof Status>;
559
+
560
+ // Correct field definition
561
+ @Field.Prop(() => String, { enum: Status, default: "active" })
562
+ status: Status;
563
+ ```
564
+
565
+ ### Search Not Working
566
+
567
+ **Problem**: Full-text search not working on fields
568
+ **Possible Causes**:
569
+
570
+ - Missing `{ text: "search" }` option
571
+ - Search daemon not running
572
+ - Model not marked for indexing
573
+
574
+ **Solution**:
575
+
576
+ ```typescript
577
+ // Add text search option
578
+ @Field.Prop(() => String, { text: "search" })
579
+ description: string;
580
+ ```
581
+
582
+ ### Circular Dependencies
583
+
584
+ **Problem**: Circular import errors when referencing models
585
+ **Possible Causes**:
586
+
587
+ - Models directly importing each other
588
+ - Using Full models instead of Light models for references
589
+
590
+ **Solution**:
591
+
592
+ ```typescript
593
+ // Use Light models for references
594
+ @Field.Prop(() => LightUser, { ref: "User" }) // Not FullUser
595
+ owner: LightUser;
596
+ ```
597
+
598
+ ## Summary Checklist
599
+
600
+ 1. **Choose the right decorator**: `Field.Prop`, `Field.Hidden`, `Field.Secret`, or `Field.Resolve`
601
+ 2. **Use correct type syntax**: `() => Type` or `() => [Type]` for arrays
602
+ 3. **Match TypeScript types**: Ensure decorator type matches property type
603
+ 4. **Handle nullability**: Use `{ nullable: true }` and `Type | null` together
604
+ 5. **Provide defaults**: Set appropriate default values, especially for arrays
605
+ 6. **Add validation**: Use min/max, minlength/maxlength, or custom validation
606
+ 7. **Protect sensitive data**: Use `Field.Secret` for sensitive information
607
+ 8. **Optimize for search**: Add `{ text: "search" }` to searchable fields
608
+ 9. **Mark immutable fields**: Use `{ immutable: true }` for unchangeable fields
609
+ 10. **Use proper references**: Specify `ref`, `refPath`, or `refType` for relationships
610
+
611
+ Following these guidelines will ensure your field decorators work correctly across the entire Akan.js framework ecosystem, from GraphQL APIs to MongoDB persistence and search functionality.