@atlashub/smartstack-cli 3.37.0 → 3.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +16 -24
- package/dist/index.js.map +1 -1
- package/dist/mcp-entry.mjs +235 -265
- package/dist/mcp-entry.mjs.map +1 -1
- package/package.json +1 -1
- package/scripts/extract-api-endpoints.ts +5 -5
- package/scripts/generate-doc-with-mock-ui.ts +10 -17
- package/templates/agents/ba-reader.md +9 -9
- package/templates/agents/ba-writer.md +12 -15
- package/templates/agents/code-reviewer.md +1 -1
- package/templates/agents/docs-context-reader.md +1 -1
- package/templates/agents/efcore/scan.md +3 -1
- package/templates/agents/gitflow/commit.md +74 -0
- package/templates/agents/gitflow/finish.md +5 -2
- package/templates/agents/gitflow/init-clone.md +3 -3
- package/templates/agents/gitflow/init-validate.md +3 -2
- package/templates/agents/gitflow/merge.md +5 -4
- package/templates/agents/gitflow/pr.md +5 -4
- package/templates/agents/gitflow/start.md +37 -5
- package/templates/hooks/hooks.json +11 -0
- package/templates/hooks/wsl-dotnet-cleanup.sh +24 -0
- package/templates/mcp-scaffolding/frontend/nav-routes.ts.hbs +20 -20
- package/templates/mcp-scaffolding/frontend/routes.tsx.hbs +16 -24
- package/templates/mcp-scaffolding/migrations/seed-roles.cs.hbs +2 -2
- package/templates/skills/_resources/mcp-validate-documentation-spec.md +3 -3
- package/templates/skills/_shared.md +15 -17
- package/templates/skills/ai-prompt/SKILL.md +1 -1
- package/templates/skills/ai-prompt/steps/step-00-init.md +47 -0
- package/templates/skills/apex/SKILL.md +3 -4
- package/templates/skills/apex/_shared.md +10 -20
- package/templates/skills/apex/references/analysis-methods.md +141 -0
- package/templates/skills/apex/references/challenge-questions.md +1 -21
- package/templates/skills/apex/references/core-seed-data.md +35 -58
- package/templates/skills/apex/references/examine-build-validation.md +82 -0
- package/templates/skills/apex/references/execution-frontend-gates.md +177 -0
- package/templates/skills/apex/references/execution-frontend-patterns.md +105 -0
- package/templates/skills/apex/references/execution-layer1-rules.md +96 -0
- package/templates/skills/apex/references/initialization-challenge-flow.md +110 -0
- package/templates/skills/apex/references/planning-layer-mapping.md +151 -0
- package/templates/skills/apex/references/post-checks.md +145 -40
- package/templates/skills/apex/references/smartstack-api.md +35 -51
- package/templates/skills/apex/references/smartstack-frontend.md +18 -18
- package/templates/skills/apex/references/smartstack-layers.md +38 -62
- package/templates/skills/apex/steps/step-00-init.md +14 -26
- package/templates/skills/apex/steps/step-01-analyze.md +10 -143
- package/templates/skills/apex/steps/step-02-plan.md +10 -92
- package/templates/skills/apex/steps/step-03-execute.md +45 -252
- package/templates/skills/apex/steps/step-04-examine.md +14 -78
- package/templates/skills/apex/steps/step-05-deep-review.md +2 -2
- package/templates/skills/apex/steps/step-08-run-tests.md +1 -0
- package/templates/skills/application/SKILL.md +241 -242
- package/templates/skills/application/references/backend-controller-hierarchy.md +16 -16
- package/templates/skills/application/references/backend-seeding-and-dto-output.md +83 -0
- package/templates/skills/application/references/backend-table-prefix-mapping.md +79 -0
- package/templates/skills/application/references/backend-verification.md +1 -1
- package/templates/skills/application/references/frontend-i18n-and-output.md +67 -0
- package/templates/skills/application/references/frontend-route-naming.md +117 -0
- package/templates/skills/application/references/frontend-route-wiring-app-tsx.md +107 -0
- package/templates/skills/application/references/frontend-verification.md +12 -12
- package/templates/skills/application/references/init-parameter-detection.md +121 -0
- package/templates/skills/application/references/migration-checklist-troubleshooting.md +100 -0
- package/templates/skills/application/references/nav-fallback-procedure.md +199 -200
- package/templates/skills/application/references/provider-template.md +2 -6
- package/templates/skills/application/references/roles-client-project-handling.md +55 -0
- package/templates/skills/application/references/roles-fallback-procedure.md +149 -0
- package/templates/skills/application/references/test-coverage-requirements.md +213 -0
- package/templates/skills/application/references/test-frontend.md +3 -3
- package/templates/skills/application/steps/step-00-init.md +130 -260
- package/templates/skills/application/steps/step-01-navigation.md +170 -170
- package/templates/skills/application/steps/step-02-permissions.md +196 -196
- package/templates/skills/application/steps/step-03-roles.md +182 -339
- package/templates/skills/application/steps/step-03b-provider.md +133 -134
- package/templates/skills/application/steps/step-04-backend.md +174 -265
- package/templates/skills/application/steps/step-05-frontend.md +18 -144
- package/templates/skills/application/steps/step-06-migration.md +12 -60
- package/templates/skills/application/steps/step-07-tests.md +9 -76
- package/templates/skills/application/templates-backend.md +29 -27
- package/templates/skills/application/templates-frontend.md +49 -49
- package/templates/skills/application/templates-seed.md +57 -131
- package/templates/skills/business-analyse/SKILL.md +27 -30
- package/templates/skills/business-analyse/_architecture.md +6 -6
- package/templates/skills/business-analyse/_shared.md +60 -88
- package/templates/skills/business-analyse/questionnaire/04-data.md +3 -3
- package/templates/skills/business-analyse/questionnaire/06-security.md +1 -1
- package/templates/skills/business-analyse/questionnaire/13-cross-module.md +1 -1
- package/templates/skills/business-analyse/react/application-viewer.md +12 -12
- package/templates/skills/business-analyse/react/components.md +8 -12
- package/templates/skills/business-analyse/react/schema.md +836 -836
- package/templates/skills/business-analyse/references/agent-module-prompt.md +2 -3
- package/templates/skills/business-analyse/references/analysis-semantic-checks.md +190 -0
- package/templates/skills/business-analyse/references/cache-warming-strategy.md +2 -2
- package/templates/skills/business-analyse/references/cadrage-challenge-patterns.md +41 -0
- package/templates/skills/business-analyse/references/cadrage-coverage-matrix.md +74 -0
- package/templates/skills/business-analyse/references/cadrage-shared-modules.md +69 -0
- package/templates/skills/business-analyse/references/cadrage-structure-cards.md +1 -1
- package/templates/skills/business-analyse/references/compilation-structure-cards.md +297 -0
- package/templates/skills/business-analyse/references/consolidation-structural-checks.md +2 -2
- package/templates/skills/business-analyse/references/deploy-modes.md +5 -5
- package/templates/skills/business-analyse/references/detection-strategies.md +7 -7
- package/templates/skills/business-analyse/references/handoff-file-templates.md +14 -22
- package/templates/skills/business-analyse/references/handoff-mappings.md +4 -4
- package/templates/skills/business-analyse/references/handoff-seeddata-generation.md +312 -0
- package/templates/skills/business-analyse/references/init-schema-deployment.md +3 -3
- package/templates/skills/business-analyse/references/naming-conventions.md +22 -24
- package/templates/skills/business-analyse/references/prd-generation.md +2 -2
- package/templates/skills/business-analyse/references/review-data-mapping.md +2 -2
- package/templates/skills/business-analyse/references/robustness-checks.md +1 -1
- package/templates/skills/business-analyse/references/spec-auto-inference.md +3 -3
- package/templates/skills/business-analyse/references/team-orchestration.md +49 -6
- package/templates/skills/business-analyse/references/ui-dashboard-spec.md +1 -1
- package/templates/skills/business-analyse/references/ui-resource-cards.md +18 -18
- package/templates/skills/business-analyse/references/validate-incremental-html.md +2 -2
- package/templates/skills/business-analyse/references/validation-checklist.md +2 -2
- package/templates/skills/business-analyse/schemas/application-schema.json +4 -5
- package/templates/skills/business-analyse/schemas/project-schema.json +1 -6
- package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +2 -3
- package/templates/skills/business-analyse/schemas/sections/specification-schema.json +4 -4
- package/templates/skills/business-analyse/steps/step-00-init.md +8 -17
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +35 -198
- package/templates/skills/business-analyse/steps/step-01b-applications.md +16 -20
- package/templates/skills/business-analyse/steps/step-02-decomposition.md +1 -1
- package/templates/skills/business-analyse/steps/step-03a1-setup.md +4 -4
- package/templates/skills/business-analyse/steps/step-03a2-analysis.md +1 -1
- package/templates/skills/business-analyse/steps/step-03b-ui.md +4 -4
- package/templates/skills/business-analyse/steps/step-03c-compile.md +66 -140
- package/templates/skills/business-analyse/steps/step-03d-validate.md +2 -2
- package/templates/skills/business-analyse/steps/step-04a-collect.md +2 -2
- package/templates/skills/business-analyse/steps/step-04b-analyze.md +42 -160
- package/templates/skills/business-analyse/steps/step-04c-decide.md +1 -1
- package/templates/skills/business-analyse/steps/step-05a-handoff.md +74 -104
- package/templates/skills/business-analyse/steps/step-05b-deploy.md +13 -11
- package/templates/skills/business-analyse/steps/step-06-review.md +3 -3
- package/templates/skills/business-analyse/templates/tpl-frd.md +13 -13
- package/templates/skills/business-analyse/templates/tpl-handoff.md +12 -12
- package/templates/skills/business-analyse/templates/tpl-progress.md +1 -1
- package/templates/skills/business-analyse/templates-frd.md +25 -25
- package/templates/skills/business-analyse/templates-react.md +15 -21
- package/templates/skills/controller/SKILL.md +1 -1
- package/templates/skills/controller/postman-templates.md +1 -1
- package/templates/skills/controller/references/controller-code-templates.md +2 -2
- package/templates/skills/controller/references/mcp-scaffold-workflow.md +209 -0
- package/templates/skills/controller/references/permission-sync-templates.md +13 -16
- package/templates/skills/controller/steps/step-00-init.md +11 -11
- package/templates/skills/controller/steps/step-03-generate.md +64 -103
- package/templates/skills/controller/templates.md +67 -71
- package/templates/skills/debug/SKILL.md +13 -218
- package/templates/skills/debug/steps/step-00-init.md +57 -0
- package/templates/skills/debug/steps/step-01-analyze.md +219 -0
- package/templates/skills/debug/steps/step-02-resolve.md +85 -0
- package/templates/skills/documentation/SKILL.md +49 -345
- package/templates/skills/documentation/data-schema.md +11 -8
- package/templates/skills/documentation/steps/step-00-init.md +70 -0
- package/templates/skills/documentation/steps/step-01-scan.md +113 -0
- package/templates/skills/documentation/steps/step-02-generate.md +231 -0
- package/templates/skills/documentation/steps/step-03-validate.md +238 -0
- package/templates/skills/documentation/templates.md +480 -322
- package/templates/skills/efcore/SKILL.md +1 -1
- package/templates/skills/efcore/references/both-contexts.md +32 -0
- package/templates/skills/efcore/references/database-operations.md +67 -0
- package/templates/skills/efcore/references/destructive-operations.md +38 -0
- package/templates/skills/efcore/references/reset-operations.md +81 -0
- package/templates/skills/efcore/references/seed-methods.md +86 -0
- package/templates/skills/efcore/references/shared-init-functions.md +250 -0
- package/templates/skills/efcore/references/sql-objects-injection.md +61 -0
- package/templates/skills/efcore/references/troubleshooting.md +81 -0
- package/templates/skills/efcore/steps/db/step-deploy.md +1 -32
- package/templates/skills/efcore/steps/db/step-reset.md +7 -103
- package/templates/skills/efcore/steps/db/step-seed.md +10 -132
- package/templates/skills/efcore/steps/db/step-status.md +5 -44
- package/templates/skills/efcore/steps/migration/step-02-create.md +1 -14
- package/templates/skills/efcore/steps/migration/step-03-validate.md +8 -62
- package/templates/skills/efcore/steps/rebase-snapshot/step-03-create.md +1 -57
- package/templates/skills/efcore/steps/shared/step-00-init.md +11 -254
- package/templates/skills/efcore/steps/squash/step-03-create.md +1 -58
- package/templates/skills/feature-full/SKILL.md +1 -1
- package/templates/skills/feature-full/steps/step-00-init.md +57 -0
- package/templates/skills/feature-full/steps/step-01-implementation.md +1 -1
- package/templates/skills/gitflow/SKILL.md +28 -5
- package/templates/skills/gitflow/_shared.md +109 -12
- package/templates/skills/gitflow/phases/abort.md +4 -0
- package/templates/skills/gitflow/phases/cleanup.md +4 -0
- package/templates/skills/gitflow/references/commit-message-generation.md +58 -0
- package/templates/skills/gitflow/references/commit-migration-validation.md +49 -0
- package/templates/skills/gitflow/references/finish-cleanup.md +55 -0
- package/templates/skills/gitflow/references/finish-version-bumping.md +45 -0
- package/templates/skills/gitflow/references/init-environment-detection.md +41 -0
- package/templates/skills/gitflow/references/init-questions.md +185 -0
- package/templates/skills/gitflow/references/init-structure-creation.md +75 -0
- package/templates/skills/gitflow/references/init-version-detection.md +21 -0
- package/templates/skills/gitflow/references/init-workspace-detection.md +43 -0
- package/templates/skills/gitflow/references/merge-ci-status.md +36 -0
- package/templates/skills/gitflow/references/merge-execution.md +62 -0
- package/templates/skills/gitflow/references/merge-pr-context.md +76 -0
- package/templates/skills/gitflow/references/pr-build-checks.md +60 -0
- package/templates/skills/gitflow/references/pr-generation.md +58 -0
- package/templates/skills/gitflow/references/start-branch-normalization.md +28 -0
- package/templates/skills/gitflow/references/start-worktree-creation.md +50 -0
- package/templates/skills/gitflow/references/sync-push-verify.md +44 -0
- package/templates/skills/gitflow/references/sync-rebase-conflicts.md +38 -0
- package/templates/skills/gitflow/steps/step-commit.md +12 -91
- package/templates/skills/gitflow/steps/step-finish.md +15 -159
- package/templates/skills/gitflow/steps/step-init.md +24 -326
- package/templates/skills/gitflow/steps/step-merge.md +17 -176
- package/templates/skills/gitflow/steps/step-pr.md +10 -116
- package/templates/skills/gitflow/steps/step-start.md +16 -109
- package/templates/skills/gitflow/steps/step-sync.md +6 -69
- package/templates/skills/ralph-loop/SKILL.md +6 -0
- package/templates/skills/ralph-loop/references/category-completeness.md +185 -0
- package/templates/skills/ralph-loop/references/compact-loop.md +1 -1
- package/templates/skills/ralph-loop/references/init-resume-recovery.md +127 -0
- package/templates/skills/ralph-loop/references/module-transition.md +151 -0
- package/templates/skills/ralph-loop/references/multi-module-queue.md +171 -0
- package/templates/skills/ralph-loop/references/parallel-execution.md +246 -0
- package/templates/skills/ralph-loop/references/task-transform-legacy.md +6 -9
- package/templates/skills/ralph-loop/references/team-orchestration.md +45 -3
- package/templates/skills/ralph-loop/steps/step-00-init.md +36 -109
- package/templates/skills/ralph-loop/steps/step-01-task.md +15 -163
- package/templates/skills/ralph-loop/steps/step-02-execute.md +8 -154
- package/templates/skills/ralph-loop/steps/step-04-check.md +20 -73
- package/templates/skills/review-code/references/owasp-api-top10.md +5 -5
- package/templates/skills/review-code/references/smartstack-conventions.md +568 -568
- package/templates/skills/validate-feature/references/api-smoke-tests.md +140 -0
- package/templates/skills/validate-feature/references/db-validation-checks.md +180 -0
- package/templates/skills/validate-feature/steps/step-01-compile.md +1 -3
- package/templates/skills/validate-feature/steps/step-04-api-smoke.md +34 -145
- package/templates/skills/validate-feature/steps/step-05-db-validation.md +74 -260
- package/templates/skills/workflow/SKILL.md +1 -1
- package/templates/skills/workflow/steps/step-00-init.md +57 -0
|
@@ -1,242 +1,241 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: application
|
|
3
|
-
description: |
|
|
4
|
-
Creates SmartStack full-stack applications/modules.
|
|
5
|
-
Use this skill when:
|
|
6
|
-
- User asks to create an application
|
|
7
|
-
- User mentions "new module", "new application", "add a feature"
|
|
8
|
-
- User wants to extend navigation with new entries
|
|
9
|
-
Scope:
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Skill Application SmartStack
|
|
13
|
-
|
|
14
|
-
**Reference:** [_shared.md](../_shared.md) for architecture, permissions, i18n
|
|
15
|
-
|
|
16
|
-
## ENTRY POINT
|
|
17
|
-
|
|
18
|
-
> **FIRST ACTION:** Load `steps/step-00-init.md`
|
|
19
|
-
|
|
20
|
-
This skill uses progressive step loading. Each step calls MCP tools for generation.
|
|
21
|
-
|
|
22
|
-
## STEP FILES
|
|
23
|
-
|
|
24
|
-
| Step | File | MCP Tool Called | Condition |
|
|
25
|
-
|------|------|-----------------|-----------|
|
|
26
|
-
| 00 | `steps/step-00-init.md` | `validate_conventions` (MCP check) | Always |
|
|
27
|
-
| 01 | `steps/step-01-navigation.md` | `scaffold_navigation` | Always |
|
|
28
|
-
| 02 | `steps/step-02-permissions.md` | `generate_permissions` | Always |
|
|
29
|
-
| 03 | `steps/step-03-roles.md` | `scaffold_role_permissions` | Always |
|
|
30
|
-
| 03b | `steps/step-03b-provider.md` | (none - direct generation) | Client projects only |
|
|
31
|
-
| 04 | `steps/step-04-backend.md` | `scaffold_extension` | Always |
|
|
32
|
-
| 05 | `steps/step-05-frontend.md` | `scaffold_api_client`, `scaffold_routes` | Always |
|
|
33
|
-
| 06 | `steps/step-06-migration.md` | `suggest_migration` | Always |
|
|
34
|
-
| 07 | `steps/step-07-tests.md` | `scaffold_tests` | Always |
|
|
35
|
-
| 08 | `steps/step-08-documentation.md` | `/documentation` skill | If userDocRequired |
|
|
36
|
-
|
|
37
|
-
## MCP INTEGRATION
|
|
38
|
-
|
|
39
|
-
> **CRITICAL:** This skill MUST use MCP tools for all generation.
|
|
40
|
-
> Templates in this folder are for REFERENCE ONLY - never use them directly.
|
|
41
|
-
|
|
42
|
-
| MCP Tool | Purpose |
|
|
43
|
-
|----------|---------|
|
|
44
|
-
| `mcp__smartstack__scaffold_navigation` | Navigation entity + translations |
|
|
45
|
-
| `mcp__smartstack__generate_permissions` | Permissions.cs + HasData |
|
|
46
|
-
| `mcp__smartstack__scaffold_role_permissions` | Role-permission mappings |
|
|
47
|
-
| `mcp__smartstack__scaffold_extension` | Entity, Service, Controller, DTOs |
|
|
48
|
-
| `mcp__smartstack__scaffold_api_client` | TypeScript API client |
|
|
49
|
-
| `mcp__smartstack__scaffold_routes` | React Router configuration |
|
|
50
|
-
| `mcp__smartstack__suggest_migration` | Migration name suggestion |
|
|
51
|
-
| `mcp__smartstack__scaffold_tests` | Test suite generation (backend) |
|
|
52
|
-
| `mcp__smartstack__scaffold_frontend_tests` | Test suite generation (frontend React) |
|
|
53
|
-
| `mcp__smartstack__validate_conventions` | Post-generation convention check |
|
|
54
|
-
| `mcp__smartstack__review_code` | Code quality audit |
|
|
55
|
-
|
|
56
|
-
## WHEN THIS SKILL ACTIVATES
|
|
57
|
-
|
|
58
|
-
| Trigger | Example |
|
|
59
|
-
|---------|---------|
|
|
60
|
-
| Explicit request | "Create a module to manage products" |
|
|
61
|
-
| New feature | "We need to add order management" |
|
|
62
|
-
| Navigation extension | "Add a CRM application
|
|
63
|
-
| Keywords | "new module", "new application"
|
|
64
|
-
|
|
65
|
-
## FLOW ARCHITECTURE
|
|
66
|
-
|
|
67
|
-
```
|
|
68
|
-
WEB (React) → API (.NET) → Application → Infrastructure → Database
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
**FORBIDDEN:** WEB → Infrastructure (direct DB access), WEB → Domain
|
|
72
|
-
|
|
73
|
-
## WORKFLOW
|
|
74
|
-
|
|
75
|
-
### 1. Level Detection
|
|
76
|
-
|
|
77
|
-
| Hint | → Level |
|
|
78
|
-
|------|---------|
|
|
79
|
-
| "
|
|
80
|
-
| "
|
|
81
|
-
| "
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
- `/
|
|
114
|
-
- `/
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
|
122
|
-
|
|
|
123
|
-
|
|
|
124
|
-
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
<Route
|
|
143
|
-
<Route
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
<Route path="$APPLICATION" element={
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
| `/
|
|
157
|
-
| `/
|
|
158
|
-
| `/
|
|
159
|
-
| `/
|
|
160
|
-
| `/
|
|
161
|
-
| `/
|
|
162
|
-
| `/
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
["
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
|
186
|
-
|
|
|
187
|
-
|
|
|
188
|
-
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
| Creating `.
|
|
198
|
-
| Creating
|
|
199
|
-
|
|
|
200
|
-
|
|
|
201
|
-
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
- To find
|
|
206
|
-
- To find
|
|
207
|
-
- To find
|
|
208
|
-
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
- [steps/step-
|
|
215
|
-
- [steps/step-
|
|
216
|
-
- [steps/step-
|
|
217
|
-
- [steps/step-
|
|
218
|
-
- [steps/step-
|
|
219
|
-
- [steps/step-
|
|
220
|
-
- [steps/step-
|
|
221
|
-
- [steps/step-
|
|
222
|
-
- [steps/step-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
>
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
- [templates-
|
|
230
|
-
- [templates-
|
|
231
|
-
- [templates-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
-
|
|
236
|
-
-
|
|
237
|
-
-
|
|
238
|
-
-
|
|
239
|
-
-
|
|
240
|
-
-
|
|
241
|
-
|
|
242
|
-
</success_criteria>
|
|
1
|
+
---
|
|
2
|
+
name: application
|
|
3
|
+
description: |
|
|
4
|
+
Creates SmartStack full-stack applications/modules.
|
|
5
|
+
Use this skill when:
|
|
6
|
+
- User asks to create an application or module
|
|
7
|
+
- User mentions "new module", "new application", "add a feature"
|
|
8
|
+
- User wants to extend navigation with new entries
|
|
9
|
+
Scope: Application → Module → Section → Resource (all levels)
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Skill Application SmartStack
|
|
13
|
+
|
|
14
|
+
**Reference:** [_shared.md](../_shared.md) for architecture, permissions, i18n
|
|
15
|
+
|
|
16
|
+
## ENTRY POINT
|
|
17
|
+
|
|
18
|
+
> **FIRST ACTION:** Load `steps/step-00-init.md`
|
|
19
|
+
|
|
20
|
+
This skill uses progressive step loading. Each step calls MCP tools for generation.
|
|
21
|
+
|
|
22
|
+
## STEP FILES
|
|
23
|
+
|
|
24
|
+
| Step | File | MCP Tool Called | Condition |
|
|
25
|
+
|------|------|-----------------|-----------|
|
|
26
|
+
| 00 | `steps/step-00-init.md` | `validate_conventions` (MCP check) | Always |
|
|
27
|
+
| 01 | `steps/step-01-navigation.md` | `scaffold_navigation` | Always |
|
|
28
|
+
| 02 | `steps/step-02-permissions.md` | `generate_permissions` | Always |
|
|
29
|
+
| 03 | `steps/step-03-roles.md` | `scaffold_role_permissions` | Always |
|
|
30
|
+
| 03b | `steps/step-03b-provider.md` | (none - direct generation) | Client projects only |
|
|
31
|
+
| 04 | `steps/step-04-backend.md` | `scaffold_extension` | Always |
|
|
32
|
+
| 05 | `steps/step-05-frontend.md` | `scaffold_api_client`, `scaffold_routes` | Always |
|
|
33
|
+
| 06 | `steps/step-06-migration.md` | `suggest_migration` | Always |
|
|
34
|
+
| 07 | `steps/step-07-tests.md` | `scaffold_tests` | Always |
|
|
35
|
+
| 08 | `steps/step-08-documentation.md` | `/documentation` skill | If userDocRequired |
|
|
36
|
+
|
|
37
|
+
## MCP INTEGRATION
|
|
38
|
+
|
|
39
|
+
> **CRITICAL:** This skill MUST use MCP tools for all generation.
|
|
40
|
+
> Templates in this folder are for REFERENCE ONLY - never use them directly.
|
|
41
|
+
|
|
42
|
+
| MCP Tool | Purpose |
|
|
43
|
+
|----------|---------|
|
|
44
|
+
| `mcp__smartstack__scaffold_navigation` | Navigation entity + translations |
|
|
45
|
+
| `mcp__smartstack__generate_permissions` | Permissions.cs + HasData |
|
|
46
|
+
| `mcp__smartstack__scaffold_role_permissions` | Role-permission mappings |
|
|
47
|
+
| `mcp__smartstack__scaffold_extension` | Entity, Service, Controller, DTOs |
|
|
48
|
+
| `mcp__smartstack__scaffold_api_client` | TypeScript API client |
|
|
49
|
+
| `mcp__smartstack__scaffold_routes` | React Router configuration |
|
|
50
|
+
| `mcp__smartstack__suggest_migration` | Migration name suggestion |
|
|
51
|
+
| `mcp__smartstack__scaffold_tests` | Test suite generation (backend) |
|
|
52
|
+
| `mcp__smartstack__scaffold_frontend_tests` | Test suite generation (frontend React) |
|
|
53
|
+
| `mcp__smartstack__validate_conventions` | Post-generation convention check |
|
|
54
|
+
| `mcp__smartstack__review_code` | Code quality audit |
|
|
55
|
+
|
|
56
|
+
## WHEN THIS SKILL ACTIVATES
|
|
57
|
+
|
|
58
|
+
| Trigger | Example |
|
|
59
|
+
|---------|---------|
|
|
60
|
+
| Explicit request | "Create a module to manage products" |
|
|
61
|
+
| New feature | "We need to add order management" |
|
|
62
|
+
| Navigation extension | "Add a CRM application" |
|
|
63
|
+
| Keywords | "new module", "new application" |
|
|
64
|
+
|
|
65
|
+
## FLOW ARCHITECTURE
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
WEB (React) → API (.NET) → Application → Infrastructure → Database
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**FORBIDDEN:** WEB → Infrastructure (direct DB access), WEB → Domain
|
|
72
|
+
|
|
73
|
+
## WORKFLOW
|
|
74
|
+
|
|
75
|
+
### 1. Level Detection
|
|
76
|
+
|
|
77
|
+
| Hint | → Level |
|
|
78
|
+
|------|---------|
|
|
79
|
+
| "application", "app" | Application |
|
|
80
|
+
| "module", "feature" | Module |
|
|
81
|
+
| "section", "tab" | Section |
|
|
82
|
+
|
|
83
|
+
### 2. Parameter Extraction
|
|
84
|
+
`$LEVEL`, `$CODE` (kebab-case), `$LABEL_EN`, `$ICON` (Lucide)
|
|
85
|
+
|
|
86
|
+
### 3. Full-Stack Generation
|
|
87
|
+
```
|
|
88
|
+
1. DB SEED (Navigation + Translations 4 languages)
|
|
89
|
+
2. PERMISSIONS (Permissions.cs + PermissionConfiguration.cs) ← 2 files!
|
|
90
|
+
3. ROLES (RolePermission mappings)
|
|
91
|
+
3b. CLIENT SEED PROVIDER (client projects only - IClientSeedDataProvider)
|
|
92
|
+
4. API (Controller + DTOs via /controller:create)
|
|
93
|
+
4b. VALIDATE (/validate - convention check on generated backend)
|
|
94
|
+
5. SERVICES (Interface + Implementation)
|
|
95
|
+
6. FRONTEND (Page + Components + Hooks)
|
|
96
|
+
7. I18N (fr, en, it, de)
|
|
97
|
+
8. ROUTES (nested routes mandatory)
|
|
98
|
+
9. PREFERENCES (Hook pattern)
|
|
99
|
+
10. MIGRATION (/efcore:migration)
|
|
100
|
+
11. TESTS - Backend (scaffold_tests - 7 categories including real integration)
|
|
101
|
+
12. TESTS - Frontend (scaffold_frontend_tests - Vitest + Testing Library + MSW)
|
|
102
|
+
13. REVIEW (/review-code - security + architecture + quality audit)
|
|
103
|
+
14. DOCUMENTATION (in-app user doc via /documentation - if userDocRequired)
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### 3b. Client Seed Provider (client projects only)
|
|
107
|
+
Generates `IClientSeedDataProvider` implementation that wires navigation + permissions + roles
|
|
108
|
+
into the SmartStack Core seeding pipeline. Only runs when `{seeding_strategy}` = "provider".
|
|
109
|
+
Core projects skip this step entirely.
|
|
110
|
+
|
|
111
|
+
### 4. Automatic Chaining
|
|
112
|
+
- `/controller:create` → API Controllers
|
|
113
|
+
- `/efcore:migration` → DB Migrations
|
|
114
|
+
- `/ui-components` → EntityCard, DataTable
|
|
115
|
+
|
|
116
|
+
## USER PREFERENCES
|
|
117
|
+
|
|
118
|
+
| Preference | Storage |
|
|
119
|
+
|------------|---------|
|
|
120
|
+
| pageSize | `user.preferences.{module}.pageSize` |
|
|
121
|
+
| sortColumn/Direction | `user.preferences.{module}.sort*` |
|
|
122
|
+
| filters | `user.preferences.{module}.filters` |
|
|
123
|
+
| visibleColumns | `user.preferences.{module}.visibleColumns` |
|
|
124
|
+
| viewMode | `user.preferences.{module}.viewMode` |
|
|
125
|
+
|
|
126
|
+
```typescript
|
|
127
|
+
export function use{Module}Preferences() {
|
|
128
|
+
const { preferences, updatePreference } = useUserPreferences();
|
|
129
|
+
return {
|
|
130
|
+
pageSize: preferences.{module}?.pageSize ?? 10,
|
|
131
|
+
setPageSize: (size: number) => updatePreference('{module}.pageSize', size),
|
|
132
|
+
// ... others
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## ROUTING (React Router v7)
|
|
138
|
+
|
|
139
|
+
```tsx
|
|
140
|
+
// ✅ CORRECT - Nested routes
|
|
141
|
+
<Route path="$APPLICATION">
|
|
142
|
+
<Route index element={<Navigate to="$DEFAULT_MODULE" replace />} />
|
|
143
|
+
<Route path="$MODULE1" element={<Module1Page />} />
|
|
144
|
+
</Route>
|
|
145
|
+
|
|
146
|
+
// ❌ FORBIDDEN - Flat routes (cause redirect to Home)
|
|
147
|
+
<Route path="$APPLICATION" element={<Navigate ... />} />
|
|
148
|
+
<Route path="$APPLICATION/$MODULE1" element={...} />
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## INTEGRATIONS
|
|
152
|
+
|
|
153
|
+
| Skill | When | Action |
|
|
154
|
+
|-------|------|--------|
|
|
155
|
+
| `/notification` | User alerts | INotificationService + SignalR |
|
|
156
|
+
| `/workflow` | Automated emails | IWorkflowService.TriggerAsync |
|
|
157
|
+
| `/ai-prompt` | AI assistance | IAiCompletionService |
|
|
158
|
+
| `/feature-full` | Complete feature | Orchestration all skills |
|
|
159
|
+
| `/validate` | After step-04 (backend) | MCP `validate_conventions` on generated code |
|
|
160
|
+
| `/review-code` | After step-07 (tests) | Security (OWASP), architecture, SOLID, performance audit |
|
|
161
|
+
| `/validate-feature` | After step-07 (tests) | Compile + test + API smoke test |
|
|
162
|
+
| `/documentation` | In-app user doc | Documentation page via doc-data.ts + DocRenderer |
|
|
163
|
+
|
|
164
|
+
### Notification Integration Pattern
|
|
165
|
+
```csharp
|
|
166
|
+
await _notificationService.SendNotificationAsync(
|
|
167
|
+
userId, NotificationType.{Entity}Created, title, message,
|
|
168
|
+
relatedEntityType: nameof({Entity}), relatedEntityId: entity.Id);
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Workflow Integration Pattern
|
|
172
|
+
```csharp
|
|
173
|
+
await _workflowService.TriggerAsync("{entity}.created", new Dictionary<string, object>
|
|
174
|
+
{
|
|
175
|
+
["entityId"] = entity.Id,
|
|
176
|
+
["creatorEmail"] = _currentUser.Email
|
|
177
|
+
});
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## ABSOLUTE RULES
|
|
181
|
+
|
|
182
|
+
| DO | DON'T |
|
|
183
|
+
|----|-------|
|
|
184
|
+
| 4 languages (FR, EN, IT, DE) | Import Infrastructure in frontend |
|
|
185
|
+
| Permissions: 2 files | Direct SQL in frontend |
|
|
186
|
+
| Nested routes | Flat routes (flat siblings) |
|
|
187
|
+
| EntityCard for cards | Manual cards with divs |
|
|
188
|
+
| DataTable for tables | Sequential GUIDs |
|
|
189
|
+
|
|
190
|
+
### FORBIDDEN ACTIONS (BLOCKING)
|
|
191
|
+
|
|
192
|
+
> **NEVER create temporary files, scripts, or helper files of any kind.**
|
|
193
|
+
|
|
194
|
+
| FORBIDDEN | USE INSTEAD |
|
|
195
|
+
|-----------|-------------|
|
|
196
|
+
| Creating `.ps1` scripts | `Grep` tool to search `.cs` files |
|
|
197
|
+
| Creating `.sh` / `.bat` scripts | `Glob` tool to find files by pattern |
|
|
198
|
+
| Creating `temp-*` files | `Read` tool to inspect file contents |
|
|
199
|
+
| Scanning DLLs / assemblies | Search source `.cs` files directly |
|
|
200
|
+
| Running `dotnet` reflection commands | MCP `validate_conventions` tool |
|
|
201
|
+
| Any file not part of the final deliverable | Ask the user if information is missing |
|
|
202
|
+
|
|
203
|
+
**Type Discovery Rules:**
|
|
204
|
+
- To find base classes: `Grep` for `class BaseEntity` or `class {Name}` in `*.cs` files
|
|
205
|
+
- To find existing services: `Glob` for `**/I*Service.cs` in the Application layer
|
|
206
|
+
- To find NuGet packages: `Read` the `.csproj` files directly
|
|
207
|
+
- To find existing entities: `Glob` for `**/*.cs` in the Domain layer
|
|
208
|
+
- If a type cannot be found after 2 search attempts: **ASK the user**, do NOT create scripts
|
|
209
|
+
|
|
210
|
+
## ASSOCIATED FILES
|
|
211
|
+
|
|
212
|
+
### Step Files (ACTIVE - Use These)
|
|
213
|
+
- [steps/step-00-init.md](steps/step-00-init.md) - Initialize parameters
|
|
214
|
+
- [steps/step-01-navigation.md](steps/step-01-navigation.md) - Generate navigation
|
|
215
|
+
- [steps/step-02-permissions.md](steps/step-02-permissions.md) - Generate permissions
|
|
216
|
+
- [steps/step-03-roles.md](steps/step-03-roles.md) - Assign roles
|
|
217
|
+
- [steps/step-03b-provider.md](steps/step-03b-provider.md) - Client seed provider (client projects only)
|
|
218
|
+
- [steps/step-04-backend.md](steps/step-04-backend.md) - Generate backend
|
|
219
|
+
- [steps/step-05-frontend.md](steps/step-05-frontend.md) - Generate frontend
|
|
220
|
+
- [steps/step-06-migration.md](steps/step-06-migration.md) - Create migration
|
|
221
|
+
- [steps/step-07-tests.md](steps/step-07-tests.md) - Generate test suite
|
|
222
|
+
- [steps/step-08-documentation.md](steps/step-08-documentation.md) - Generate in-app documentation
|
|
223
|
+
|
|
224
|
+
### Templates (REFERENCE ONLY - Do Not Use Directly)
|
|
225
|
+
> These templates are kept for documentation purposes.
|
|
226
|
+
> All generation is done via MCP tools in step files.
|
|
227
|
+
|
|
228
|
+
- [templates-backend.md](templates-backend.md) - Backend patterns reference
|
|
229
|
+
- [templates-frontend.md](templates-frontend.md) - Frontend patterns reference
|
|
230
|
+
- [templates-i18n.md](templates-i18n.md) - i18n structure reference
|
|
231
|
+
- [templates-seed.md](templates-seed.md) - Seed data patterns reference
|
|
232
|
+
|
|
233
|
+
<success_criteria>
|
|
234
|
+
- Navigation entries created with correct hierarchy (Application/Module)
|
|
235
|
+
- Permissions generated via MCP with 2-file pattern (constants + seed)
|
|
236
|
+
- Roles assigned with appropriate permission sets
|
|
237
|
+
- Backend layers follow SmartStack conventions (validated by MCP)
|
|
238
|
+
- Frontend pages in correct path structure with i18n
|
|
239
|
+
- EF Core migration created and applied successfully
|
|
240
|
+
- Test suite generated and passing
|
|
241
|
+
</success_criteria>
|
|
@@ -6,32 +6,32 @@
|
|
|
6
6
|
|
|
7
7
|
## Controller File Location
|
|
8
8
|
|
|
9
|
-
Controllers are organized by **
|
|
9
|
+
Controllers are organized by **application** (matching SmartStack.app pattern):
|
|
10
10
|
|
|
11
11
|
```
|
|
12
12
|
Api/Controllers/
|
|
13
|
-
├──
|
|
14
|
-
│ ├── {
|
|
13
|
+
├── Administration/ ← administration.*
|
|
14
|
+
│ ├── {Module}/ ← Module sub-folder (e.g., AI/, Communications/, Tenants/)
|
|
15
15
|
│ │ └── {EntityName}Controller.cs
|
|
16
|
-
│ └── {EntityName}Controller.cs ← Direct controllers (no
|
|
17
|
-
├──
|
|
16
|
+
│ └── {EntityName}Controller.cs ← Direct controllers (no module sub-folder)
|
|
17
|
+
├── Support/ ← support.*
|
|
18
18
|
│ └── {EntityName}Controller.cs
|
|
19
|
-
├──
|
|
19
|
+
├── {ApplicationPascal}/ ← Other applications (e.g., Sales/, HumanResources/)
|
|
20
20
|
│ └── {EntityName}Controller.cs
|
|
21
|
-
├──
|
|
21
|
+
├── MySpace/ ← myspace.*
|
|
22
22
|
│ └── {EntityName}Controller.cs
|
|
23
23
|
└── {SharedControllers}.cs ← Root-level (Auth, Config, Navigation, etc.)
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
##
|
|
26
|
+
## Application-to-Folder Mapping
|
|
27
27
|
|
|
28
|
-
| NavRoute
|
|
28
|
+
| NavRoute Application | Controller Folder | Example |
|
|
29
29
|
|-----------------|-------------------|---------|
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
30
|
+
| `administration` | `Administration` | `Controllers/Administration/TenantsController.cs` |
|
|
31
|
+
| `administration.{module}` | `Administration/{Module}` | `Controllers/Administration/AI/AiPromptsController.cs` |
|
|
32
|
+
| `support` | `Support` | `Controllers/Support/TicketsController.cs` |
|
|
33
|
+
| `{application}` | `{ApplicationPascal}` | `Controllers/Sales/ProductsController.cs` |
|
|
34
|
+
| `myspace` | `MySpace` | `Controllers/MySpace/PreferencesController.cs` |
|
|
35
35
|
|
|
36
36
|
## Controller Attributes
|
|
37
37
|
|
|
@@ -44,7 +44,7 @@ The generated controller uses NavRoute attribute:
|
|
|
44
44
|
public class {EntityName}Controller : ControllerBase
|
|
45
45
|
{
|
|
46
46
|
[HttpGet]
|
|
47
|
-
[RequirePermission(Permissions.{
|
|
47
|
+
[RequirePermission(Permissions.{Application}.{Module}.Read)]
|
|
48
48
|
public async Task<ActionResult<IEnumerable<{EntityName}Dto>>> GetAll() { ... }
|
|
49
49
|
|
|
50
50
|
// ... other CRUD methods
|
|
@@ -55,4 +55,4 @@ This ensures:
|
|
|
55
55
|
- API route is derived from navigation path
|
|
56
56
|
- Permissions use the constants from Permissions.cs
|
|
57
57
|
- Frontend can discover API path from NavRoute registry
|
|
58
|
-
- Controller file is in the correct
|
|
58
|
+
- Controller file is in the correct application folder
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Backend Generation: Entity Seeding & Output Formatting
|
|
2
|
+
|
|
3
|
+
> Referenced from `steps/step-04-backend.md` — Optional seeding and MCP response handling.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Entity Seeding (Optional)
|
|
8
|
+
|
|
9
|
+
Ask the user if they want to seed initial data for the entity:
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
questions:
|
|
13
|
+
- header: "Seed Data"
|
|
14
|
+
question: "Would you like to generate initial seed data for {EntityName}?"
|
|
15
|
+
options:
|
|
16
|
+
- label: "Yes - Generate SeedData provider"
|
|
17
|
+
description: "Creates {EntityName}SeedData.cs + registers in DevDataSeeder (same pattern as core)"
|
|
18
|
+
- label: "No - Skip seeding"
|
|
19
|
+
description: "Entity starts empty (can add seed data later)"
|
|
20
|
+
multiSelect: false
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**If user selects YES:**
|
|
24
|
+
|
|
25
|
+
See [references/backend-entity-seeding.md](../references/backend-entity-seeding.md) for the full seeding pattern:
|
|
26
|
+
1. **SeedData file** (`{EntityName}SeedData.cs`) — static class with deterministic GUIDs, 3-5 samples
|
|
27
|
+
2. **DevDataSeeder update** — add `Seed{EntityName}sAsync()` method with idempotent check
|
|
28
|
+
|
|
29
|
+
**If user selects NO:**
|
|
30
|
+
|
|
31
|
+
Skip this section and proceed to storing entity info.
|
|
32
|
+
|
|
33
|
+
```markdown
|
|
34
|
+
> Skipping entity seed data. You can generate it later using the SeedData provider pattern
|
|
35
|
+
> documented in templates-seed.md.
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Presenting Output to User
|
|
41
|
+
|
|
42
|
+
Display generated backend code organized by layer:
|
|
43
|
+
|
|
44
|
+
### Domain Layer
|
|
45
|
+
- `Domain/{Application}/{Module}/{EntityName}.cs`
|
|
46
|
+
|
|
47
|
+
### Infrastructure Layer
|
|
48
|
+
- `Persistence/Configurations/{Application}/{Module}/{EntityName}Configuration.cs`
|
|
49
|
+
- `Services/{Application}/{Module}/{EntityName}Service.cs`
|
|
50
|
+
|
|
51
|
+
### Application Layer
|
|
52
|
+
- `Common/Interfaces/I{EntityName}Service.cs`
|
|
53
|
+
- `{Application}/{Module}/DTOs/{EntityName}ResponseDto.cs`
|
|
54
|
+
- `{Application}/{Module}/DTOs/Create{EntityName}Dto.cs`
|
|
55
|
+
- `{Application}/{Module}/DTOs/Update{EntityName}Dto.cs`
|
|
56
|
+
|
|
57
|
+
### API Layer
|
|
58
|
+
- `Controllers/{controller_folder}/{Application}/{EntityName}Controller.cs`
|
|
59
|
+
- NavRoute: `{full_path}`
|
|
60
|
+
- Endpoints:
|
|
61
|
+
- GET /api/{code} - List all
|
|
62
|
+
- GET /api/{code}/{id} - Get by ID
|
|
63
|
+
- POST /api/{code} - Create
|
|
64
|
+
- PUT /api/{code}/{id} - Update
|
|
65
|
+
- DELETE /api/{code}/{id} - Delete
|
|
66
|
+
|
|
67
|
+
### Next Steps
|
|
68
|
+
1. Add DbSet to ICoreDbContext: `public DbSet<{EntityName}> {EntityName}s => Set<{EntityName}>();`
|
|
69
|
+
2. Register service in DI: `services.AddScoped<I{EntityName}Service, {EntityName}Service>();`
|
|
70
|
+
3. Run: `dotnet ef migrations add core_vX.X.X_XXX_Add{EntityName}`
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Entity Info Storage
|
|
75
|
+
|
|
76
|
+
Store for use in frontend generation:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
{entity_name} = "{EntityName}"
|
|
80
|
+
{entity_code} = "{code}"
|
|
81
|
+
{api_route} = "/api/{code}"
|
|
82
|
+
{has_seed_data} = true/false // Whether SeedData provider was generated
|
|
83
|
+
```
|