@atlashub/smartstack-cli 3.38.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/mcp-entry.mjs +62 -37
- package/dist/mcp-entry.mjs.map +1 -1
- package/package.json +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 -0
- package/templates/agents/gitflow/pr.md +5 -0
- package/templates/agents/gitflow/start.md +8 -1
- package/templates/hooks/hooks.json +11 -0
- package/templates/hooks/wsl-dotnet-cleanup.sh +24 -0
- package/templates/skills/apex/references/core-seed-data.md +0 -1
- package/templates/skills/apex/references/examine-build-validation.md +1 -6
- package/templates/skills/apex/references/smartstack-frontend.md +1 -1
- package/templates/skills/apex/steps/step-03-execute.md +4 -9
- package/templates/skills/apex/steps/step-08-run-tests.md +1 -2
- package/templates/skills/application/SKILL.md +241 -241
- package/templates/skills/application/references/frontend-route-wiring-app-tsx.md +5 -5
- package/templates/skills/application/references/frontend-verification.md +1 -1
- package/templates/skills/application/references/init-parameter-detection.md +121 -120
- package/templates/skills/application/references/migration-checklist-troubleshooting.md +100 -100
- package/templates/skills/application/references/nav-fallback-procedure.md +199 -199
- package/templates/skills/application/steps/step-00-init.md +130 -130
- 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 -182
- package/templates/skills/application/steps/step-03b-provider.md +133 -133
- package/templates/skills/application/steps/step-04-backend.md +174 -174
- package/templates/skills/application/steps/step-05-frontend.md +1 -1
- package/templates/skills/application/templates-frontend.md +7 -7
- package/templates/skills/business-analyse/react/schema.md +836 -836
- package/templates/skills/business-analyse/templates/tpl-progress.md +1 -1
- package/templates/skills/business-analyse/templates-frd.md +1 -1
- package/templates/skills/efcore/SKILL.md +1 -1
- package/templates/skills/efcore/steps/migration/step-02-create.md +1 -14
- package/templates/skills/gitflow/SKILL.md +27 -4
- package/templates/skills/gitflow/_shared.md +86 -12
- package/templates/skills/gitflow/phases/abort.md +4 -0
- package/templates/skills/gitflow/phases/cleanup.md +4 -0
- package/templates/skills/gitflow/references/finish-cleanup.md +4 -0
- package/templates/skills/gitflow/references/init-structure-creation.md +4 -0
- package/templates/skills/gitflow/references/start-worktree-creation.md +1 -1
- package/templates/skills/ralph-loop/steps/step-04-check.md +1 -2
- package/templates/skills/review-code/references/smartstack-conventions.md +568 -568
- package/templates/skills/validate-feature/steps/step-01-compile.md +1 -6
|
@@ -1,174 +1,174 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: step-04-backend
|
|
3
|
-
description: Generate backend code using MCP scaffold_extension
|
|
4
|
-
prev_step: steps/step-03-roles.md
|
|
5
|
-
next_step: steps/step-05-frontend.md
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Step 4: Backend Generation
|
|
9
|
-
|
|
10
|
-
## MANDATORY EXECUTION RULES
|
|
11
|
-
|
|
12
|
-
- ALWAYS use MCP `scaffold_extension` tool - NEVER use templates
|
|
13
|
-
- ALWAYS generate Entity + Service + Controller as a unit
|
|
14
|
-
- NEVER skip controller generation - API is required
|
|
15
|
-
- YOU ARE AN ORCHESTRATOR calling MCP, not a generator
|
|
16
|
-
- **NEVER use Write on appsettings*.json** - ALWAYS use Edit (see _resources/config-safety.md)
|
|
17
|
-
- **Replace secret VALUES with `<CONFIGURE_HERE>`** - NEVER delete keys or sections
|
|
18
|
-
|
|
19
|
-
## YOUR TASK
|
|
20
|
-
|
|
21
|
-
Call the SmartStack MCP `scaffold_extension` tool with type "feature" to generate:
|
|
22
|
-
1. Domain Entity with EF Configuration
|
|
23
|
-
2. Application Service (Interface + Implementation)
|
|
24
|
-
3. API Controller with NavRoute attribute
|
|
25
|
-
4. DTOs (Response, Create, Update)
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## AVAILABLE STATE
|
|
30
|
-
|
|
31
|
-
From previous steps:
|
|
32
|
-
|
|
33
|
-
| Variable | Description |
|
|
34
|
-
|----------|-------------|
|
|
35
|
-
| `{level}` | application, module, or
|
|
36
|
-
| `{code}` | kebab-case identifier |
|
|
37
|
-
| `{full_path}` | Complete navigation path (navRoute) |
|
|
38
|
-
| `{labels}` | Object with fr, en, it, de |
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
## EXECUTION SEQUENCE
|
|
43
|
-
|
|
44
|
-
### 1. Derive Entity Name
|
|
45
|
-
|
|
46
|
-
Convert `{code}` to PascalCase for entity name:
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
code: "products" → entityName: "Product"
|
|
50
|
-
code: "order-items" → entityName: "OrderItem"
|
|
51
|
-
code: "user-profiles" → entityName: "UserProfile"
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### 2. Determine Table Prefix and Controller Folder
|
|
55
|
-
|
|
56
|
-
See [references/backend-table-prefix-mapping.md](../references/backend-table-prefix-mapping.md) for:
|
|
57
|
-
- Table prefix priority (feature.json vs. fallback)
|
|
58
|
-
- Application-to-prefix mapping table
|
|
59
|
-
- Feature.json detection and extraction
|
|
60
|
-
- Controller folder organization
|
|
61
|
-
- Store `{controller_folder}` from the mapping
|
|
62
|
-
|
|
63
|
-
### 3. Call MCP scaffold_extension
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
Tool: mcp__smartstack__scaffold_extension
|
|
67
|
-
Args:
|
|
68
|
-
type: "feature"
|
|
69
|
-
name: "{entityName}" # PascalCase
|
|
70
|
-
options:
|
|
71
|
-
navRoute: "{full_path}"
|
|
72
|
-
tablePrefix: "{prefix}"
|
|
73
|
-
schema: "core"
|
|
74
|
-
withDtos: true
|
|
75
|
-
withValidation: true
|
|
76
|
-
withRepository: false # Use service pattern
|
|
77
|
-
skipComponent: true # Frontend in next step
|
|
78
|
-
dryRun: false
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
### 4. Parse MCP Response
|
|
82
|
-
|
|
83
|
-
The tool generates (paths organized by navRoute hierarchy `{application}.{module}`):
|
|
84
|
-
- `Domain/{Application}/{Module}/{EntityName}.cs` - Entity with BaseEntity
|
|
85
|
-
- `Infrastructure/Persistence/Configurations/{Application}/{Module}/{EntityName}Configuration.cs` - EF Config
|
|
86
|
-
- `Application/Common/Interfaces/I{EntityName}Service.cs` - Service Interface
|
|
87
|
-
- `Infrastructure/Services/{Application}/{Module}/{EntityName}Service.cs` - Service Implementation
|
|
88
|
-
- `Api/Controllers/{controller_folder}/{Application}/{EntityName}Controller.cs` - REST Controller
|
|
89
|
-
- `Application/{Application}/{Module}/DTOs/{EntityName}ResponseDto.cs` - Response DTO
|
|
90
|
-
- `Application/{Application}/{Module}/DTOs/Create{EntityName}Dto.cs` - Create request
|
|
91
|
-
- `Application/{Application}/{Module}/DTOs/Update{EntityName}Dto.cs` - Update request
|
|
92
|
-
|
|
93
|
-
### 5-7. Present Output, Entity Seeding & Store Info
|
|
94
|
-
|
|
95
|
-
See [references/backend-seeding-and-dto-output.md](../references/backend-seeding-and-dto-output.md) for:
|
|
96
|
-
- Output formatting by layer (Domain, Infrastructure, Application, API)
|
|
97
|
-
- Entity seeding questions and responses
|
|
98
|
-
- Entity info storage for frontend generation
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
## CONTROLLER NAVROUTE AND FOLDER HIERARCHY
|
|
103
|
-
|
|
104
|
-
See [references/backend-controller-hierarchy.md](../references/backend-controller-hierarchy.md) for the complete reference:
|
|
105
|
-
- Controller file organization (Admin/Business/Support/User folders)
|
|
106
|
-
- Context-to-folder mapping table
|
|
107
|
-
- NavRoute attribute C# template with RequirePermission
|
|
108
|
-
|
|
109
|
-
---
|
|
110
|
-
|
|
111
|
-
## MCP RESPONSE HANDLING
|
|
112
|
-
|
|
113
|
-
### Success Case
|
|
114
|
-
|
|
115
|
-
If MCP returns successfully:
|
|
116
|
-
- Display all generated files
|
|
117
|
-
- Show DbSet and DI registration instructions
|
|
118
|
-
- Ask about entity seeding (section 6)
|
|
119
|
-
- Store entity info for frontend
|
|
120
|
-
- Proceed to step-05-frontend.md
|
|
121
|
-
|
|
122
|
-
### Error Case
|
|
123
|
-
|
|
124
|
-
If MCP call fails:
|
|
125
|
-
- Display error message
|
|
126
|
-
- Suggest checking entity name format
|
|
127
|
-
- Do NOT proceed automatically
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
## POST-GENERATION VERIFICATION (MANDATORY)
|
|
132
|
-
|
|
133
|
-
**Before proceeding to step-05, run ALL checks.**
|
|
134
|
-
|
|
135
|
-
See [references/backend-verification.md](../references/backend-verification.md) for the complete verification checklist:
|
|
136
|
-
|
|
137
|
-
| Check | Type | What |
|
|
138
|
-
|-------|------|------|
|
|
139
|
-
| 1. Backend Build | BLOCKING | `dotnet build --no-restore` must succeed |
|
|
140
|
-
| 2. DbSet Registration | BLOCKING | `DbSet<{EntityName}>` in DbContext |
|
|
141
|
-
| 3. DI Registration | BLOCKING | `I{EntityName}Service` in DependencyInjection.cs |
|
|
142
|
-
| 4. RequirePermission | BLOCKING | All HTTP actions have `[RequirePermission]` |
|
|
143
|
-
| 5. Entity Configuration | BLOCKING | Table prefix, HasKey, HasIndex |
|
|
144
|
-
| 5b. Seeding Infrastructure | BLOCKING (first entity) | SeedConstants + DevDataSeeder + DI |
|
|
145
|
-
| 5c. SqlObjects Directory | BLOCKING (first entity) | SqlObjectHelper + Functions/ + .csproj EmbeddedResource |
|
|
146
|
-
| 6. Convention Validation | RECOMMENDED | `mcp__smartstack__validate_conventions` |
|
|
147
|
-
|
|
148
|
-
IF any BLOCKING check fails: Fix before proceeding to step-05.
|
|
149
|
-
|
|
150
|
-
---
|
|
151
|
-
|
|
152
|
-
## SUCCESS METRICS
|
|
153
|
-
|
|
154
|
-
- MCP scaffold_extension called successfully
|
|
155
|
-
- Entity, Service, Controller generated
|
|
156
|
-
- DTOs generated
|
|
157
|
-
- NavRoute attribute included
|
|
158
|
-
- Entity seeding offered to user (SeedData.cs + DevDataSeeder if accepted)
|
|
159
|
-
- Entity info stored for frontend
|
|
160
|
-
- Post-generation verification passed (all 7 checks: 5 original + 5b Seeding + 5c SqlObjects)
|
|
161
|
-
- Proceeded to step-05-frontend.md
|
|
162
|
-
|
|
163
|
-
## FAILURE MODES
|
|
164
|
-
|
|
165
|
-
- MCP call failed (display error, stop)
|
|
166
|
-
- Invalid entity name (must be PascalCase)
|
|
167
|
-
- Invalid navRoute format
|
|
168
|
-
|
|
169
|
-
---
|
|
170
|
-
|
|
171
|
-
## NEXT STEP
|
|
172
|
-
|
|
173
|
-
After backend code is generated and entity seeding is handled,
|
|
174
|
-
proceed to `./step-05-frontend.md`
|
|
1
|
+
---
|
|
2
|
+
name: step-04-backend
|
|
3
|
+
description: Generate backend code using MCP scaffold_extension
|
|
4
|
+
prev_step: steps/step-03-roles.md
|
|
5
|
+
next_step: steps/step-05-frontend.md
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Step 4: Backend Generation
|
|
9
|
+
|
|
10
|
+
## MANDATORY EXECUTION RULES
|
|
11
|
+
|
|
12
|
+
- ALWAYS use MCP `scaffold_extension` tool - NEVER use templates
|
|
13
|
+
- ALWAYS generate Entity + Service + Controller as a unit
|
|
14
|
+
- NEVER skip controller generation - API is required
|
|
15
|
+
- YOU ARE AN ORCHESTRATOR calling MCP, not a generator
|
|
16
|
+
- **NEVER use Write on appsettings*.json** - ALWAYS use Edit (see _resources/config-safety.md)
|
|
17
|
+
- **Replace secret VALUES with `<CONFIGURE_HERE>`** - NEVER delete keys or sections
|
|
18
|
+
|
|
19
|
+
## YOUR TASK
|
|
20
|
+
|
|
21
|
+
Call the SmartStack MCP `scaffold_extension` tool with type "feature" to generate:
|
|
22
|
+
1. Domain Entity with EF Configuration
|
|
23
|
+
2. Application Service (Interface + Implementation)
|
|
24
|
+
3. API Controller with NavRoute attribute
|
|
25
|
+
4. DTOs (Response, Create, Update)
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## AVAILABLE STATE
|
|
30
|
+
|
|
31
|
+
From previous steps:
|
|
32
|
+
|
|
33
|
+
| Variable | Description |
|
|
34
|
+
|----------|-------------|
|
|
35
|
+
| `{level}` | application, module, section, or resource |
|
|
36
|
+
| `{code}` | kebab-case identifier |
|
|
37
|
+
| `{full_path}` | Complete navigation path (navRoute) |
|
|
38
|
+
| `{labels}` | Object with fr, en, it, de |
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## EXECUTION SEQUENCE
|
|
43
|
+
|
|
44
|
+
### 1. Derive Entity Name
|
|
45
|
+
|
|
46
|
+
Convert `{code}` to PascalCase for entity name:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
code: "products" → entityName: "Product"
|
|
50
|
+
code: "order-items" → entityName: "OrderItem"
|
|
51
|
+
code: "user-profiles" → entityName: "UserProfile"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 2. Determine Table Prefix and Controller Folder
|
|
55
|
+
|
|
56
|
+
See [references/backend-table-prefix-mapping.md](../references/backend-table-prefix-mapping.md) for:
|
|
57
|
+
- Table prefix priority (feature.json vs. fallback)
|
|
58
|
+
- Application-to-prefix mapping table
|
|
59
|
+
- Feature.json detection and extraction
|
|
60
|
+
- Controller folder organization
|
|
61
|
+
- Store `{controller_folder}` from the mapping
|
|
62
|
+
|
|
63
|
+
### 3. Call MCP scaffold_extension
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
Tool: mcp__smartstack__scaffold_extension
|
|
67
|
+
Args:
|
|
68
|
+
type: "feature"
|
|
69
|
+
name: "{entityName}" # PascalCase
|
|
70
|
+
options:
|
|
71
|
+
navRoute: "{full_path}"
|
|
72
|
+
tablePrefix: "{prefix}"
|
|
73
|
+
schema: "core"
|
|
74
|
+
withDtos: true
|
|
75
|
+
withValidation: true
|
|
76
|
+
withRepository: false # Use service pattern
|
|
77
|
+
skipComponent: true # Frontend in next step
|
|
78
|
+
dryRun: false
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### 4. Parse MCP Response
|
|
82
|
+
|
|
83
|
+
The tool generates (paths organized by navRoute hierarchy `{application}.{module}`):
|
|
84
|
+
- `Domain/{Application}/{Module}/{EntityName}.cs` - Entity with BaseEntity
|
|
85
|
+
- `Infrastructure/Persistence/Configurations/{Application}/{Module}/{EntityName}Configuration.cs` - EF Config
|
|
86
|
+
- `Application/Common/Interfaces/I{EntityName}Service.cs` - Service Interface
|
|
87
|
+
- `Infrastructure/Services/{Application}/{Module}/{EntityName}Service.cs` - Service Implementation
|
|
88
|
+
- `Api/Controllers/{controller_folder}/{Application}/{EntityName}Controller.cs` - REST Controller
|
|
89
|
+
- `Application/{Application}/{Module}/DTOs/{EntityName}ResponseDto.cs` - Response DTO
|
|
90
|
+
- `Application/{Application}/{Module}/DTOs/Create{EntityName}Dto.cs` - Create request
|
|
91
|
+
- `Application/{Application}/{Module}/DTOs/Update{EntityName}Dto.cs` - Update request
|
|
92
|
+
|
|
93
|
+
### 5-7. Present Output, Entity Seeding & Store Info
|
|
94
|
+
|
|
95
|
+
See [references/backend-seeding-and-dto-output.md](../references/backend-seeding-and-dto-output.md) for:
|
|
96
|
+
- Output formatting by layer (Domain, Infrastructure, Application, API)
|
|
97
|
+
- Entity seeding questions and responses
|
|
98
|
+
- Entity info storage for frontend generation
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## CONTROLLER NAVROUTE AND FOLDER HIERARCHY
|
|
103
|
+
|
|
104
|
+
See [references/backend-controller-hierarchy.md](../references/backend-controller-hierarchy.md) for the complete reference:
|
|
105
|
+
- Controller file organization (Admin/Business/Support/User folders)
|
|
106
|
+
- Context-to-folder mapping table
|
|
107
|
+
- NavRoute attribute C# template with RequirePermission
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## MCP RESPONSE HANDLING
|
|
112
|
+
|
|
113
|
+
### Success Case
|
|
114
|
+
|
|
115
|
+
If MCP returns successfully:
|
|
116
|
+
- Display all generated files
|
|
117
|
+
- Show DbSet and DI registration instructions
|
|
118
|
+
- Ask about entity seeding (section 6)
|
|
119
|
+
- Store entity info for frontend
|
|
120
|
+
- Proceed to step-05-frontend.md
|
|
121
|
+
|
|
122
|
+
### Error Case
|
|
123
|
+
|
|
124
|
+
If MCP call fails:
|
|
125
|
+
- Display error message
|
|
126
|
+
- Suggest checking entity name format
|
|
127
|
+
- Do NOT proceed automatically
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## POST-GENERATION VERIFICATION (MANDATORY)
|
|
132
|
+
|
|
133
|
+
**Before proceeding to step-05, run ALL checks.**
|
|
134
|
+
|
|
135
|
+
See [references/backend-verification.md](../references/backend-verification.md) for the complete verification checklist:
|
|
136
|
+
|
|
137
|
+
| Check | Type | What |
|
|
138
|
+
|-------|------|------|
|
|
139
|
+
| 1. Backend Build | BLOCKING | `dotnet build --no-restore` must succeed |
|
|
140
|
+
| 2. DbSet Registration | BLOCKING | `DbSet<{EntityName}>` in DbContext |
|
|
141
|
+
| 3. DI Registration | BLOCKING | `I{EntityName}Service` in DependencyInjection.cs |
|
|
142
|
+
| 4. RequirePermission | BLOCKING | All HTTP actions have `[RequirePermission]` |
|
|
143
|
+
| 5. Entity Configuration | BLOCKING | Table prefix, HasKey, HasIndex |
|
|
144
|
+
| 5b. Seeding Infrastructure | BLOCKING (first entity) | SeedConstants + DevDataSeeder + DI |
|
|
145
|
+
| 5c. SqlObjects Directory | BLOCKING (first entity) | SqlObjectHelper + Functions/ + .csproj EmbeddedResource |
|
|
146
|
+
| 6. Convention Validation | RECOMMENDED | `mcp__smartstack__validate_conventions` |
|
|
147
|
+
|
|
148
|
+
IF any BLOCKING check fails: Fix before proceeding to step-05.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## SUCCESS METRICS
|
|
153
|
+
|
|
154
|
+
- MCP scaffold_extension called successfully
|
|
155
|
+
- Entity, Service, Controller generated
|
|
156
|
+
- DTOs generated
|
|
157
|
+
- NavRoute attribute included
|
|
158
|
+
- Entity seeding offered to user (SeedData.cs + DevDataSeeder if accepted)
|
|
159
|
+
- Entity info stored for frontend
|
|
160
|
+
- Post-generation verification passed (all 7 checks: 5 original + 5b Seeding + 5c SqlObjects)
|
|
161
|
+
- Proceeded to step-05-frontend.md
|
|
162
|
+
|
|
163
|
+
## FAILURE MODES
|
|
164
|
+
|
|
165
|
+
- MCP call failed (display error, stop)
|
|
166
|
+
- Invalid entity name (must be PascalCase)
|
|
167
|
+
- Invalid navRoute format
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## NEXT STEP
|
|
172
|
+
|
|
173
|
+
After backend code is generated and entity seeding is handled,
|
|
174
|
+
proceed to `./step-05-frontend.md`
|
|
@@ -131,7 +131,7 @@ See [references/frontend-i18n-and-output.md](../references/frontend-i18n-and-out
|
|
|
131
131
|
## ROUTING RULES
|
|
132
132
|
|
|
133
133
|
See [references/frontend-verification.md](../references/frontend-verification.md) for detailed routing rules with code examples:
|
|
134
|
-
- **Rule 1:** Routes MUST be inside
|
|
134
|
+
- **Rule 1:** Routes MUST be inside the AppLayout wrapper
|
|
135
135
|
- **Rule 2:** Use NESTED routes (not flat) — flat routes bypass layout and break the shell
|
|
136
136
|
|
|
137
137
|
---
|
|
@@ -543,15 +543,15 @@ const applicationRoutes: ApplicationRouteExtensions = {
|
|
|
543
543
|
|
|
544
544
|
| Application key | Injected into Layout | Standard path | Tenant path |
|
|
545
545
|
|-----------------|---------------------|---------------|-------------|
|
|
546
|
-
| `administration` | `
|
|
547
|
-
| `{application}` | `
|
|
548
|
-
| `myspace` | `
|
|
546
|
+
| `administration` | `AppLayout` | `/administration/...` | `/t/:slug/administration/...` |
|
|
547
|
+
| `{application}` | `AppLayout` | `/{application}/...` | `/t/:slug/{application}/...` |
|
|
548
|
+
| `myspace` | `AppLayout` | `/myspace/...` | `/t/:slug/myspace/...` |
|
|
549
549
|
|
|
550
550
|
### Pattern B: JSX Routes (inside Layout wrapper)
|
|
551
551
|
|
|
552
552
|
> **Legacy pattern** — only used if App.tsx was manually restructured with JSX `<Route>` elements.
|
|
553
553
|
|
|
554
|
-
|
|
554
|
+
The unified `AppLayout` provides the application shell: **header with AvatarMenu**, sidebar, navigation. It renders child pages via React Router's `<Outlet />`.
|
|
555
555
|
|
|
556
556
|
**If routes are placed OUTSIDE the layout wrapper, the shell (header, sidebar, AvatarMenu) will NOT render. The page appears "naked" without any navigation.**
|
|
557
557
|
|
|
@@ -559,9 +559,9 @@ SmartStack layouts (`AdminLayout`, `BusinessLayout`, `UserLayout`) provide the a
|
|
|
559
559
|
|
|
560
560
|
1. Open `App.tsx`
|
|
561
561
|
2. Find the existing layout route for the target application:
|
|
562
|
-
- `administration` → `<Route path="/administration" element={<
|
|
563
|
-
- `{application}` → `<Route path="/{application}" element={<
|
|
564
|
-
- `myspace` → `<Route path="/myspace" element={<
|
|
562
|
+
- `administration` → `<Route path="/administration" element={<AppLayout />}>`
|
|
563
|
+
- `{application}` → `<Route path="/{application}" element={<AppLayout />}>`
|
|
564
|
+
- `myspace` → `<Route path="/myspace" element={<AppLayout />}>`
|
|
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
|
|