@atlashub/smartstack-cli 1.5.1 → 1.5.3

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 (147) hide show
  1. package/.documentation/css/styles.css +2168 -2168
  2. package/.documentation/js/app.js +794 -794
  3. package/config/default-config.json +86 -86
  4. package/config/settings.json +53 -53
  5. package/config/settings.local.example.json +16 -16
  6. package/dist/index.js +0 -0
  7. package/dist/index.js.map +1 -1
  8. package/package.json +88 -88
  9. package/templates/agents/action.md +36 -36
  10. package/templates/agents/efcore/conflicts.md +84 -84
  11. package/templates/agents/efcore/db-deploy.md +51 -51
  12. package/templates/agents/efcore/db-reset.md +59 -59
  13. package/templates/agents/efcore/db-seed.md +56 -56
  14. package/templates/agents/efcore/db-status.md +64 -64
  15. package/templates/agents/efcore/migration.md +85 -85
  16. package/templates/agents/efcore/rebase-snapshot.md +62 -62
  17. package/templates/agents/efcore/scan.md +90 -90
  18. package/templates/agents/efcore/squash.md +67 -67
  19. package/templates/agents/explore-codebase.md +65 -65
  20. package/templates/agents/explore-docs.md +97 -97
  21. package/templates/agents/fix-grammar.md +49 -49
  22. package/templates/agents/gitflow/abort.md +45 -45
  23. package/templates/agents/gitflow/cleanup.md +85 -85
  24. package/templates/agents/gitflow/commit.md +40 -40
  25. package/templates/agents/gitflow/exec.md +48 -48
  26. package/templates/agents/gitflow/finish.md +92 -92
  27. package/templates/agents/gitflow/init.md +139 -139
  28. package/templates/agents/gitflow/merge.md +62 -62
  29. package/templates/agents/gitflow/plan.md +42 -42
  30. package/templates/agents/gitflow/pr.md +78 -78
  31. package/templates/agents/gitflow/review.md +49 -49
  32. package/templates/agents/gitflow/start.md +61 -61
  33. package/templates/agents/gitflow/status.md +32 -32
  34. package/templates/agents/snipper.md +36 -36
  35. package/templates/agents/websearch.md +46 -46
  36. package/templates/commands/_resources/formatting-guide.md +124 -124
  37. package/templates/commands/ai-prompt.md +315 -315
  38. package/templates/commands/apex/1-analyze.md +100 -100
  39. package/templates/commands/apex/2-plan.md +145 -145
  40. package/templates/commands/apex/3-execute.md +171 -171
  41. package/templates/commands/apex/4-examine.md +116 -116
  42. package/templates/commands/apex/5-tasks.md +209 -209
  43. package/templates/commands/apex.md +76 -76
  44. package/templates/commands/application/create.md +362 -362
  45. package/templates/commands/application/templates-backend.md +463 -463
  46. package/templates/commands/application/templates-frontend.md +517 -517
  47. package/templates/commands/application/templates-i18n.md +478 -478
  48. package/templates/commands/application/templates-seed.md +362 -362
  49. package/templates/commands/application.md +303 -303
  50. package/templates/commands/business-analyse/0-orchestrate.md +640 -640
  51. package/templates/commands/business-analyse/1-init.md +269 -269
  52. package/templates/commands/business-analyse/2-discover.md +520 -520
  53. package/templates/commands/business-analyse/3-analyse.md +408 -408
  54. package/templates/commands/business-analyse/4-specify.md +598 -598
  55. package/templates/commands/business-analyse/5-validate.md +326 -326
  56. package/templates/commands/business-analyse/6-handoff.md +746 -746
  57. package/templates/commands/business-analyse/7-doc-html.md +602 -602
  58. package/templates/commands/business-analyse/bug.md +325 -325
  59. package/templates/commands/business-analyse/change-request.md +368 -368
  60. package/templates/commands/business-analyse/hotfix.md +200 -200
  61. package/templates/commands/business-analyse.md +640 -640
  62. package/templates/commands/controller/create.md +216 -216
  63. package/templates/commands/controller/postman-templates.md +528 -528
  64. package/templates/commands/controller/templates.md +600 -600
  65. package/templates/commands/controller.md +337 -337
  66. package/templates/commands/create/agent.md +138 -138
  67. package/templates/commands/create/command.md +166 -166
  68. package/templates/commands/create/hook.md +234 -234
  69. package/templates/commands/create/plugin.md +329 -329
  70. package/templates/commands/create/project.md +507 -507
  71. package/templates/commands/create/skill.md +199 -199
  72. package/templates/commands/create.md +220 -220
  73. package/templates/commands/debug.md +95 -95
  74. package/templates/commands/documentation/module.md +202 -202
  75. package/templates/commands/documentation/templates.md +432 -432
  76. package/templates/commands/documentation.md +190 -190
  77. package/templates/commands/efcore/_env-check.md +153 -153
  78. package/templates/commands/efcore/conflicts.md +186 -186
  79. package/templates/commands/efcore/db-deploy.md +193 -193
  80. package/templates/commands/efcore/db-reset.md +426 -426
  81. package/templates/commands/efcore/db-seed.md +326 -326
  82. package/templates/commands/efcore/db-status.md +226 -226
  83. package/templates/commands/efcore/migration.md +400 -400
  84. package/templates/commands/efcore/rebase-snapshot.md +264 -264
  85. package/templates/commands/efcore/scan.md +198 -198
  86. package/templates/commands/efcore/squash.md +298 -298
  87. package/templates/commands/efcore.md +224 -224
  88. package/templates/commands/epct.md +69 -69
  89. package/templates/commands/explain.md +186 -186
  90. package/templates/commands/explore.md +45 -45
  91. package/templates/commands/feature-full.md +267 -267
  92. package/templates/commands/gitflow/1-init.md +1038 -1038
  93. package/templates/commands/gitflow/10-start.md +768 -768
  94. package/templates/commands/gitflow/11-finish.md +457 -457
  95. package/templates/commands/gitflow/12-cleanup.md +276 -276
  96. package/templates/commands/gitflow/13-sync.md +216 -216
  97. package/templates/commands/gitflow/14-rebase.md +251 -251
  98. package/templates/commands/gitflow/2-status.md +277 -277
  99. package/templates/commands/gitflow/3-commit.md +344 -344
  100. package/templates/commands/gitflow/4-plan.md +145 -145
  101. package/templates/commands/gitflow/5-exec.md +147 -147
  102. package/templates/commands/gitflow/6-abort.md +344 -344
  103. package/templates/commands/gitflow/7-pull-request.md +453 -355
  104. package/templates/commands/gitflow/8-review.md +240 -176
  105. package/templates/commands/gitflow/9-merge.md +451 -365
  106. package/templates/commands/gitflow.md +128 -128
  107. package/templates/commands/implement.md +663 -663
  108. package/templates/commands/init.md +567 -567
  109. package/templates/commands/mcp-integration.md +330 -330
  110. package/templates/commands/notification.md +129 -129
  111. package/templates/commands/oneshot.md +57 -57
  112. package/templates/commands/quick-search.md +72 -72
  113. package/templates/commands/ralph-loop/cancel-ralph.md +18 -18
  114. package/templates/commands/ralph-loop/help.md +126 -126
  115. package/templates/commands/ralph-loop/ralph-loop.md +18 -18
  116. package/templates/commands/review.md +106 -106
  117. package/templates/commands/utils/test-web-config.md +160 -160
  118. package/templates/commands/utils/test-web.md +151 -151
  119. package/templates/commands/validate.md +233 -233
  120. package/templates/commands/workflow.md +193 -193
  121. package/templates/gitflow/config.json +138 -138
  122. package/templates/hooks/ef-migration-check.md +139 -139
  123. package/templates/hooks/hooks.json +25 -25
  124. package/templates/hooks/stop-hook.sh +177 -177
  125. package/templates/skills/ai-prompt/SKILL.md +778 -778
  126. package/templates/skills/application/SKILL.md +563 -563
  127. package/templates/skills/application/templates-backend.md +450 -450
  128. package/templates/skills/application/templates-frontend.md +531 -531
  129. package/templates/skills/application/templates-i18n.md +520 -520
  130. package/templates/skills/application/templates-seed.md +647 -647
  131. package/templates/skills/business-analyse/SKILL.md +191 -191
  132. package/templates/skills/business-analyse/questionnaire.md +283 -283
  133. package/templates/skills/business-analyse/templates-frd.md +477 -477
  134. package/templates/skills/business-analyse/templates-react.md +580 -580
  135. package/templates/skills/controller/SKILL.md +240 -240
  136. package/templates/skills/controller/postman-templates.md +614 -614
  137. package/templates/skills/controller/templates.md +1468 -1468
  138. package/templates/skills/documentation/SKILL.md +133 -133
  139. package/templates/skills/documentation/templates.md +476 -476
  140. package/templates/skills/feature-full/SKILL.md +838 -838
  141. package/templates/skills/notification/SKILL.md +555 -555
  142. package/templates/skills/ui-components/SKILL.md +870 -870
  143. package/templates/skills/workflow/SKILL.md +582 -582
  144. package/templates/test-web/api-health.json +38 -38
  145. package/templates/test-web/minimal.json +19 -19
  146. package/templates/test-web/npm-package.json +46 -46
  147. package/templates/test-web/seo-check.json +54 -54
@@ -1,507 +1,507 @@
1
- ---
2
- description: Create a full-stack SmartStack project (Clean Architecture .NET + React/Vite/Tailwind)
3
- argument-hint: <project-name> [description]
4
- ---
5
-
6
- # Create SmartStack Project
7
-
8
- Scaffold a complete full-stack project with:
9
- - **Backend**: .NET 10 Clean Architecture (Domain, Application, Infrastructure, Api)
10
- - **Frontend**: React 19 + TypeScript + Vite + Tailwind CSS
11
-
12
- ## Arguments
13
-
14
- Parse from `$ARGUMENTS`:
15
- - **name** (required): Project name in PascalCase (e.g., `MyProject`)
16
- - **description** (optional): Project description
17
-
18
- ## Project Structure
19
-
20
- ```
21
- {ProjectName}/
22
- ├── .gitignore
23
- ├── .claudeignore
24
- ├── README.md
25
- ├── CLAUDE.md
26
- ├── LICENSE
27
- ├── Directory.Build.props
28
- ├── {ProjectName}.sln
29
-
30
- ├── src/
31
- │ ├── {ProjectName}.Domain/
32
- │ │ ├── {ProjectName}.Domain.csproj
33
- │ │ ├── Common/
34
- │ │ │ ├── BaseEntity.cs
35
- │ │ │ ├── IAuditableEntity.cs
36
- │ │ │ └── IDomainEvent.cs
37
- │ │ ├── Entities/
38
- │ │ ├── Enums/
39
- │ │ ├── Exceptions/
40
- │ │ │ └── DomainException.cs
41
- │ │ └── ValueObjects/
42
- │ │
43
- │ ├── {ProjectName}.Application/
44
- │ │ ├── {ProjectName}.Application.csproj
45
- │ │ ├── Common/
46
- │ │ │ ├── Behaviors/
47
- │ │ │ │ ├── ValidationBehavior.cs
48
- │ │ │ │ └── LoggingBehavior.cs
49
- │ │ │ ├── Interfaces/
50
- │ │ │ │ ├── IApplicationDbContext.cs
51
- │ │ │ │ └── ICurrentUserService.cs
52
- │ │ │ └── Models/
53
- │ │ │ └── Result.cs
54
- │ │ ├── Features/
55
- │ │ │ └── .gitkeep
56
- │ │ └── DependencyInjection.cs
57
- │ │
58
- │ ├── {ProjectName}.Infrastructure/
59
- │ │ ├── {ProjectName}.Infrastructure.csproj
60
- │ │ ├── Persistence/
61
- │ │ │ ├── ApplicationDbContext.cs
62
- │ │ │ ├── Configurations/
63
- │ │ │ │ └── .gitkeep
64
- │ │ │ ├── Migrations/
65
- │ │ │ │ └── .gitkeep
66
- │ │ │ └── Seeding/
67
- │ │ │ └── DatabaseSeeder.cs
68
- │ │ ├── Services/
69
- │ │ │ └── DateTimeService.cs
70
- │ │ └── DependencyInjection.cs
71
- │ │
72
- │ ├── {ProjectName}.Api.Core/
73
- │ │ ├── {ProjectName}.Api.Core.csproj
74
- │ │ ├── Controllers/
75
- │ │ │ └── BaseApiController.cs
76
- │ │ ├── Extensions/
77
- │ │ │ └── ServiceCollectionExtensions.cs
78
- │ │ ├── Middleware/
79
- │ │ │ └── ExceptionHandlingMiddleware.cs
80
- │ │ └── Hubs/
81
- │ │ └── NotificationHub.cs
82
- │ │
83
- │ └── {ProjectName}.Api/
84
- │ ├── {ProjectName}.Api.csproj
85
- │ ├── Properties/
86
- │ │ └── launchSettings.json
87
- │ ├── appsettings.json
88
- │ ├── appsettings.Development.json
89
- │ ├── appsettings.Production.json
90
- │ └── Program.cs
91
-
92
- ├── web/
93
- │ └── {project-name}-web/
94
- │ ├── package.json
95
- │ ├── tsconfig.json
96
- │ ├── tsconfig.app.json
97
- │ ├── tsconfig.node.json
98
- │ ├── vite.config.ts
99
- │ ├── eslint.config.mjs
100
- │ ├── tailwind.config.js
101
- │ ├── postcss.config.js
102
- │ ├── index.html
103
- │ ├── .env.example
104
- │ └── src/
105
- │ ├── main.tsx
106
- │ ├── App.tsx
107
- │ ├── index.css
108
- │ ├── vite-env.d.ts
109
- │ ├── components/
110
- │ │ ├── layout/
111
- │ │ │ ├── Header.tsx
112
- │ │ │ ├── Sidebar.tsx
113
- │ │ │ └── Footer.tsx
114
- │ │ └── ui/
115
- │ │ ├── Button.tsx
116
- │ │ └── Card.tsx
117
- │ ├── pages/
118
- │ │ ├── HomePage.tsx
119
- │ │ └── NotFoundPage.tsx
120
- │ ├── hooks/
121
- │ │ └── useApi.ts
122
- │ ├── contexts/
123
- │ │ ├── AuthContext.tsx
124
- │ │ └── ThemeContext.tsx
125
- │ ├── services/
126
- │ │ └── api/
127
- │ │ └── client.ts
128
- │ ├── types/
129
- │ │ └── index.ts
130
- │ ├── utils/
131
- │ │ └── helpers.ts
132
- │ └── config/
133
- │ └── constants.ts
134
-
135
- ├── tests/
136
- │ └── {ProjectName}.Tests/
137
- │ └── {ProjectName}.Tests.csproj
138
-
139
- └── tools/
140
- └── .gitkeep
141
- ```
142
-
143
- ## Workflow
144
-
145
- ### 1. PARSE & VALIDATE
146
-
147
- Extract from `$ARGUMENTS`:
148
- ```
149
- name: PascalCase project name (e.g., "MyProject")
150
- description: Optional description
151
- ```
152
-
153
- Validate:
154
- - Name is PascalCase: `^[A-Z][a-zA-Z0-9]*$`
155
- - Directory doesn't exist
156
- - Name is not a reserved word
157
-
158
- ### 2. CREATE ROOT STRUCTURE
159
-
160
- Use Bash to create directories:
161
- ```bash
162
- mkdir -p {ProjectName}/src
163
- mkdir -p {ProjectName}/web
164
- mkdir -p {ProjectName}/tests
165
- mkdir -p {ProjectName}/tools
166
- mkdir -p {ProjectName}/scripts
167
- ```
168
-
169
- ### 3. GENERATE BACKEND FILES
170
-
171
- For each backend project, use Write tool to create:
172
-
173
- #### 3.1 Directory.Build.props
174
- ```xml
175
- <Project>
176
- <PropertyGroup>
177
- <TargetFramework>net10.0</TargetFramework>
178
- <ImplicitUsings>enable</ImplicitUsings>
179
- <Nullable>enable</Nullable>
180
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
181
- <Version>1.0.0</Version>
182
- <Authors>{Author}</Authors>
183
- <Company>{Company}</Company>
184
- </PropertyGroup>
185
- </Project>
186
- ```
187
-
188
- #### 3.2 Solution File ({ProjectName}.sln)
189
- Use `dotnet new sln` and `dotnet sln add` commands.
190
-
191
- #### 3.3 Domain Project
192
- - Create .csproj with MediatR.Contracts
193
- - Create BaseEntity.cs, IDomainEvent.cs
194
- - Create folder structure
195
-
196
- #### 3.4 Application Project
197
- - Create .csproj with MediatR, FluentValidation
198
- - Create Result.cs, ValidationBehavior.cs
199
- - Create DependencyInjection.cs
200
-
201
- #### 3.5 Infrastructure Project
202
- - Create .csproj with EF Core, SqlServer
203
- - Create ApplicationDbContext.cs
204
- - Create DependencyInjection.cs
205
-
206
- #### 3.6 Api.Core Project
207
- - Create .csproj with ASP.NET Core
208
- - Create BaseApiController.cs
209
- - Create ExceptionHandlingMiddleware.cs
210
-
211
- #### 3.7 Api Project
212
- - Create .csproj as entry point
213
- - Create Program.cs with full bootstrap
214
- - Create appsettings.json files
215
-
216
- ### 4. GENERATE FRONTEND FILES
217
-
218
- #### 4.1 package.json
219
- ```json
220
- {
221
- "name": "{project-name}-web",
222
- "private": true,
223
- "version": "1.0.0",
224
- "type": "module",
225
- "scripts": {
226
- "dev": "vite",
227
- "build": "tsc -b && vite build",
228
- "lint": "eslint .",
229
- "preview": "vite preview"
230
- },
231
- "dependencies": {
232
- "react": "^19.0.0",
233
- "react-dom": "^19.0.0",
234
- "react-router-dom": "^7.0.0",
235
- "axios": "^1.7.0",
236
- "@microsoft/signalr": "^8.0.0",
237
- "lucide-react": "^0.400.0"
238
- },
239
- "devDependencies": {
240
- "@types/react": "^19.0.0",
241
- "@types/react-dom": "^19.0.0",
242
- "@vitejs/plugin-react": "^4.3.0",
243
- "typescript": "~5.6.0",
244
- "vite": "^6.0.0",
245
- "tailwindcss": "^4.0.0",
246
- "@tailwindcss/vite": "^4.0.0",
247
- "eslint": "^9.0.0"
248
- }
249
- }
250
- ```
251
-
252
- #### 4.2 vite.config.ts
253
- ```typescript
254
- import { defineConfig } from 'vite'
255
- import react from '@vitejs/plugin-react'
256
- import tailwindcss from '@tailwindcss/vite'
257
-
258
- export default defineConfig({
259
- plugins: [react(), tailwindcss()],
260
- server: {
261
- port: 5173,
262
- proxy: {
263
- '/api': 'http://localhost:5000'
264
- }
265
- }
266
- })
267
- ```
268
-
269
- #### 4.3 React Components
270
- - Create App.tsx with router setup
271
- - Create basic layout components
272
- - Create context providers
273
- - Create API client
274
-
275
- ### 5. GENERATE CONFIGURATION FILES
276
-
277
- #### .gitignore
278
- ```
279
- # .NET
280
- bin/
281
- obj/
282
- *.user
283
- *.suo
284
- appsettings.Local.json
285
-
286
- # Node
287
- node_modules/
288
- dist/
289
- .env.local
290
-
291
- # IDE
292
- .vs/
293
- .vscode/
294
- .idea/
295
-
296
- # OS
297
- .DS_Store
298
- Thumbs.db
299
-
300
- # Logs
301
- *.log
302
- logs/
303
- ```
304
-
305
- #### CLAUDE.md
306
- ```markdown
307
- # {ProjectName} Architecture Memory
308
-
309
- ## Project Overview
310
- {description}
311
-
312
- ## Technology Stack
313
- - Backend: .NET 10, EF Core, Clean Architecture
314
- - Frontend: React 19, TypeScript, Vite, Tailwind CSS
315
- - Database: SQL Server
316
-
317
- ## Architecture
318
- Clean Architecture with CQRS pattern.
319
-
320
- ## Conventions
321
- - Use MediatR for commands/queries
322
- - Use FluentValidation for validation
323
- - Use Result<T> for operation results
324
- ```
325
-
326
- ### 6. INITIALIZE GIT & DOTNET
327
-
328
- ```bash
329
- cd {ProjectName}
330
- git init
331
- dotnet new sln -n {ProjectName}
332
- dotnet sln add src/{ProjectName}.Domain
333
- dotnet sln add src/{ProjectName}.Application
334
- dotnet sln add src/{ProjectName}.Infrastructure
335
- dotnet sln add src/{ProjectName}.Api.Core
336
- dotnet sln add src/{ProjectName}.Api
337
- dotnet restore
338
- ```
339
-
340
- ### 7. DISPLAY SUCCESS
341
-
342
- ```
343
- ╔═══════════════════════════════════════════════════════════════╗
344
- ║ SMARTSTACK PROJECT CREATED ║
345
- ╠═══════════════════════════════════════════════════════════════╣
346
- ║ Name: {ProjectName} ║
347
- ║ Location: {full-path} ║
348
- ╠═══════════════════════════════════════════════════════════════╣
349
- ║ Backend: ║
350
- ║ ✓ {ProjectName}.Domain (Core entities) ║
351
- ║ ✓ {ProjectName}.Application (CQRS, Use cases) ║
352
- ║ ✓ {ProjectName}.Infrastructure (EF Core, Services) ║
353
- ║ ✓ {ProjectName}.Api.Core (Controllers, Middleware) ║
354
- ║ ✓ {ProjectName}.Api (Entry point) ║
355
- ╠═══════════════════════════════════════════════════════════════╣
356
- ║ Frontend: ║
357
- ║ ✓ {project-name}-web (React + Vite + Tailwind) ║
358
- ╠═══════════════════════════════════════════════════════════════╣
359
- ║ Next steps: ║
360
- ║ 1. cd {ProjectName} ║
361
- ║ 2. dotnet build ║
362
- ║ 3. cd web/{project-name}-web && npm install ║
363
- ║ 4. Configure appsettings.Local.json ║
364
- ║ 5. dotnet ef database update ║
365
- ║ 6. dotnet run --project src/{ProjectName}.Api ║
366
- ║ 7. npm run dev (in web folder) ║
367
- ╚═══════════════════════════════════════════════════════════════╝
368
- ```
369
-
370
- ## File Templates
371
-
372
- ### Domain/BaseEntity.cs
373
- ```csharp
374
- namespace {ProjectName}.Domain.Common;
375
-
376
- public abstract class BaseEntity
377
- {
378
- public Guid Id { get; protected set; } = Guid.NewGuid();
379
- public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
380
- public DateTime? UpdatedAt { get; set; }
381
- public string? CreatedBy { get; set; }
382
- public string? UpdatedBy { get; set; }
383
- }
384
- ```
385
-
386
- ### Application/Result.cs
387
- ```csharp
388
- namespace {ProjectName}.Application.Common.Models;
389
-
390
- public class Result<T>
391
- {
392
- public bool IsSuccess { get; }
393
- public T? Value { get; }
394
- public string? Error { get; }
395
-
396
- private Result(bool isSuccess, T? value, string? error)
397
- {
398
- IsSuccess = isSuccess;
399
- Value = value;
400
- Error = error;
401
- }
402
-
403
- public static Result<T> Success(T value) => new(true, value, null);
404
- public static Result<T> Failure(string error) => new(false, default, error);
405
- }
406
- ```
407
-
408
- ### Infrastructure/ApplicationDbContext.cs
409
- ```csharp
410
- using Microsoft.EntityFrameworkCore;
411
- using {ProjectName}.Application.Common.Interfaces;
412
-
413
- namespace {ProjectName}.Infrastructure.Persistence;
414
-
415
- public class ApplicationDbContext : DbContext, IApplicationDbContext
416
- {
417
- public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
418
- : base(options)
419
- {
420
- }
421
-
422
- protected override void OnModelCreating(ModelBuilder modelBuilder)
423
- {
424
- modelBuilder.ApplyConfigurationsFromAssembly(typeof(ApplicationDbContext).Assembly);
425
- base.OnModelCreating(modelBuilder);
426
- }
427
- }
428
- ```
429
-
430
- ### Api/Program.cs
431
- ```csharp
432
- using {ProjectName}.Application;
433
- using {ProjectName}.Infrastructure;
434
- using {ProjectName}.Api.Core.Extensions;
435
-
436
- var builder = WebApplication.CreateBuilder(args);
437
-
438
- // Add services
439
- builder.Services.AddApplication();
440
- builder.Services.AddInfrastructure(builder.Configuration);
441
- builder.Services.AddApiCore();
442
-
443
- builder.Services.AddControllers();
444
- builder.Services.AddEndpointsApiExplorer();
445
- builder.Services.AddSwaggerGen();
446
- builder.Services.AddSignalR();
447
-
448
- var app = builder.Build();
449
-
450
- // Configure pipeline
451
- if (app.Environment.IsDevelopment())
452
- {
453
- app.UseSwagger();
454
- app.UseSwaggerUI();
455
- }
456
-
457
- app.UseHttpsRedirection();
458
- app.UseAuthentication();
459
- app.UseAuthorization();
460
- app.MapControllers();
461
- app.MapHub<NotificationHub>("/hubs/notifications");
462
-
463
- app.Run();
464
- ```
465
-
466
- ### Frontend/App.tsx
467
- ```tsx
468
- import { BrowserRouter, Routes, Route } from 'react-router-dom';
469
- import { AuthProvider } from './contexts/AuthContext';
470
- import { ThemeProvider } from './contexts/ThemeContext';
471
- import HomePage from './pages/HomePage';
472
- import NotFoundPage from './pages/NotFoundPage';
473
-
474
- function App() {
475
- return (
476
- <ThemeProvider>
477
- <AuthProvider>
478
- <BrowserRouter>
479
- <Routes>
480
- <Route path="/" element={<HomePage />} />
481
- <Route path="*" element={<NotFoundPage />} />
482
- </Routes>
483
- </BrowserRouter>
484
- </AuthProvider>
485
- </ThemeProvider>
486
- );
487
- }
488
-
489
- export default App;
490
- ```
491
-
492
- ## Execution Rules
493
-
494
- 1. **ALWAYS** create all directories before files
495
- 2. **USE** Write tool for each file (not batch)
496
- 3. **USE** Bash for dotnet commands
497
- 4. **VALIDATE** project name is PascalCase
498
- 5. **NEVER** overwrite existing directories
499
- 6. Create files in this order: root → backend → frontend → config
500
-
501
- ## Priority
502
-
503
- Correctness > Completeness > Speed
504
-
505
- ---
506
-
507
- User: $ARGUMENTS
1
+ ---
2
+ description: Create a full-stack SmartStack project (Clean Architecture .NET + React/Vite/Tailwind)
3
+ argument-hint: <project-name> [description]
4
+ ---
5
+
6
+ # Create SmartStack Project
7
+
8
+ Scaffold a complete full-stack project with:
9
+ - **Backend**: .NET 10 Clean Architecture (Domain, Application, Infrastructure, Api)
10
+ - **Frontend**: React 19 + TypeScript + Vite + Tailwind CSS
11
+
12
+ ## Arguments
13
+
14
+ Parse from `$ARGUMENTS`:
15
+ - **name** (required): Project name in PascalCase (e.g., `MyProject`)
16
+ - **description** (optional): Project description
17
+
18
+ ## Project Structure
19
+
20
+ ```
21
+ {ProjectName}/
22
+ ├── .gitignore
23
+ ├── .claudeignore
24
+ ├── README.md
25
+ ├── CLAUDE.md
26
+ ├── LICENSE
27
+ ├── Directory.Build.props
28
+ ├── {ProjectName}.sln
29
+
30
+ ├── src/
31
+ │ ├── {ProjectName}.Domain/
32
+ │ │ ├── {ProjectName}.Domain.csproj
33
+ │ │ ├── Common/
34
+ │ │ │ ├── BaseEntity.cs
35
+ │ │ │ ├── IAuditableEntity.cs
36
+ │ │ │ └── IDomainEvent.cs
37
+ │ │ ├── Entities/
38
+ │ │ ├── Enums/
39
+ │ │ ├── Exceptions/
40
+ │ │ │ └── DomainException.cs
41
+ │ │ └── ValueObjects/
42
+ │ │
43
+ │ ├── {ProjectName}.Application/
44
+ │ │ ├── {ProjectName}.Application.csproj
45
+ │ │ ├── Common/
46
+ │ │ │ ├── Behaviors/
47
+ │ │ │ │ ├── ValidationBehavior.cs
48
+ │ │ │ │ └── LoggingBehavior.cs
49
+ │ │ │ ├── Interfaces/
50
+ │ │ │ │ ├── IApplicationDbContext.cs
51
+ │ │ │ │ └── ICurrentUserService.cs
52
+ │ │ │ └── Models/
53
+ │ │ │ └── Result.cs
54
+ │ │ ├── Features/
55
+ │ │ │ └── .gitkeep
56
+ │ │ └── DependencyInjection.cs
57
+ │ │
58
+ │ ├── {ProjectName}.Infrastructure/
59
+ │ │ ├── {ProjectName}.Infrastructure.csproj
60
+ │ │ ├── Persistence/
61
+ │ │ │ ├── ApplicationDbContext.cs
62
+ │ │ │ ├── Configurations/
63
+ │ │ │ │ └── .gitkeep
64
+ │ │ │ ├── Migrations/
65
+ │ │ │ │ └── .gitkeep
66
+ │ │ │ └── Seeding/
67
+ │ │ │ └── DatabaseSeeder.cs
68
+ │ │ ├── Services/
69
+ │ │ │ └── DateTimeService.cs
70
+ │ │ └── DependencyInjection.cs
71
+ │ │
72
+ │ ├── {ProjectName}.Api.Core/
73
+ │ │ ├── {ProjectName}.Api.Core.csproj
74
+ │ │ ├── Controllers/
75
+ │ │ │ └── BaseApiController.cs
76
+ │ │ ├── Extensions/
77
+ │ │ │ └── ServiceCollectionExtensions.cs
78
+ │ │ ├── Middleware/
79
+ │ │ │ └── ExceptionHandlingMiddleware.cs
80
+ │ │ └── Hubs/
81
+ │ │ └── NotificationHub.cs
82
+ │ │
83
+ │ └── {ProjectName}.Api/
84
+ │ ├── {ProjectName}.Api.csproj
85
+ │ ├── Properties/
86
+ │ │ └── launchSettings.json
87
+ │ ├── appsettings.json
88
+ │ ├── appsettings.Development.json
89
+ │ ├── appsettings.Production.json
90
+ │ └── Program.cs
91
+
92
+ ├── web/
93
+ │ └── {project-name}-web/
94
+ │ ├── package.json
95
+ │ ├── tsconfig.json
96
+ │ ├── tsconfig.app.json
97
+ │ ├── tsconfig.node.json
98
+ │ ├── vite.config.ts
99
+ │ ├── eslint.config.mjs
100
+ │ ├── tailwind.config.js
101
+ │ ├── postcss.config.js
102
+ │ ├── index.html
103
+ │ ├── .env.example
104
+ │ └── src/
105
+ │ ├── main.tsx
106
+ │ ├── App.tsx
107
+ │ ├── index.css
108
+ │ ├── vite-env.d.ts
109
+ │ ├── components/
110
+ │ │ ├── layout/
111
+ │ │ │ ├── Header.tsx
112
+ │ │ │ ├── Sidebar.tsx
113
+ │ │ │ └── Footer.tsx
114
+ │ │ └── ui/
115
+ │ │ ├── Button.tsx
116
+ │ │ └── Card.tsx
117
+ │ ├── pages/
118
+ │ │ ├── HomePage.tsx
119
+ │ │ └── NotFoundPage.tsx
120
+ │ ├── hooks/
121
+ │ │ └── useApi.ts
122
+ │ ├── contexts/
123
+ │ │ ├── AuthContext.tsx
124
+ │ │ └── ThemeContext.tsx
125
+ │ ├── services/
126
+ │ │ └── api/
127
+ │ │ └── client.ts
128
+ │ ├── types/
129
+ │ │ └── index.ts
130
+ │ ├── utils/
131
+ │ │ └── helpers.ts
132
+ │ └── config/
133
+ │ └── constants.ts
134
+
135
+ ├── tests/
136
+ │ └── {ProjectName}.Tests/
137
+ │ └── {ProjectName}.Tests.csproj
138
+
139
+ └── tools/
140
+ └── .gitkeep
141
+ ```
142
+
143
+ ## Workflow
144
+
145
+ ### 1. PARSE & VALIDATE
146
+
147
+ Extract from `$ARGUMENTS`:
148
+ ```
149
+ name: PascalCase project name (e.g., "MyProject")
150
+ description: Optional description
151
+ ```
152
+
153
+ Validate:
154
+ - Name is PascalCase: `^[A-Z][a-zA-Z0-9]*$`
155
+ - Directory doesn't exist
156
+ - Name is not a reserved word
157
+
158
+ ### 2. CREATE ROOT STRUCTURE
159
+
160
+ Use Bash to create directories:
161
+ ```bash
162
+ mkdir -p {ProjectName}/src
163
+ mkdir -p {ProjectName}/web
164
+ mkdir -p {ProjectName}/tests
165
+ mkdir -p {ProjectName}/tools
166
+ mkdir -p {ProjectName}/scripts
167
+ ```
168
+
169
+ ### 3. GENERATE BACKEND FILES
170
+
171
+ For each backend project, use Write tool to create:
172
+
173
+ #### 3.1 Directory.Build.props
174
+ ```xml
175
+ <Project>
176
+ <PropertyGroup>
177
+ <TargetFramework>net10.0</TargetFramework>
178
+ <ImplicitUsings>enable</ImplicitUsings>
179
+ <Nullable>enable</Nullable>
180
+ <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
181
+ <Version>1.0.0</Version>
182
+ <Authors>{Author}</Authors>
183
+ <Company>{Company}</Company>
184
+ </PropertyGroup>
185
+ </Project>
186
+ ```
187
+
188
+ #### 3.2 Solution File ({ProjectName}.sln)
189
+ Use `dotnet new sln` and `dotnet sln add` commands.
190
+
191
+ #### 3.3 Domain Project
192
+ - Create .csproj with MediatR.Contracts
193
+ - Create BaseEntity.cs, IDomainEvent.cs
194
+ - Create folder structure
195
+
196
+ #### 3.4 Application Project
197
+ - Create .csproj with MediatR, FluentValidation
198
+ - Create Result.cs, ValidationBehavior.cs
199
+ - Create DependencyInjection.cs
200
+
201
+ #### 3.5 Infrastructure Project
202
+ - Create .csproj with EF Core, SqlServer
203
+ - Create ApplicationDbContext.cs
204
+ - Create DependencyInjection.cs
205
+
206
+ #### 3.6 Api.Core Project
207
+ - Create .csproj with ASP.NET Core
208
+ - Create BaseApiController.cs
209
+ - Create ExceptionHandlingMiddleware.cs
210
+
211
+ #### 3.7 Api Project
212
+ - Create .csproj as entry point
213
+ - Create Program.cs with full bootstrap
214
+ - Create appsettings.json files
215
+
216
+ ### 4. GENERATE FRONTEND FILES
217
+
218
+ #### 4.1 package.json
219
+ ```json
220
+ {
221
+ "name": "{project-name}-web",
222
+ "private": true,
223
+ "version": "1.0.0",
224
+ "type": "module",
225
+ "scripts": {
226
+ "dev": "vite",
227
+ "build": "tsc -b && vite build",
228
+ "lint": "eslint .",
229
+ "preview": "vite preview"
230
+ },
231
+ "dependencies": {
232
+ "react": "^19.0.0",
233
+ "react-dom": "^19.0.0",
234
+ "react-router-dom": "^7.0.0",
235
+ "axios": "^1.7.0",
236
+ "@microsoft/signalr": "^8.0.0",
237
+ "lucide-react": "^0.400.0"
238
+ },
239
+ "devDependencies": {
240
+ "@types/react": "^19.0.0",
241
+ "@types/react-dom": "^19.0.0",
242
+ "@vitejs/plugin-react": "^4.3.0",
243
+ "typescript": "~5.6.0",
244
+ "vite": "^6.0.0",
245
+ "tailwindcss": "^4.0.0",
246
+ "@tailwindcss/vite": "^4.0.0",
247
+ "eslint": "^9.0.0"
248
+ }
249
+ }
250
+ ```
251
+
252
+ #### 4.2 vite.config.ts
253
+ ```typescript
254
+ import { defineConfig } from 'vite'
255
+ import react from '@vitejs/plugin-react'
256
+ import tailwindcss from '@tailwindcss/vite'
257
+
258
+ export default defineConfig({
259
+ plugins: [react(), tailwindcss()],
260
+ server: {
261
+ port: 5173,
262
+ proxy: {
263
+ '/api': 'http://localhost:5000'
264
+ }
265
+ }
266
+ })
267
+ ```
268
+
269
+ #### 4.3 React Components
270
+ - Create App.tsx with router setup
271
+ - Create basic layout components
272
+ - Create context providers
273
+ - Create API client
274
+
275
+ ### 5. GENERATE CONFIGURATION FILES
276
+
277
+ #### .gitignore
278
+ ```
279
+ # .NET
280
+ bin/
281
+ obj/
282
+ *.user
283
+ *.suo
284
+ appsettings.Local.json
285
+
286
+ # Node
287
+ node_modules/
288
+ dist/
289
+ .env.local
290
+
291
+ # IDE
292
+ .vs/
293
+ .vscode/
294
+ .idea/
295
+
296
+ # OS
297
+ .DS_Store
298
+ Thumbs.db
299
+
300
+ # Logs
301
+ *.log
302
+ logs/
303
+ ```
304
+
305
+ #### CLAUDE.md
306
+ ```markdown
307
+ # {ProjectName} Architecture Memory
308
+
309
+ ## Project Overview
310
+ {description}
311
+
312
+ ## Technology Stack
313
+ - Backend: .NET 10, EF Core, Clean Architecture
314
+ - Frontend: React 19, TypeScript, Vite, Tailwind CSS
315
+ - Database: SQL Server
316
+
317
+ ## Architecture
318
+ Clean Architecture with CQRS pattern.
319
+
320
+ ## Conventions
321
+ - Use MediatR for commands/queries
322
+ - Use FluentValidation for validation
323
+ - Use Result<T> for operation results
324
+ ```
325
+
326
+ ### 6. INITIALIZE GIT & DOTNET
327
+
328
+ ```bash
329
+ cd {ProjectName}
330
+ git init
331
+ dotnet new sln -n {ProjectName}
332
+ dotnet sln add src/{ProjectName}.Domain
333
+ dotnet sln add src/{ProjectName}.Application
334
+ dotnet sln add src/{ProjectName}.Infrastructure
335
+ dotnet sln add src/{ProjectName}.Api.Core
336
+ dotnet sln add src/{ProjectName}.Api
337
+ dotnet restore
338
+ ```
339
+
340
+ ### 7. DISPLAY SUCCESS
341
+
342
+ ```
343
+ ╔═══════════════════════════════════════════════════════════════╗
344
+ ║ SMARTSTACK PROJECT CREATED ║
345
+ ╠═══════════════════════════════════════════════════════════════╣
346
+ ║ Name: {ProjectName} ║
347
+ ║ Location: {full-path} ║
348
+ ╠═══════════════════════════════════════════════════════════════╣
349
+ ║ Backend: ║
350
+ ║ ✓ {ProjectName}.Domain (Core entities) ║
351
+ ║ ✓ {ProjectName}.Application (CQRS, Use cases) ║
352
+ ║ ✓ {ProjectName}.Infrastructure (EF Core, Services) ║
353
+ ║ ✓ {ProjectName}.Api.Core (Controllers, Middleware) ║
354
+ ║ ✓ {ProjectName}.Api (Entry point) ║
355
+ ╠═══════════════════════════════════════════════════════════════╣
356
+ ║ Frontend: ║
357
+ ║ ✓ {project-name}-web (React + Vite + Tailwind) ║
358
+ ╠═══════════════════════════════════════════════════════════════╣
359
+ ║ Next steps: ║
360
+ ║ 1. cd {ProjectName} ║
361
+ ║ 2. dotnet build ║
362
+ ║ 3. cd web/{project-name}-web && npm install ║
363
+ ║ 4. Configure appsettings.Local.json ║
364
+ ║ 5. dotnet ef database update ║
365
+ ║ 6. dotnet run --project src/{ProjectName}.Api ║
366
+ ║ 7. npm run dev (in web folder) ║
367
+ ╚═══════════════════════════════════════════════════════════════╝
368
+ ```
369
+
370
+ ## File Templates
371
+
372
+ ### Domain/BaseEntity.cs
373
+ ```csharp
374
+ namespace {ProjectName}.Domain.Common;
375
+
376
+ public abstract class BaseEntity
377
+ {
378
+ public Guid Id { get; protected set; } = Guid.NewGuid();
379
+ public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
380
+ public DateTime? UpdatedAt { get; set; }
381
+ public string? CreatedBy { get; set; }
382
+ public string? UpdatedBy { get; set; }
383
+ }
384
+ ```
385
+
386
+ ### Application/Result.cs
387
+ ```csharp
388
+ namespace {ProjectName}.Application.Common.Models;
389
+
390
+ public class Result<T>
391
+ {
392
+ public bool IsSuccess { get; }
393
+ public T? Value { get; }
394
+ public string? Error { get; }
395
+
396
+ private Result(bool isSuccess, T? value, string? error)
397
+ {
398
+ IsSuccess = isSuccess;
399
+ Value = value;
400
+ Error = error;
401
+ }
402
+
403
+ public static Result<T> Success(T value) => new(true, value, null);
404
+ public static Result<T> Failure(string error) => new(false, default, error);
405
+ }
406
+ ```
407
+
408
+ ### Infrastructure/ApplicationDbContext.cs
409
+ ```csharp
410
+ using Microsoft.EntityFrameworkCore;
411
+ using {ProjectName}.Application.Common.Interfaces;
412
+
413
+ namespace {ProjectName}.Infrastructure.Persistence;
414
+
415
+ public class ApplicationDbContext : DbContext, IApplicationDbContext
416
+ {
417
+ public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
418
+ : base(options)
419
+ {
420
+ }
421
+
422
+ protected override void OnModelCreating(ModelBuilder modelBuilder)
423
+ {
424
+ modelBuilder.ApplyConfigurationsFromAssembly(typeof(ApplicationDbContext).Assembly);
425
+ base.OnModelCreating(modelBuilder);
426
+ }
427
+ }
428
+ ```
429
+
430
+ ### Api/Program.cs
431
+ ```csharp
432
+ using {ProjectName}.Application;
433
+ using {ProjectName}.Infrastructure;
434
+ using {ProjectName}.Api.Core.Extensions;
435
+
436
+ var builder = WebApplication.CreateBuilder(args);
437
+
438
+ // Add services
439
+ builder.Services.AddApplication();
440
+ builder.Services.AddInfrastructure(builder.Configuration);
441
+ builder.Services.AddApiCore();
442
+
443
+ builder.Services.AddControllers();
444
+ builder.Services.AddEndpointsApiExplorer();
445
+ builder.Services.AddSwaggerGen();
446
+ builder.Services.AddSignalR();
447
+
448
+ var app = builder.Build();
449
+
450
+ // Configure pipeline
451
+ if (app.Environment.IsDevelopment())
452
+ {
453
+ app.UseSwagger();
454
+ app.UseSwaggerUI();
455
+ }
456
+
457
+ app.UseHttpsRedirection();
458
+ app.UseAuthentication();
459
+ app.UseAuthorization();
460
+ app.MapControllers();
461
+ app.MapHub<NotificationHub>("/hubs/notifications");
462
+
463
+ app.Run();
464
+ ```
465
+
466
+ ### Frontend/App.tsx
467
+ ```tsx
468
+ import { BrowserRouter, Routes, Route } from 'react-router-dom';
469
+ import { AuthProvider } from './contexts/AuthContext';
470
+ import { ThemeProvider } from './contexts/ThemeContext';
471
+ import HomePage from './pages/HomePage';
472
+ import NotFoundPage from './pages/NotFoundPage';
473
+
474
+ function App() {
475
+ return (
476
+ <ThemeProvider>
477
+ <AuthProvider>
478
+ <BrowserRouter>
479
+ <Routes>
480
+ <Route path="/" element={<HomePage />} />
481
+ <Route path="*" element={<NotFoundPage />} />
482
+ </Routes>
483
+ </BrowserRouter>
484
+ </AuthProvider>
485
+ </ThemeProvider>
486
+ );
487
+ }
488
+
489
+ export default App;
490
+ ```
491
+
492
+ ## Execution Rules
493
+
494
+ 1. **ALWAYS** create all directories before files
495
+ 2. **USE** Write tool for each file (not batch)
496
+ 3. **USE** Bash for dotnet commands
497
+ 4. **VALIDATE** project name is PascalCase
498
+ 5. **NEVER** overwrite existing directories
499
+ 6. Create files in this order: root → backend → frontend → config
500
+
501
+ ## Priority
502
+
503
+ Correctness > Completeness > Speed
504
+
505
+ ---
506
+
507
+ User: $ARGUMENTS