@atlashub/smartstack-cli 3.36.0 → 3.38.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.
Files changed (219) hide show
  1. package/dist/index.js +16 -24
  2. package/dist/index.js.map +1 -1
  3. package/dist/mcp-entry.mjs +201 -256
  4. package/dist/mcp-entry.mjs.map +1 -1
  5. package/package.json +3 -2
  6. package/scripts/extract-api-endpoints.ts +325 -0
  7. package/scripts/extract-business-rules.ts +440 -0
  8. package/scripts/generate-doc-with-mock-ui.ts +804 -0
  9. package/scripts/health-check.sh +168 -0
  10. package/scripts/postinstall.js +18 -0
  11. package/templates/agents/ba-reader.md +9 -9
  12. package/templates/agents/ba-writer.md +12 -15
  13. package/templates/agents/code-reviewer.md +1 -1
  14. package/templates/agents/docs-context-reader.md +1 -1
  15. package/templates/agents/gitflow/merge.md +0 -4
  16. package/templates/agents/gitflow/pr.md +0 -4
  17. package/templates/agents/gitflow/start.md +30 -5
  18. package/templates/mcp-scaffolding/frontend/nav-routes.ts.hbs +20 -20
  19. package/templates/mcp-scaffolding/frontend/routes.tsx.hbs +16 -24
  20. package/templates/mcp-scaffolding/migrations/seed-roles.cs.hbs +2 -2
  21. package/templates/skills/_resources/mcp-validate-documentation-spec.md +3 -3
  22. package/templates/skills/_shared.md +15 -17
  23. package/templates/skills/ai-prompt/SKILL.md +1 -1
  24. package/templates/skills/ai-prompt/steps/step-00-init.md +47 -0
  25. package/templates/skills/apex/SKILL.md +3 -4
  26. package/templates/skills/apex/_shared.md +10 -20
  27. package/templates/skills/apex/references/analysis-methods.md +141 -0
  28. package/templates/skills/apex/references/challenge-questions.md +1 -21
  29. package/templates/skills/apex/references/core-seed-data.md +35 -57
  30. package/templates/skills/apex/references/examine-build-validation.md +87 -0
  31. package/templates/skills/apex/references/execution-frontend-gates.md +177 -0
  32. package/templates/skills/apex/references/execution-frontend-patterns.md +105 -0
  33. package/templates/skills/apex/references/execution-layer1-rules.md +96 -0
  34. package/templates/skills/apex/references/initialization-challenge-flow.md +110 -0
  35. package/templates/skills/apex/references/planning-layer-mapping.md +151 -0
  36. package/templates/skills/apex/references/post-checks.md +145 -40
  37. package/templates/skills/apex/references/smartstack-api.md +35 -51
  38. package/templates/skills/apex/references/smartstack-frontend.md +17 -17
  39. package/templates/skills/apex/references/smartstack-layers.md +38 -62
  40. package/templates/skills/apex/steps/step-00-init.md +14 -26
  41. package/templates/skills/apex/steps/step-01-analyze.md +10 -143
  42. package/templates/skills/apex/steps/step-02-plan.md +10 -92
  43. package/templates/skills/apex/steps/step-03-execute.md +47 -249
  44. package/templates/skills/apex/steps/step-04-examine.md +14 -78
  45. package/templates/skills/apex/steps/step-05-deep-review.md +2 -2
  46. package/templates/skills/apex/steps/step-08-run-tests.md +2 -0
  47. package/templates/skills/application/SKILL.md +6 -7
  48. package/templates/skills/application/references/backend-controller-hierarchy.md +16 -16
  49. package/templates/skills/application/references/backend-seeding-and-dto-output.md +83 -0
  50. package/templates/skills/application/references/backend-table-prefix-mapping.md +79 -0
  51. package/templates/skills/application/references/backend-verification.md +1 -1
  52. package/templates/skills/application/references/frontend-i18n-and-output.md +67 -0
  53. package/templates/skills/application/references/frontend-route-naming.md +117 -0
  54. package/templates/skills/application/references/frontend-route-wiring-app-tsx.md +107 -0
  55. package/templates/skills/application/references/frontend-verification.md +12 -12
  56. package/templates/skills/application/references/init-parameter-detection.md +120 -0
  57. package/templates/skills/application/references/migration-checklist-troubleshooting.md +100 -0
  58. package/templates/skills/application/references/nav-fallback-procedure.md +5 -6
  59. package/templates/skills/application/references/provider-template.md +2 -6
  60. package/templates/skills/application/references/roles-client-project-handling.md +55 -0
  61. package/templates/skills/application/references/roles-fallback-procedure.md +149 -0
  62. package/templates/skills/application/references/test-coverage-requirements.md +213 -0
  63. package/templates/skills/application/references/test-frontend.md +3 -3
  64. package/templates/skills/application/steps/step-00-init.md +11 -141
  65. package/templates/skills/application/steps/step-01-navigation.md +3 -3
  66. package/templates/skills/application/steps/step-02-permissions.md +4 -4
  67. package/templates/skills/application/steps/step-03-roles.md +18 -175
  68. package/templates/skills/application/steps/step-03b-provider.md +1 -2
  69. package/templates/skills/application/steps/step-04-backend.md +19 -110
  70. package/templates/skills/application/steps/step-05-frontend.md +17 -143
  71. package/templates/skills/application/steps/step-06-migration.md +12 -60
  72. package/templates/skills/application/steps/step-07-tests.md +9 -76
  73. package/templates/skills/application/templates-backend.md +29 -27
  74. package/templates/skills/application/templates-frontend.md +48 -48
  75. package/templates/skills/application/templates-seed.md +57 -131
  76. package/templates/skills/business-analyse/SKILL.md +27 -30
  77. package/templates/skills/business-analyse/_architecture.md +6 -6
  78. package/templates/skills/business-analyse/_shared.md +60 -88
  79. package/templates/skills/business-analyse/questionnaire/04-data.md +3 -3
  80. package/templates/skills/business-analyse/questionnaire/06-security.md +1 -1
  81. package/templates/skills/business-analyse/questionnaire/13-cross-module.md +1 -1
  82. package/templates/skills/business-analyse/react/application-viewer.md +12 -12
  83. package/templates/skills/business-analyse/react/components.md +8 -12
  84. package/templates/skills/business-analyse/react/schema.md +11 -11
  85. package/templates/skills/business-analyse/references/agent-module-prompt.md +2 -3
  86. package/templates/skills/business-analyse/references/analysis-semantic-checks.md +190 -0
  87. package/templates/skills/business-analyse/references/cache-warming-strategy.md +2 -2
  88. package/templates/skills/business-analyse/references/cadrage-challenge-patterns.md +41 -0
  89. package/templates/skills/business-analyse/references/cadrage-coverage-matrix.md +74 -0
  90. package/templates/skills/business-analyse/references/cadrage-shared-modules.md +69 -0
  91. package/templates/skills/business-analyse/references/cadrage-structure-cards.md +1 -1
  92. package/templates/skills/business-analyse/references/compilation-structure-cards.md +297 -0
  93. package/templates/skills/business-analyse/references/consolidation-structural-checks.md +2 -2
  94. package/templates/skills/business-analyse/references/deploy-modes.md +5 -5
  95. package/templates/skills/business-analyse/references/detection-strategies.md +7 -7
  96. package/templates/skills/business-analyse/references/handoff-file-templates.md +14 -22
  97. package/templates/skills/business-analyse/references/handoff-mappings.md +4 -4
  98. package/templates/skills/business-analyse/references/handoff-seeddata-generation.md +312 -0
  99. package/templates/skills/business-analyse/references/init-schema-deployment.md +3 -3
  100. package/templates/skills/business-analyse/references/naming-conventions.md +22 -24
  101. package/templates/skills/business-analyse/references/prd-generation.md +2 -2
  102. package/templates/skills/business-analyse/references/review-data-mapping.md +2 -2
  103. package/templates/skills/business-analyse/references/robustness-checks.md +1 -1
  104. package/templates/skills/business-analyse/references/spec-auto-inference.md +3 -3
  105. package/templates/skills/business-analyse/references/team-orchestration.md +49 -6
  106. package/templates/skills/business-analyse/references/ui-dashboard-spec.md +1 -1
  107. package/templates/skills/business-analyse/references/ui-resource-cards.md +18 -18
  108. package/templates/skills/business-analyse/references/validate-incremental-html.md +2 -2
  109. package/templates/skills/business-analyse/references/validation-checklist.md +2 -2
  110. package/templates/skills/business-analyse/schemas/application-schema.json +4 -5
  111. package/templates/skills/business-analyse/schemas/project-schema.json +1 -6
  112. package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +2 -3
  113. package/templates/skills/business-analyse/schemas/sections/specification-schema.json +4 -4
  114. package/templates/skills/business-analyse/steps/step-00-init.md +8 -17
  115. package/templates/skills/business-analyse/steps/step-01-cadrage.md +35 -198
  116. package/templates/skills/business-analyse/steps/step-01b-applications.md +16 -20
  117. package/templates/skills/business-analyse/steps/step-02-decomposition.md +1 -1
  118. package/templates/skills/business-analyse/steps/step-03a1-setup.md +4 -4
  119. package/templates/skills/business-analyse/steps/step-03a2-analysis.md +1 -1
  120. package/templates/skills/business-analyse/steps/step-03b-ui.md +4 -4
  121. package/templates/skills/business-analyse/steps/step-03c-compile.md +66 -140
  122. package/templates/skills/business-analyse/steps/step-03d-validate.md +2 -2
  123. package/templates/skills/business-analyse/steps/step-04a-collect.md +2 -2
  124. package/templates/skills/business-analyse/steps/step-04b-analyze.md +42 -160
  125. package/templates/skills/business-analyse/steps/step-04c-decide.md +1 -1
  126. package/templates/skills/business-analyse/steps/step-05a-handoff.md +74 -104
  127. package/templates/skills/business-analyse/steps/step-05b-deploy.md +13 -11
  128. package/templates/skills/business-analyse/steps/step-06-review.md +3 -3
  129. package/templates/skills/business-analyse/templates/tpl-frd.md +13 -13
  130. package/templates/skills/business-analyse/templates/tpl-handoff.md +12 -12
  131. package/templates/skills/business-analyse/templates-frd.md +25 -25
  132. package/templates/skills/business-analyse/templates-react.md +15 -21
  133. package/templates/skills/controller/SKILL.md +1 -1
  134. package/templates/skills/controller/postman-templates.md +1 -1
  135. package/templates/skills/controller/references/controller-code-templates.md +2 -2
  136. package/templates/skills/controller/references/mcp-scaffold-workflow.md +209 -0
  137. package/templates/skills/controller/references/permission-sync-templates.md +13 -16
  138. package/templates/skills/controller/steps/step-00-init.md +11 -11
  139. package/templates/skills/controller/steps/step-03-generate.md +64 -103
  140. package/templates/skills/controller/templates.md +67 -71
  141. package/templates/skills/debug/SKILL.md +13 -218
  142. package/templates/skills/debug/steps/step-00-init.md +57 -0
  143. package/templates/skills/debug/steps/step-01-analyze.md +219 -0
  144. package/templates/skills/debug/steps/step-02-resolve.md +85 -0
  145. package/templates/skills/documentation/SKILL.md +49 -345
  146. package/templates/skills/documentation/data-schema.md +11 -8
  147. package/templates/skills/documentation/steps/step-00-init.md +70 -0
  148. package/templates/skills/documentation/steps/step-01-scan.md +113 -0
  149. package/templates/skills/documentation/steps/step-02-generate.md +231 -0
  150. package/templates/skills/documentation/steps/step-03-validate.md +238 -0
  151. package/templates/skills/documentation/templates.md +480 -322
  152. package/templates/skills/efcore/references/both-contexts.md +32 -0
  153. package/templates/skills/efcore/references/database-operations.md +67 -0
  154. package/templates/skills/efcore/references/destructive-operations.md +38 -0
  155. package/templates/skills/efcore/references/reset-operations.md +81 -0
  156. package/templates/skills/efcore/references/seed-methods.md +86 -0
  157. package/templates/skills/efcore/references/shared-init-functions.md +250 -0
  158. package/templates/skills/efcore/references/sql-objects-injection.md +61 -0
  159. package/templates/skills/efcore/references/troubleshooting.md +81 -0
  160. package/templates/skills/efcore/steps/db/step-deploy.md +1 -32
  161. package/templates/skills/efcore/steps/db/step-reset.md +7 -103
  162. package/templates/skills/efcore/steps/db/step-seed.md +10 -132
  163. package/templates/skills/efcore/steps/db/step-status.md +5 -44
  164. package/templates/skills/efcore/steps/migration/step-03-validate.md +8 -62
  165. package/templates/skills/efcore/steps/rebase-snapshot/step-03-create.md +1 -57
  166. package/templates/skills/efcore/steps/shared/step-00-init.md +11 -254
  167. package/templates/skills/efcore/steps/squash/step-03-create.md +1 -58
  168. package/templates/skills/feature-full/SKILL.md +1 -1
  169. package/templates/skills/feature-full/steps/step-00-init.md +57 -0
  170. package/templates/skills/feature-full/steps/step-01-implementation.md +1 -1
  171. package/templates/skills/gitflow/SKILL.md +1 -1
  172. package/templates/skills/gitflow/_shared.md +23 -0
  173. package/templates/skills/gitflow/references/commit-message-generation.md +58 -0
  174. package/templates/skills/gitflow/references/commit-migration-validation.md +49 -0
  175. package/templates/skills/gitflow/references/finish-cleanup.md +51 -0
  176. package/templates/skills/gitflow/references/finish-version-bumping.md +45 -0
  177. package/templates/skills/gitflow/references/init-environment-detection.md +41 -0
  178. package/templates/skills/gitflow/references/init-questions.md +185 -0
  179. package/templates/skills/gitflow/references/init-structure-creation.md +71 -0
  180. package/templates/skills/gitflow/references/init-version-detection.md +21 -0
  181. package/templates/skills/gitflow/references/init-workspace-detection.md +43 -0
  182. package/templates/skills/gitflow/references/merge-ci-status.md +36 -0
  183. package/templates/skills/gitflow/references/merge-execution.md +62 -0
  184. package/templates/skills/gitflow/references/merge-pr-context.md +76 -0
  185. package/templates/skills/gitflow/references/pr-build-checks.md +60 -0
  186. package/templates/skills/gitflow/references/pr-generation.md +58 -0
  187. package/templates/skills/gitflow/references/start-branch-normalization.md +28 -0
  188. package/templates/skills/gitflow/references/start-worktree-creation.md +50 -0
  189. package/templates/skills/gitflow/references/sync-push-verify.md +44 -0
  190. package/templates/skills/gitflow/references/sync-rebase-conflicts.md +38 -0
  191. package/templates/skills/gitflow/steps/step-commit.md +12 -91
  192. package/templates/skills/gitflow/steps/step-finish.md +15 -159
  193. package/templates/skills/gitflow/steps/step-init.md +24 -326
  194. package/templates/skills/gitflow/steps/step-merge.md +17 -176
  195. package/templates/skills/gitflow/steps/step-pr.md +10 -116
  196. package/templates/skills/gitflow/steps/step-start.md +16 -109
  197. package/templates/skills/gitflow/steps/step-sync.md +6 -69
  198. package/templates/skills/ralph-loop/SKILL.md +6 -0
  199. package/templates/skills/ralph-loop/references/category-completeness.md +185 -0
  200. package/templates/skills/ralph-loop/references/compact-loop.md +1 -1
  201. package/templates/skills/ralph-loop/references/init-resume-recovery.md +127 -0
  202. package/templates/skills/ralph-loop/references/module-transition.md +151 -0
  203. package/templates/skills/ralph-loop/references/multi-module-queue.md +171 -0
  204. package/templates/skills/ralph-loop/references/parallel-execution.md +246 -0
  205. package/templates/skills/ralph-loop/references/task-transform-legacy.md +6 -9
  206. package/templates/skills/ralph-loop/references/team-orchestration.md +45 -3
  207. package/templates/skills/ralph-loop/steps/step-00-init.md +36 -109
  208. package/templates/skills/ralph-loop/steps/step-01-task.md +15 -163
  209. package/templates/skills/ralph-loop/steps/step-02-execute.md +8 -154
  210. package/templates/skills/ralph-loop/steps/step-04-check.md +21 -73
  211. package/templates/skills/review-code/references/owasp-api-top10.md +5 -5
  212. package/templates/skills/review-code/references/smartstack-conventions.md +11 -11
  213. package/templates/skills/validate-feature/references/api-smoke-tests.md +140 -0
  214. package/templates/skills/validate-feature/references/db-validation-checks.md +180 -0
  215. package/templates/skills/validate-feature/steps/step-01-compile.md +5 -2
  216. package/templates/skills/validate-feature/steps/step-04-api-smoke.md +34 -145
  217. package/templates/skills/validate-feature/steps/step-05-db-validation.md +74 -260
  218. package/templates/skills/workflow/SKILL.md +1 -1
  219. package/templates/skills/workflow/steps/step-00-init.md +57 -0
@@ -8,11 +8,11 @@
8
8
 
9
9
  ```
10
10
  web/smartstack-web/src/
11
- ├── pages/$CONTEXT/$APPLICATION/$MODULE/
11
+ ├── pages/$APPLICATION/$MODULE/
12
12
  │ ├── $MODULE_PASCALPage.tsx # Main page (list)
13
13
  │ ├── $MODULE_PASCALDetailPage.tsx # Detail page
14
14
  │ └── Create$MODULE_PASCALPage.tsx # Create page
15
- ├── components/$CONTEXT/$MODULE/
15
+ ├── components/$APPLICATION/$MODULE/
16
16
  │ ├── $MODULE_PASCALListView.tsx # Reusable list component
17
17
  │ ├── $MODULE_PASCALForm.tsx # CRUD form
18
18
  │ └── $MODULE_PASCALFilters.tsx # Filters
@@ -55,10 +55,10 @@ Examples:
55
55
  ## TEMPLATE: MAIN PAGE
56
56
 
57
57
  ```tsx
58
- // pages/$CONTEXT/$APPLICATION/$MODULE/$MODULE_PASCALPage.tsx
58
+ // pages/$APPLICATION/$MODULE/$MODULE_PASCALPage.tsx
59
59
 
60
60
  import { useTranslation } from 'react-i18next';
61
- import { $MODULE_PASCALListView } from '@/components/$CONTEXT/$MODULE/$MODULE_PASCALListView';
61
+ import { $MODULE_PASCALListView } from '@/components/$APPLICATION/$MODULE/$MODULE_PASCALListView';
62
62
 
63
63
  export function $MODULE_PASCALPage() {
64
64
  const { t } = useTranslation(['$module', 'common']);
@@ -78,7 +78,7 @@ export function $MODULE_PASCALPage() {
78
78
  ## TEMPLATE: LIST VIEW (Reusable component)
79
79
 
80
80
  ```tsx
81
- // components/$CONTEXT/$MODULE/$MODULE_PASCALListView.tsx
81
+ // components/$APPLICATION/$MODULE/$MODULE_PASCALListView.tsx
82
82
 
83
83
  import { useState, useEffect } from 'react';
84
84
  import { useNavigate } from 'react-router-dom';
@@ -511,41 +511,41 @@ Before adding routes, **read App.tsx** and detect which pattern is used:
511
511
 
512
512
  | Pattern | How to detect | Action |
513
513
  |---------|---------------|--------|
514
- | **Pattern A** (mergeRoutes) | `contextRoutes: ContextRouteExtensions` present | Add to `contextRoutes.{context}[]` array |
515
- | **Pattern B** (JSX Routes) | `<Route path="/{context}" element={<{Layout} />}>` present | Insert `<Route>` children inside Layout wrapper |
514
+ | **Pattern A** (mergeRoutes) | `applicationRoutes: ApplicationRouteExtensions` present | Add to `applicationRoutes.{application}[]` array |
515
+ | **Pattern B** (JSX Routes) | `<Route path="/{application}" element={<{Layout} />}>` present | Insert `<Route>` children inside Layout wrapper |
516
516
 
517
- ### Pattern A: mergeRoutes (contextRoutes array)
517
+ ### Pattern A: mergeRoutes (applicationRoutes array)
518
518
 
519
519
  > **This is the DEFAULT pattern** generated by `smartstack init`.
520
- > Routes added to `contextRoutes` are automatically injected into BOTH standard and tenant-prefixed route trees by `mergeRoutes()`. No manual duplication needed.
520
+ > Routes added to `applicationRoutes` are automatically injected into BOTH standard and tenant-prefixed route trees by `mergeRoutes()`. No manual duplication needed.
521
521
 
522
522
  ```tsx
523
523
  // Add to App.tsx — imports at top
524
- import { $MODULE_PASCALPage } from '@/pages/$CONTEXT/$APPLICATION/$MODULE/$MODULE_PASCALPage';
525
- import { $MODULE_PASCALDetailPage } from '@/pages/$CONTEXT/$APPLICATION/$MODULE/$MODULE_PASCALDetailPage';
526
- import { Create$MODULE_PASCALPage } from '@/pages/$CONTEXT/$APPLICATION/$MODULE/Create$MODULE_PASCALPage';
524
+ import { $MODULE_PASCALPage } from '@/pages/$APPLICATION/$MODULE/$MODULE_PASCALPage';
525
+ import { $MODULE_PASCALDetailPage } from '@/pages/$APPLICATION/$MODULE/$MODULE_PASCALDetailPage';
526
+ import { Create$MODULE_PASCALPage } from '@/pages/$APPLICATION/$MODULE/Create$MODULE_PASCALPage';
527
527
 
528
- // Add routes to contextRoutes.{context}[] with RELATIVE paths (no leading /)
529
- const contextRoutes: ContextRouteExtensions = {
530
- $CONTEXT: [
528
+ // Add routes to applicationRoutes.{application}[] with RELATIVE paths (no leading /)
529
+ const applicationRoutes: ApplicationRouteExtensions = {
530
+ $APPLICATION: [
531
531
  // ... existing routes ...
532
- { path: '$APPLICATION_KEBAB/$MODULE_KEBAB', element: <$MODULE_PASCALPage /> },
533
- { path: '$APPLICATION_KEBAB/$MODULE_KEBAB/new', element: <Create$MODULE_PASCALPage /> },
534
- { path: '$APPLICATION_KEBAB/$MODULE_KEBAB/:id', element: <$MODULE_PASCALDetailPage /> },
535
- { path: '$APPLICATION_KEBAB/$MODULE_KEBAB/:id/edit', element: <Create$MODULE_PASCALPage /> },
532
+ { path: '$MODULE_KEBAB', element: <$MODULE_PASCALPage /> },
533
+ { path: '$MODULE_KEBAB/new', element: <Create$MODULE_PASCALPage /> },
534
+ { path: '$MODULE_KEBAB/:id', element: <$MODULE_PASCALDetailPage /> },
535
+ { path: '$MODULE_KEBAB/:id/edit', element: <Create$MODULE_PASCALPage /> },
536
536
  ],
537
537
  };
538
538
  ```
539
539
 
540
- **mergeRoutes auto-generates redirects** for intermediate paths (e.g., `$APPLICATION_KEBAB` → `$APPLICATION_KEBAB/$DEFAULT_MODULE_KEBAB`) so you don't need to add index redirects manually.
540
+ **mergeRoutes auto-generates redirects** for intermediate paths (e.g., `$APPLICATION` → `$APPLICATION/$DEFAULT_MODULE_KEBAB`) so you don't need to add index redirects manually.
541
541
 
542
- **Context-to-Layout mapping (automatic via mergeRoutes):**
542
+ **Application-to-Layout mapping (automatic via mergeRoutes):**
543
543
 
544
- | Context key | Injected into Layout | Standard path | Tenant path |
545
- |-------------|---------------------|---------------|-------------|
546
- | `platform` | `AdminLayout` | `/platform/...` | `/t/:slug/platform/...` |
547
- | `business` | `BusinessLayout` | `/business/...` | `/t/:slug/business/...` |
548
- | `personal` | `UserLayout` | `/personal/myspace/...` | `/t/:slug/personal/myspace/...` |
544
+ | Application key | Injected into Layout | Standard path | Tenant path |
545
+ |-----------------|---------------------|---------------|-------------|
546
+ | `administration` | `AdminLayout` | `/administration/...` | `/t/:slug/administration/...` |
547
+ | `{application}` | `{Application}Layout` | `/{application}/...` | `/t/:slug/{application}/...` |
548
+ | `myspace` | `UserLayout` | `/myspace/...` | `/t/:slug/myspace/...` |
549
549
 
550
550
  ### Pattern B: JSX Routes (inside Layout wrapper)
551
551
 
@@ -558,31 +558,31 @@ SmartStack layouts (`AdminLayout`, `BusinessLayout`, `UserLayout`) provide the a
558
558
  **Step-by-step insertion:**
559
559
 
560
560
  1. Open `App.tsx`
561
- 2. Find the existing layout route for the target context:
562
- - `platform` → `<Route path="/platform" element={<AdminLayout />}>`
563
- - `business` → `<Route path="/business" element={<BusinessLayout />}>`
564
- - `personal` → `<Route path="/personal/myspace" element={<UserLayout />}>`
561
+ 2. Find the existing layout route for the target application:
562
+ - `administration` → `<Route path="/administration" element={<AdminLayout />}>`
563
+ - `{application}` → `<Route path="/{application}" element={<{Application}Layout />}>`
564
+ - `myspace` → `<Route path="/myspace" element={<UserLayout />}>`
565
565
  3. Add the new routes **INSIDE** that `<Route>` block
566
566
  4. If a tenant-prefixed block exists (`/t/:slug/...`), add the routes there too
567
567
 
568
568
  ```tsx
569
569
  // Add to App.tsx
570
570
 
571
- import { $MODULE_PASCALPage } from '@/pages/$CONTEXT/$APPLICATION/$MODULE/$MODULE_PASCALPage';
572
- import { $MODULE_PASCALDetailPage } from '@/pages/$CONTEXT/$APPLICATION/$MODULE/$MODULE_PASCALDetailPage';
573
- import { Create$MODULE_PASCALPage } from '@/pages/$CONTEXT/$APPLICATION/$MODULE/Create$MODULE_PASCALPage';
571
+ import { $MODULE_PASCALPage } from '@/pages/$APPLICATION/$MODULE/$MODULE_PASCALPage';
572
+ import { $MODULE_PASCALDetailPage } from '@/pages/$APPLICATION/$MODULE/$MODULE_PASCALDetailPage';
573
+ import { Create$MODULE_PASCALPage } from '@/pages/$APPLICATION/$MODULE/Create$MODULE_PASCALPage';
574
574
 
575
575
  // Find the EXISTING layout route and add routes INSIDE it:
576
- <Route path="/$CONTEXT" element={<$CONTEXT_Layout />}>
576
+ <Route path="/$APPLICATION" element={<$APPLICATION_Layout />}>
577
577
  {/* ... existing routes stay here ... */}
578
578
 
579
- {/* NEW: $APPLICATION routes - added as children of the layout */}
580
- <Route path="$APPLICATION_KEBAB">
581
- <Route index element={<Navigate to="$DEFAULT_MODULE_KEBAB" replace />} />
582
- <Route path="$MODULE_KEBAB" element={<$MODULE_PASCALPage />} />
583
- <Route path="$MODULE_KEBAB/new" element={<Create$MODULE_PASCALPage />} />
584
- <Route path="$MODULE_KEBAB/:id" element={<$MODULE_PASCALDetailPage />} />
585
- <Route path="$MODULE_KEBAB/:id/edit" element={<Create$MODULE_PASCALPage />} />
579
+ {/* NEW: $MODULE routes - added as children of the layout */}
580
+ <Route path="$MODULE_KEBAB">
581
+ <Route index element={<Navigate to="." replace />} />
582
+ <Route index element={<$MODULE_PASCALPage />} />
583
+ <Route path="new" element={<Create$MODULE_PASCALPage />} />
584
+ <Route path=":id" element={<$MODULE_PASCALDetailPage />} />
585
+ <Route path=":id/edit" element={<Create$MODULE_PASCALPage />} />
586
586
  </Route>
587
587
  </Route>
588
588
  ```
@@ -593,22 +593,22 @@ import { Create$MODULE_PASCALPage } from '@/pages/$CONTEXT/$APPLICATION/$MODULE/
593
593
  ```tsx
594
594
  // ❌ WRONG — bypasses layout entirely, shell will NOT render
595
595
  const clientRoutes: RouteConfig[] = [
596
- { path: '/business/$APPLICATION_KEBAB/$MODULE_KEBAB', element: <$MODULE_PASCALPage /> },
596
+ { path: '/$APPLICATION_KEBAB/$MODULE_KEBAB', element: <$MODULE_PASCALPage /> },
597
597
  ];
598
598
  ```
599
599
 
600
- `clientRoutes` is ONLY for routes **outside** SmartStack locked contexts (e.g., `/about`, `/pricing`).
600
+ `clientRoutes` is ONLY for routes **outside** SmartStack locked applications (e.g., `/about`, `/pricing`).
601
601
 
602
602
  **FORBIDDEN — Flat routes outside layout:**
603
603
  ```tsx
604
604
  // ❌ WRONG (Pattern B only) — flat route bypasses layout
605
- <Route path="/$CONTEXT/$APPLICATION_KEBAB/$MODULE_KEBAB" element={<$MODULE_PASCALPage />} />
605
+ <Route path="/$APPLICATION_KEBAB/$MODULE_KEBAB" element={<$MODULE_PASCALPage />} />
606
606
  ```
607
607
 
608
608
  ### Why nested/context routes?
609
609
 
610
- | Aspect | clientRoutes (wrong) | contextRoutes / nested (correct) |
611
- |--------|---------------------|----------------------------------|
610
+ | Aspect | clientRoutes (wrong) | applicationRoutes / nested (correct) |
611
+ |--------|---------------------|--------------------------------------|
612
612
  | Shell rendered | No (bypasses layout) | Yes (Outlet pattern) |
613
613
  | AvatarMenu visible | No | Yes |
614
614
  | Tenant prefix | Manual duplication | Automatic (mergeRoutes) |
@@ -628,7 +628,7 @@ These patterns are **strictly prohibited** in generated frontend code:
628
628
  | Any hardcoded Tailwind color (`bg-{color}-{shade}`) | CSS variables from style-guide.md |
629
629
  | `rounded-lg`, `rounded-md` | `rounded-[var(--radius-card)]`, `rounded-[var(--radius-button)]` |
630
630
  | Custom `<div>` cards for entity lists | `<EntityCard>` component (MANDATORY) |
631
- | Flat routes outside Layout wrapper | Nested routes inside `<BusinessLayout>` / `<AdminLayout>` |
631
+ | Flat routes outside Layout wrapper | Nested routes inside Layout wrapper |
632
632
  | Route paths with PascalCase or concatenated words (e.g., `humanresources`, `timeManagement`) | Kebab-case route paths (e.g., `human-resources`, `time-management`) |
633
633
  | `navigate(\`${basePath}/${item.id}\`)` in list row click | `navigate(item.id)` (relative navigation, no path duplication) |
634
634
  | Only 2 languages (fr/en) | All 4 languages (fr/en/it/de) |
@@ -649,7 +649,7 @@ These patterns are **strictly prohibited** in generated frontend code:
649
649
  | ☐ Preferences hook created (`use$MODULE_PASCALPreferences.ts`) | |
650
650
  | ☐ API service created (uses `apiClient`, NOT raw axios) | |
651
651
  | ☐ Routes added inside Layout wrapper in App.tsx | |
652
- | ☐ Route path follows `/{context}/{application_kebab}/{module_kebab}` (kebab-case) | |
652
+ | ☐ Route path follows `/{application_kebab}/{module_kebab}` (kebab-case) | |
653
653
 
654
654
  ### Theme Compliance
655
655
  | Check | Status |
@@ -22,69 +22,6 @@ private static Guid GenerateGuid(int index)
22
22
 
23
23
  ---
24
24
 
25
- ## TEMPLATE: CONTEXT
26
-
27
- ### Navigation Entity
28
-
29
- ```csharp
30
- // In NavigationContextConfiguration.cs - HasData()
31
- new {
32
- Id = Guid.Parse("$CONTEXT_GUID"),
33
- Code = "$CODE", // e.g.: "erp"
34
- Label = "$LABEL_EN", // e.g.: "ERP"
35
- Description = "$DESC_EN", // e.g.: "Enterprise management"
36
- Icon = "$ICON", // e.g.: "Building2"
37
- IconType = IconType.Lucide,
38
- Route = "/$CODE", // e.g.: "/erp"
39
- DisplayOrder = $ORDER, // e.g.: 4
40
- IsActive = true,
41
- CreatedAt = seedDate
42
- }
43
- ```
44
-
45
- ### Translations (4 languages)
46
-
47
- ```csharp
48
- // In NavigationTranslationConfiguration.cs - GetSeedData()
49
- // Context translations
50
- translations.Add(new {
51
- Id = GenerateGuid(index++),
52
- EntityType = NavigationEntityType.Context,
53
- EntityId = $CONTEXT_GUID,
54
- LanguageCode = "fr",
55
- Label = "$LABEL_FR",
56
- Description = "$DESC_FR",
57
- CreatedAt = seedDate
58
- });
59
- translations.Add(new {
60
- Id = GenerateGuid(index++),
61
- EntityType = NavigationEntityType.Context,
62
- EntityId = $CONTEXT_GUID,
63
- LanguageCode = "en",
64
- Label = "$LABEL_EN",
65
- Description = "$DESC_EN",
66
- CreatedAt = seedDate
67
- });
68
- translations.Add(new {
69
- Id = GenerateGuid(index++),
70
- EntityType = NavigationEntityType.Context,
71
- EntityId = $CONTEXT_GUID,
72
- LanguageCode = "it",
73
- Label = "$LABEL_IT",
74
- Description = "$DESC_IT",
75
- CreatedAt = seedDate
76
- });
77
- translations.Add(new {
78
- Id = GenerateGuid(index++),
79
- EntityType = NavigationEntityType.Context,
80
- EntityId = $CONTEXT_GUID,
81
- LanguageCode = "de",
82
- Label = "$LABEL_DE",
83
- Description = "$DESC_DE",
84
- CreatedAt = seedDate
85
- });
86
- ```
87
-
88
25
  ---
89
26
 
90
27
  ## TEMPLATE: APPLICATION
@@ -95,13 +32,12 @@ translations.Add(new {
95
32
  // In NavigationApplicationConfiguration.cs - HasData()
96
33
  new {
97
34
  Id = Guid.Parse("$APP_GUID"),
98
- ContextId = Guid.Parse("$CONTEXT_GUID"),
99
35
  Code = "$CODE", // e.g.: "sales"
100
36
  Label = "$LABEL_EN", // e.g.: "Sales"
101
37
  Description = "$DESC_EN", // e.g.: "Sales management"
102
38
  Icon = "$ICON", // e.g.: "TrendingUp"
103
39
  IconType = IconType.Lucide,
104
- Route = "/$CONTEXT/$CODE", // e.g.: "/erp/sales"
40
+ Route = "/$CODE", // e.g.: "/sales"
105
41
  DisplayOrder = $ORDER,
106
42
  IsActive = true,
107
43
  CreatedAt = seedDate
@@ -166,7 +102,7 @@ new {
166
102
  Description = "$DESC_EN", // e.g.: "Product management"
167
103
  Icon = "$ICON", // e.g.: "Package"
168
104
  IconType = IconType.Lucide,
169
- Route = "/$CONTEXT/$APP/$CODE", // e.g.: "/erp/sales/products"
105
+ Route = "/$APP/$CODE", // e.g.: "/sales/products"
170
106
  DisplayOrder = $ORDER,
171
107
  IsActive = true,
172
108
  CreatedAt = seedDate
@@ -231,7 +167,7 @@ new {
231
167
  Description = "$DESC_EN", // e.g.: "Inventory management"
232
168
  Icon = "$ICON", // e.g.: "Warehouse"
233
169
  IconType = IconType.Lucide,
234
- Route = "/$CONTEXT/$APP/$MODULE/$CODE", // e.g.: "/erp/sales/products/inventory"
170
+ Route = "/$APP/$MODULE/$CODE", // e.g.: "/sales/products/inventory"
235
171
  DisplayOrder = $ORDER,
236
172
  IsActive = true,
237
173
  CreatedAt = seedDate
@@ -293,37 +229,37 @@ translations.Add(new {
293
229
  // Read
294
230
  new {
295
231
  Id = Guid.Parse("$PERM_READ_GUID"),
296
- Code = "$CONTEXT.$APP.$MODULE.read",
232
+ Code = "$APP.$MODULE.read",
297
233
  Name = "View $MODULE_LABEL",
298
234
  Description = "View $MODULE_LABEL list and details",
299
- Category = "$CONTEXT.$APP.$MODULE",
235
+ Category = "$APP.$MODULE",
300
236
  CreatedAt = seedDate
301
237
  },
302
238
  // Create
303
239
  new {
304
240
  Id = Guid.Parse("$PERM_CREATE_GUID"),
305
- Code = "$CONTEXT.$APP.$MODULE.create",
241
+ Code = "$APP.$MODULE.create",
306
242
  Name = "Create $MODULE_LABEL",
307
243
  Description = "Create new $MODULE_LABEL",
308
- Category = "$CONTEXT.$APP.$MODULE",
244
+ Category = "$APP.$MODULE",
309
245
  CreatedAt = seedDate
310
246
  },
311
247
  // Update
312
248
  new {
313
249
  Id = Guid.Parse("$PERM_UPDATE_GUID"),
314
- Code = "$CONTEXT.$APP.$MODULE.update",
250
+ Code = "$APP.$MODULE.update",
315
251
  Name = "Update $MODULE_LABEL",
316
252
  Description = "Modify existing $MODULE_LABEL",
317
- Category = "$CONTEXT.$APP.$MODULE",
253
+ Category = "$APP.$MODULE",
318
254
  CreatedAt = seedDate
319
255
  },
320
256
  // Delete
321
257
  new {
322
258
  Id = Guid.Parse("$PERM_DELETE_GUID"),
323
- Code = "$CONTEXT.$APP.$MODULE.delete",
259
+ Code = "$APP.$MODULE.delete",
324
260
  Name = "Delete $MODULE_LABEL",
325
261
  Description = "Remove $MODULE_LABEL",
326
- Category = "$CONTEXT.$APP.$MODULE",
262
+ Category = "$APP.$MODULE",
327
263
  CreatedAt = seedDate
328
264
  }
329
265
  ```
@@ -346,7 +282,7 @@ new { RoleId = Guid.Parse("...StandardUserRoleId..."), PermissionId = $PERM_READ
346
282
 
347
283
  ---
348
284
 
349
- ## TEMPLATE: SECTION PERMISSIONS SEED (Level 4)
285
+ ## TEMPLATE: SECTION PERMISSIONS SEED (Level 3)
350
286
 
351
287
  > **Usage:** When a Module has sub-pages with different permissions
352
288
 
@@ -354,7 +290,7 @@ new { RoleId = Guid.Parse("...StandardUserRoleId..."), PermissionId = $PERM_READ
354
290
 
355
291
  ```csharp
356
292
  // In PermissionConfiguration.cs - HasData()
357
- // Pattern: {context}.{application}.{module}.{section}.{action}
293
+ // Pattern: {application}.{module}.{section}.{action}
358
294
 
359
295
  // Declare SectionId (must match NavigationSectionConfiguration.cs)
360
296
  var {section}SectionId = Guid.Parse("$SECTION_GUID");
@@ -362,7 +298,7 @@ var {section}SectionId = Guid.Parse("$SECTION_GUID");
362
298
  // Wildcard Section
363
299
  new {
364
300
  Id = Guid.Parse("$PERM_SECTION_WILDCARD_GUID"),
365
- Path = "$CONTEXT.$APP.$MODULE.$SECTION.*",
301
+ Path = "$APP.$MODULE.$SECTION.*",
366
302
  Level = PermissionLevel.Section,
367
303
  IsWildcard = true,
368
304
  SectionId = {section}SectionId,
@@ -372,7 +308,7 @@ new {
372
308
  // Read
373
309
  new {
374
310
  Id = Guid.Parse("$PERM_SECTION_READ_GUID"),
375
- Path = "$CONTEXT.$APP.$MODULE.$SECTION.read",
311
+ Path = "$APP.$MODULE.$SECTION.read",
376
312
  Level = PermissionLevel.Section,
377
313
  Action = PermissionAction.Read,
378
314
  IsWildcard = false,
@@ -383,7 +319,7 @@ new {
383
319
  // Create
384
320
  new {
385
321
  Id = Guid.Parse("$PERM_SECTION_CREATE_GUID"),
386
- Path = "$CONTEXT.$APP.$MODULE.$SECTION.create",
322
+ Path = "$APP.$MODULE.$SECTION.create",
387
323
  Level = PermissionLevel.Section,
388
324
  Action = PermissionAction.Create,
389
325
  IsWildcard = false,
@@ -394,7 +330,7 @@ new {
394
330
  // Update
395
331
  new {
396
332
  Id = Guid.Parse("$PERM_SECTION_UPDATE_GUID"),
397
- Path = "$CONTEXT.$APP.$MODULE.$SECTION.update",
333
+ Path = "$APP.$MODULE.$SECTION.update",
398
334
  Level = PermissionLevel.Section,
399
335
  Action = PermissionAction.Update,
400
336
  IsWildcard = false,
@@ -405,7 +341,7 @@ new {
405
341
  // Delete
406
342
  new {
407
343
  Id = Guid.Parse("$PERM_SECTION_DELETE_GUID"),
408
- Path = "$CONTEXT.$APP.$MODULE.$SECTION.delete",
344
+ Path = "$APP.$MODULE.$SECTION.delete",
409
345
  Level = PermissionLevel.Section,
410
346
  Action = PermissionAction.Delete,
411
347
  IsWildcard = false,
@@ -416,7 +352,7 @@ new {
416
352
  // Execute (optional)
417
353
  new {
418
354
  Id = Guid.Parse("$PERM_SECTION_EXECUTE_GUID"),
419
- Path = "$CONTEXT.$APP.$MODULE.$SECTION.execute",
355
+ Path = "$APP.$MODULE.$SECTION.execute",
420
356
  Level = PermissionLevel.Section,
421
357
  Action = PermissionAction.Execute,
422
358
  IsWildcard = false,
@@ -428,7 +364,7 @@ new {
428
364
 
429
365
  ---
430
366
 
431
- ## TEMPLATE: RESOURCE PERMISSIONS SEED (Level 5)
367
+ ## TEMPLATE: RESOURCE PERMISSIONS SEED (Level 4)
432
368
 
433
369
  > **Usage:** Finest level - sub-resources with distinct permissions (e.g.: Prompts → Blocks)
434
370
 
@@ -436,7 +372,7 @@ new {
436
372
 
437
373
  ```csharp
438
374
  // In PermissionConfiguration.cs - HasData()
439
- // Pattern: {context}.{application}.{module}.{section}.{resource}.{action}
375
+ // Pattern: {application}.{module}.{section}.{resource}.{action}
440
376
 
441
377
  // Declare ResourceId (must match NavigationResourceConfiguration.cs)
442
378
  var {resource}ResourceId = Guid.Parse("$RESOURCE_GUID");
@@ -444,7 +380,7 @@ var {resource}ResourceId = Guid.Parse("$RESOURCE_GUID");
444
380
  // Wildcard Resource
445
381
  new {
446
382
  Id = Guid.Parse("$PERM_RESOURCE_WILDCARD_GUID"),
447
- Path = "$CONTEXT.$APP.$MODULE.$SECTION.$RESOURCE.*",
383
+ Path = "$APP.$MODULE.$SECTION.$RESOURCE.*",
448
384
  Level = PermissionLevel.Resource,
449
385
  IsWildcard = true,
450
386
  ResourceId = {resource}ResourceId,
@@ -454,7 +390,7 @@ new {
454
390
  // Read
455
391
  new {
456
392
  Id = Guid.Parse("$PERM_RESOURCE_READ_GUID"),
457
- Path = "$CONTEXT.$APP.$MODULE.$SECTION.$RESOURCE.read",
393
+ Path = "$APP.$MODULE.$SECTION.$RESOURCE.read",
458
394
  Level = PermissionLevel.Resource,
459
395
  Action = PermissionAction.Read,
460
396
  IsWildcard = false,
@@ -465,7 +401,7 @@ new {
465
401
  // Create
466
402
  new {
467
403
  Id = Guid.Parse("$PERM_RESOURCE_CREATE_GUID"),
468
- Path = "$CONTEXT.$APP.$MODULE.$SECTION.$RESOURCE.create",
404
+ Path = "$APP.$MODULE.$SECTION.$RESOURCE.create",
469
405
  Level = PermissionLevel.Resource,
470
406
  Action = PermissionAction.Create,
471
407
  IsWildcard = false,
@@ -476,7 +412,7 @@ new {
476
412
  // Update
477
413
  new {
478
414
  Id = Guid.Parse("$PERM_RESOURCE_UPDATE_GUID"),
479
- Path = "$CONTEXT.$APP.$MODULE.$SECTION.$RESOURCE.update",
415
+ Path = "$APP.$MODULE.$SECTION.$RESOURCE.update",
480
416
  Level = PermissionLevel.Resource,
481
417
  Action = PermissionAction.Update,
482
418
  IsWildcard = false,
@@ -487,7 +423,7 @@ new {
487
423
  // Delete
488
424
  new {
489
425
  Id = Guid.Parse("$PERM_RESOURCE_DELETE_GUID"),
490
- Path = "$CONTEXT.$APP.$MODULE.$SECTION.$RESOURCE.delete",
426
+ Path = "$APP.$MODULE.$SECTION.$RESOURCE.delete",
491
427
  Level = PermissionLevel.Resource,
492
428
  Action = PermissionAction.Delete,
493
429
  IsWildcard = false,
@@ -512,7 +448,7 @@ new {
512
448
  // Bulk Create
513
449
  new {
514
450
  Id = Guid.Parse("$PERM_BULK_CREATE_GUID"),
515
- Path = "$CONTEXT.$APP.$MODULE.bulk-create",
451
+ Path = "$APP.$MODULE.bulk-create",
516
452
  Level = PermissionLevel.Module,
517
453
  Action = PermissionAction.Create,
518
454
  IsWildcard = false,
@@ -523,7 +459,7 @@ new {
523
459
  // Bulk Update
524
460
  new {
525
461
  Id = Guid.Parse("$PERM_BULK_UPDATE_GUID"),
526
- Path = "$CONTEXT.$APP.$MODULE.bulk-update",
462
+ Path = "$APP.$MODULE.bulk-update",
527
463
  Level = PermissionLevel.Module,
528
464
  Action = PermissionAction.Update,
529
465
  IsWildcard = false,
@@ -534,7 +470,7 @@ new {
534
470
  // Bulk Delete
535
471
  new {
536
472
  Id = Guid.Parse("$PERM_BULK_DELETE_GUID"),
537
- Path = "$CONTEXT.$APP.$MODULE.bulk-delete",
473
+ Path = "$APP.$MODULE.bulk-delete",
538
474
  Level = PermissionLevel.Module,
539
475
  Action = PermissionAction.Delete,
540
476
  IsWildcard = false,
@@ -545,7 +481,7 @@ new {
545
481
  // Export
546
482
  new {
547
483
  Id = Guid.Parse("$PERM_EXPORT_GUID"),
548
- Path = "$CONTEXT.$APP.$MODULE.export",
484
+ Path = "$APP.$MODULE.export",
549
485
  Level = PermissionLevel.Module,
550
486
  Action = PermissionAction.Execute,
551
487
  IsWildcard = false,
@@ -556,7 +492,7 @@ new {
556
492
  // Import
557
493
  new {
558
494
  Id = Guid.Parse("$PERM_IMPORT_GUID"),
559
- Path = "$CONTEXT.$APP.$MODULE.import",
495
+ Path = "$APP.$MODULE.import",
560
496
  Level = PermissionLevel.Module,
561
497
  Action = PermissionAction.Create,
562
498
  IsWildcard = false,
@@ -568,13 +504,11 @@ new {
568
504
 
569
505
  ---
570
506
 
571
- ## COMPLETE EXAMPLE: "Products" Module in "ERP > Sales"
507
+ ## COMPLETE EXAMPLE: "Products" Module in "Sales"
572
508
 
573
509
  ### Variables
574
510
 
575
511
  ```
576
- $CONTEXT = erp
577
- $CONTEXT_GUID = e1e1e1e1-1111-1111-1111-111111111111
578
512
  $APP = sales
579
513
  $APP_GUID = e2e2e2e2-2222-2222-2222-222222222222
580
514
  $MODULE = products
@@ -596,12 +530,11 @@ $ORDER = 1
596
530
 
597
531
  ### Files to modify
598
532
 
599
- 1. `NavigationContextConfiguration.cs` - Add ERP context (if new)
600
- 2. `NavigationApplicationConfiguration.cs` - Add Sales application
601
- 3. `NavigationModuleConfiguration.cs` - Add Products module
602
- 4. `NavigationTranslationConfiguration.cs` - Add 4 translations × number of entities
603
- 5. `PermissionConfiguration.cs` - Add CRUD permissions
604
- 6. `RolePermissionConfiguration.cs` - Assign to default roles
533
+ 1. `NavigationApplicationConfiguration.cs` - Add Sales application
534
+ 2. `NavigationModuleConfiguration.cs` - Add Products module
535
+ 3. `NavigationTranslationConfiguration.cs` - Add 4 translations × number of entities
536
+ 4. `PermissionConfiguration.cs` - Add CRUD permissions
537
+ 5. `RolePermissionConfiguration.cs` - Assign to default roles
605
538
 
606
539
  ---
607
540
 
@@ -627,7 +560,7 @@ Domain entity seeds use the SeedData provider pattern below.
627
560
  ```csharp
628
561
  // Infrastructure/Persistence/Seeding/Data/{Domain}/{EntityName}SeedData.cs
629
562
 
630
- using SmartStack.Domain.{Context}.{Application}.{Module};
563
+ using SmartStack.Domain.{Application}.{Module};
631
564
 
632
565
  namespace SmartStack.Infrastructure.Persistence.Seeding.Data.{Domain};
633
566
 
@@ -854,7 +787,7 @@ InitializeSmartStackAsync()
854
787
  using Microsoft.EntityFrameworkCore;
855
788
  using SmartStack.Application.Common.Interfaces;
856
789
  using SmartStack.Domain.Navigation;
857
- using SmartStack.Domain.Platform.Administration.Roles;
790
+ using SmartStack.Domain.Administration.Roles;
858
791
 
859
792
  namespace {BaseNamespace}.Infrastructure.Persistence.Seeding;
860
793
 
@@ -877,13 +810,10 @@ public class {AppPascalName}SeedDataProvider : IClientSeedDataProvider
877
810
  }
878
811
  else
879
812
  {
880
- var parentContext = await context.NavigationContexts
881
- .FirstAsync(c => c.Code == "{context_code}", ct);
882
-
883
813
  app = NavigationApplication.Create(
884
- parentContext.Id, "{app_code}", "{app_label_en}",
814
+ "{app_code}", "{app_label_en}",
885
815
  "{app_desc_en}", "{app_icon}", IconType.Lucide,
886
- "/{context_code}/{app_code}", {display_order});
816
+ "/{app_code}", {display_order});
887
817
  context.NavigationApplications.Add(app);
888
818
  await ((DbContext)context).SaveChangesAsync(ct);
889
819
 
@@ -980,11 +910,11 @@ public class {AppPascalName}SeedDataProvider : IClientSeedDataProvider
980
910
  | ☐ Index translations continue existing sequence | |
981
911
  | ☐ Route aligned with permission path | |
982
912
  | ☐ DisplayOrder consistent | |
983
- | ☐ CRUD permissions created (Level 3 - Module) | |
984
- | ☐ Section permissions if sub-pages (Level 4) | |
913
+ | ☐ CRUD permissions created (Level 2 - Module) | |
914
+ | ☐ Section permissions if sub-pages (Level 3) | |
985
915
  | ☐ NavigationSections seeded (if `seedDataCore.navigationSections` in feature.json) | |
986
916
  | ☐ NavigationResources seeded (if `seedDataCore.navigationResources` in feature.json) | |
987
- | ☐ Resource permissions if sub-resources (Level 5) | |
917
+ | ☐ Resource permissions if sub-resources (Level 4) | |
988
918
  | ☐ Bulk Operations permissions created | |
989
919
  | ☐ RolePermissions assigned | |
990
920
  | ☐ Entity SeedData.cs created (if user opted in) | |
@@ -994,28 +924,24 @@ public class {AppPascalName}SeedDataProvider : IClientSeedDataProvider
994
924
 
995
925
  ---
996
926
 
997
- ## PERMISSIONS HIERARCHY (5 Levels)
927
+ ## PERMISSIONS HIERARCHY (4 Levels)
998
928
 
999
929
  ```
1000
- Level 1: CONTEXT
1001
- └─ Path: {context}.*
1002
- └─ E.g.: platform.* → Full context access
1003
-
1004
- Level 2: APPLICATION
1005
- └─ Path: {context}.{application}.*
1006
- └─ E.g.: platform.administration.* → Full app access
930
+ Level 1: APPLICATION
931
+ └─ Path: {application}.*
932
+ └─ E.g.: administration.* → Full app access
1007
933
 
1008
- Level 3: MODULE
1009
- └─ Path: {context}.{application}.{module}.{action}
1010
- └─ E.g.: platform.administration.users.read
934
+ Level 2: MODULE
935
+ └─ Path: {application}.{module}.{action}
936
+ └─ E.g.: administration.users.read
1011
937
 
1012
- Level 4: SECTION
1013
- └─ Path: {context}.{application}.{module}.{section}.{action}
1014
- └─ E.g.: platform.administration.ai.settings.update
938
+ Level 3: SECTION
939
+ └─ Path: {application}.{module}.{section}.{action}
940
+ └─ E.g.: administration.ai.settings.update
1015
941
 
1016
- Level 5: RESOURCE (finest granularity)
1017
- └─ Path: {context}.{application}.{module}.{section}.{resource}.{action}
1018
- └─ E.g.: platform.administration.ai.prompts.blocks.delete
942
+ Level 4: RESOURCE (finest granularity)
943
+ └─ Path: {application}.{module}.{section}.{resource}.{action}
944
+ └─ E.g.: administration.ai.prompts.blocks.delete
1019
945
  ```
1020
946
 
1021
947
  ---