appiq-solution 1.4.3 → 1.4.4

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 (90) hide show
  1. package/#Tools/APPIQ-METHOD/.cursor/commands/analyze.md +1 -1
  2. package/#Tools/APPIQ-METHOD/.cursor/commands/appiq.md +1 -1
  3. package/#Tools/APPIQ-METHOD/.cursor/commands/help.md +1 -1
  4. package/#Tools/APPIQ-METHOD/.cursor/commands/story.md +1 -1
  5. package/#Tools/APPIQ-METHOD/bmad-core/agents/init-flow-po.md +219 -0
  6. package/#Tools/APPIQ-METHOD/commands/analyze.md +1 -1
  7. package/#Tools/APPIQ-METHOD/commands/appiq.md +1 -1
  8. package/#Tools/APPIQ-METHOD/commands/help.md +1 -1
  9. package/#Tools/APPIQ-METHOD/commands/story.md +1 -1
  10. package/#Tools/APPIQ-METHOD/package.json +1 -1
  11. package/#Tools/APPIQ-METHOD/tools/setup-ide-commands.js +40 -37
  12. package/#Tools/APPIQ-METHOD/tools/smart-installer.js +16 -13
  13. package/bmad-core/agent-teams/team-all.yaml +14 -0
  14. package/bmad-core/agent-teams/team-flutter-mobile.yaml +114 -0
  15. package/bmad-core/agent-teams/team-fullstack.yaml +28 -0
  16. package/bmad-core/agent-teams/team-ide-minimal.yaml +10 -0
  17. package/bmad-core/agent-teams/team-no-ui.yaml +13 -0
  18. package/bmad-core/agents/analyst.md +85 -0
  19. package/bmad-core/agents/architect.md +90 -0
  20. package/bmad-core/agents/bmad-master.md +108 -0
  21. package/bmad-core/agents/bmad-orchestrator.md +150 -0
  22. package/bmad-core/agents/bmad-smart-launcher.md +170 -0
  23. package/bmad-core/agents/dev.md +95 -0
  24. package/bmad-core/agents/init-flow-po.md +219 -0
  25. package/bmad-core/agents/pm.md +85 -0
  26. package/bmad-core/agents/po.md +76 -0
  27. package/bmad-core/agents/qa.md +86 -0
  28. package/bmad-core/agents/sm.md +67 -0
  29. package/bmad-core/agents/ux-expert.md +71 -0
  30. package/bmad-core/bmad-core/user-guide.md +0 -0
  31. package/bmad-core/checklists/architect-checklist.md +443 -0
  32. package/bmad-core/checklists/change-checklist.md +182 -0
  33. package/bmad-core/checklists/pm-checklist.md +375 -0
  34. package/bmad-core/checklists/po-master-checklist.md +441 -0
  35. package/bmad-core/checklists/security-validation-checklist.md +332 -0
  36. package/bmad-core/checklists/story-dod-checklist.md +101 -0
  37. package/bmad-core/checklists/story-draft-checklist.md +156 -0
  38. package/bmad-core/core-config.yaml +20 -0
  39. package/bmad-core/core-config.yaml.bak +20 -0
  40. package/bmad-core/data/backend-services-integration.md +686 -0
  41. package/bmad-core/data/bmad-kb.md +803 -0
  42. package/bmad-core/data/brainstorming-techniques.md +36 -0
  43. package/bmad-core/data/elicitation-methods.md +134 -0
  44. package/bmad-core/data/shadcn-ui-integration.md +388 -0
  45. package/bmad-core/data/technical-preferences.md +149 -0
  46. package/bmad-core/enhanced-ide-development-workflow.md +43 -0
  47. package/bmad-core/tasks/advanced-elicitation.md +117 -0
  48. package/bmad-core/tasks/brownfield-create-epic.md +160 -0
  49. package/bmad-core/tasks/brownfield-create-story.md +147 -0
  50. package/bmad-core/tasks/correct-course.md +70 -0
  51. package/bmad-core/tasks/create-brownfield-story.md +304 -0
  52. package/bmad-core/tasks/create-deep-research-prompt.md +289 -0
  53. package/bmad-core/tasks/create-flutter-story.md +197 -0
  54. package/bmad-core/tasks/create-next-story.md +112 -0
  55. package/bmad-core/tasks/document-project.md +341 -0
  56. package/bmad-core/tasks/facilitate-brainstorming-session.md +136 -0
  57. package/bmad-core/tasks/generate-ai-frontend-prompt.md +51 -0
  58. package/bmad-core/tasks/index-docs.md +179 -0
  59. package/bmad-core/tasks/intelligent-epic-creation.md +234 -0
  60. package/bmad-core/tasks/kb-mode-interaction.md +75 -0
  61. package/bmad-core/tasks/review-story.md +145 -0
  62. package/bmad-core/tasks/shard-doc.md +187 -0
  63. package/bmad-core/tasks/smart-project-analysis.md +289 -0
  64. package/bmad-core/tasks/validate-next-story.md +134 -0
  65. package/bmad-core/templates/architecture-tmpl.yaml +650 -0
  66. package/bmad-core/templates/brainstorming-output-tmpl.yaml +156 -0
  67. package/bmad-core/templates/brownfield-architecture-tmpl.yaml +476 -0
  68. package/bmad-core/templates/brownfield-prd-tmpl.yaml +280 -0
  69. package/bmad-core/templates/competitor-analysis-tmpl.yaml +293 -0
  70. package/bmad-core/templates/flutter-mobile-prd-tmpl.yaml +330 -0
  71. package/bmad-core/templates/flutter-story-tmpl.yaml +376 -0
  72. package/bmad-core/templates/flutter-ui-spec-tmpl.yaml +415 -0
  73. package/bmad-core/templates/front-end-architecture-tmpl.yaml +206 -0
  74. package/bmad-core/templates/front-end-spec-tmpl.yaml +349 -0
  75. package/bmad-core/templates/fullstack-architecture-tmpl.yaml +812 -0
  76. package/bmad-core/templates/market-research-tmpl.yaml +252 -0
  77. package/bmad-core/templates/prd-tmpl.yaml +202 -0
  78. package/bmad-core/templates/project-brief-tmpl.yaml +221 -0
  79. package/bmad-core/templates/story-tmpl.yaml +137 -0
  80. package/bmad-core/user-guide.md +251 -0
  81. package/bmad-core/workflows/brownfield-fullstack.yaml +311 -0
  82. package/bmad-core/workflows/brownfield-service.yaml +187 -0
  83. package/bmad-core/workflows/brownfield-ui.yaml +197 -0
  84. package/bmad-core/workflows/greenfield-fullstack.yaml +284 -0
  85. package/bmad-core/workflows/greenfield-service.yaml +206 -0
  86. package/bmad-core/workflows/greenfield-ui.yaml +235 -0
  87. package/bmad-core/working-in-the-brownfield.md +373 -0
  88. package/package.json +1 -1
  89. package/tools/setup-ide-commands.js +40 -37
  90. package/tools/smart-installer.js +16 -13
@@ -0,0 +1,812 @@
1
+ template:
2
+ id: fullstack-architecture-template-v2
3
+ name: Fullstack Architecture Document
4
+ version: 2.0
5
+ output:
6
+ format: markdown
7
+ filename: docs/architecture.md
8
+ title: "{{project_name}} Fullstack Architecture Document"
9
+
10
+ workflow:
11
+ mode: interactive
12
+ elicitation: advanced-elicitation
13
+
14
+ sections:
15
+ - id: introduction
16
+ title: Introduction
17
+ instruction: |
18
+ If available, review any provided relevant documents to gather all relevant context before beginning. At minimum, you should have access to docs/prd.md and docs/front-end-spec.md. Ask the user for any documents you need but cannot locate. This template creates a unified architecture that covers both backend and frontend concerns to guide AI-driven fullstack development.
19
+ elicit: true
20
+ content: |
21
+ This document outlines the complete fullstack architecture for {{project_name}}, including backend systems, frontend implementation, and their integration. It serves as the single source of truth for AI-driven development, ensuring consistency across the entire technology stack.
22
+
23
+ This unified approach combines what would traditionally be separate backend and frontend architecture documents, streamlining the development process for modern fullstack applications where these concerns are increasingly intertwined.
24
+ sections:
25
+ - id: starter-template
26
+ title: Starter Template or Existing Project
27
+ instruction: |
28
+ Before proceeding with architecture design, check if the project is based on any starter templates or existing codebases:
29
+
30
+ 1. Review the PRD and other documents for mentions of:
31
+ - Fullstack starter templates (e.g., T3 Stack, MEAN/MERN starters, Django + React templates)
32
+ - Monorepo templates (e.g., Nx, Turborepo starters)
33
+ - Platform-specific starters (e.g., Vercel templates, AWS Amplify starters)
34
+ - Existing projects being extended or cloned
35
+
36
+ 2. If starter templates or existing projects are mentioned:
37
+ - Ask the user to provide access (links, repos, or files)
38
+ - Analyze to understand pre-configured choices and constraints
39
+ - Note any architectural decisions already made
40
+ - Identify what can be modified vs what must be retained
41
+
42
+ 3. If no starter is mentioned but this is greenfield:
43
+ - Suggest appropriate fullstack starters based on tech preferences
44
+ - Consider platform-specific options (Vercel, AWS, etc.)
45
+ - Let user decide whether to use one
46
+
47
+ 4. Document the decision and any constraints it imposes
48
+
49
+ If none, state "N/A - Greenfield project"
50
+ - id: changelog
51
+ title: Change Log
52
+ type: table
53
+ columns: [Date, Version, Description, Author]
54
+ instruction: Track document versions and changes
55
+
56
+ - id: high-level-architecture
57
+ title: High Level Architecture
58
+ instruction: This section contains multiple subsections that establish the foundation. Present all subsections together, then elicit feedback on the complete section.
59
+ elicit: true
60
+ sections:
61
+ - id: technical-summary
62
+ title: Technical Summary
63
+ instruction: |
64
+ Provide a comprehensive overview (4-6 sentences) covering:
65
+ - Overall architectural style and deployment approach
66
+ - Frontend framework and backend technology choices
67
+ - Key integration points between frontend and backend
68
+ - Infrastructure platform and services
69
+ - How this architecture achieves PRD goals
70
+ - id: platform-infrastructure
71
+ title: Platform and Infrastructure Choice
72
+ instruction: |
73
+ Based on PRD requirements and technical assumptions, make a platform recommendation:
74
+
75
+ 1. Consider common patterns (not an exhaustive list, use your own best judgement and search the web as needed for emerging trends):
76
+ - **Vercel + Supabase**: For rapid development with Next.js, built-in auth/storage
77
+ - **AWS Full Stack**: For enterprise scale with Lambda, API Gateway, S3, Cognito
78
+ - **Azure**: For .NET ecosystems or enterprise Microsoft environments
79
+ - **Google Cloud**: For ML/AI heavy applications or Google ecosystem integration
80
+
81
+ 2. Present 2-3 viable options with clear pros/cons
82
+ 3. Make a recommendation with rationale
83
+ 4. Get explicit user confirmation
84
+
85
+ Document the choice and key services that will be used.
86
+ template: |
87
+ **Platform:** {{selected_platform}}
88
+ **Key Services:** {{core_services_list}}
89
+ **Deployment Host and Regions:** {{regions}}
90
+ - id: repository-structure
91
+ title: Repository Structure
92
+ instruction: |
93
+ Define the repository approach based on PRD requirements and platform choice, explain your rationale or ask questions to the user if unsure:
94
+
95
+ 1. For modern fullstack apps, monorepo is often preferred
96
+ 2. Consider tooling (Nx, Turborepo, Lerna, npm workspaces)
97
+ 3. Define package/app boundaries
98
+ 4. Plan for shared code between frontend and backend
99
+ template: |
100
+ **Structure:** {{repo_structure_choice}}
101
+ **Monorepo Tool:** {{monorepo_tool_if_applicable}}
102
+ **Package Organization:** {{package_strategy}}
103
+ - id: architecture-diagram
104
+ title: High Level Architecture Diagram
105
+ type: mermaid
106
+ mermaid_type: graph
107
+ instruction: |
108
+ Create a Mermaid diagram showing the complete system architecture including:
109
+ - User entry points (web, mobile)
110
+ - Frontend application deployment
111
+ - API layer (REST/GraphQL)
112
+ - Backend services
113
+ - Databases and storage
114
+ - External integrations
115
+ - CDN and caching layers
116
+
117
+ Use appropriate diagram type for clarity.
118
+ - id: architectural-patterns
119
+ title: Architectural Patterns
120
+ instruction: |
121
+ List patterns that will guide both frontend and backend development. Include patterns for:
122
+ - Overall architecture (e.g., Jamstack, Serverless, Microservices)
123
+ - Frontend patterns (e.g., Component-based, State management)
124
+ - Backend patterns (e.g., Repository, CQRS, Event-driven)
125
+ - Integration patterns (e.g., BFF, API Gateway)
126
+
127
+ For each pattern, provide recommendation and rationale.
128
+ repeatable: true
129
+ template: "- **{{pattern_name}}:** {{pattern_description}} - _Rationale:_ {{rationale}}"
130
+ examples:
131
+ - "**Jamstack Architecture:** Static site generation with serverless APIs - _Rationale:_ Optimal performance and scalability for content-heavy applications"
132
+ - "**Component-Based UI:** Reusable React components with TypeScript - _Rationale:_ Maintainability and type safety across large codebases"
133
+ - "**Repository Pattern:** Abstract data access logic - _Rationale:_ Enables testing and future database migration flexibility"
134
+ - "**API Gateway Pattern:** Single entry point for all API calls - _Rationale:_ Centralized auth, rate limiting, and monitoring"
135
+
136
+ - id: tech-stack
137
+ title: Tech Stack
138
+ instruction: |
139
+ This is the DEFINITIVE technology selection for the entire project. Work with user to finalize all choices. This table is the single source of truth - all development must use these exact versions.
140
+
141
+ Key areas to cover:
142
+ - Frontend and backend languages/frameworks
143
+ - Databases and caching
144
+ - Authentication and authorization
145
+ - API approach
146
+ - Testing tools for both frontend and backend
147
+ - Build and deployment tools
148
+ - Monitoring and logging
149
+
150
+ Upon render, elicit feedback immediately.
151
+ elicit: true
152
+ sections:
153
+ - id: tech-stack-table
154
+ title: Technology Stack Table
155
+ type: table
156
+ columns: [Category, Technology, Version, Purpose, Rationale]
157
+ rows:
158
+ - ["Frontend Language", "{{fe_language}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
159
+ - ["Frontend Framework", "{{fe_framework}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
160
+ - ["UI Component Library", "{{ui_library}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
161
+ - ["UI Design System", "{{ui_design_system}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
162
+ - ["State Management", "{{state_mgmt}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
163
+ - ["Mobile Framework", "{{mobile_framework}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
164
+ - ["Mobile State Management", "{{mobile_state_mgmt}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
165
+ - ["Backend Language", "{{be_language}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
166
+ - ["Backend Framework", "{{be_framework}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
167
+ - ["Backend Service", "{{backend_service}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
168
+ - ["API Style", "{{api_style}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
169
+ - ["Database", "{{database}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
170
+ - ["Cache", "{{cache}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
171
+ - ["File Storage", "{{storage}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
172
+ - ["Authentication", "{{auth}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
173
+ - ["Real-time", "{{realtime}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
174
+ - ["Frontend Testing", "{{fe_test}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
175
+ - ["Mobile Testing", "{{mobile_test}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
176
+ - ["Backend Testing", "{{be_test}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
177
+ - ["E2E Testing", "{{e2e_test}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
178
+ - ["Build Tool", "{{build_tool}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
179
+ - ["Bundler", "{{bundler}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
180
+ - ["IaC Tool", "{{iac_tool}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
181
+ - ["CI/CD", "{{cicd}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
182
+ - ["Monitoring", "{{monitoring}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
183
+ - ["Logging", "{{logging}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
184
+ - ["CSS Framework", "{{css_framework}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
185
+ - ["Localization", "{{localization}}", "{{version}}", "{{purpose}}", "{{why_chosen}}"]
186
+
187
+ - id: data-models
188
+ title: Data Models
189
+ instruction: |
190
+ Define the core data models/entities that will be shared between frontend and backend:
191
+
192
+ 1. Review PRD requirements and identify key business entities
193
+ 2. For each model, explain its purpose and relationships
194
+ 3. Include key attributes and data types
195
+ 4. Show relationships between models
196
+ 5. Create TypeScript interfaces that can be shared
197
+ 6. Discuss design decisions with user
198
+
199
+ Create a clear conceptual model before moving to database schema.
200
+ elicit: true
201
+ repeatable: true
202
+ sections:
203
+ - id: model
204
+ title: "{{model_name}}"
205
+ template: |
206
+ **Purpose:** {{model_purpose}}
207
+
208
+ **Key Attributes:**
209
+ - {{attribute_1}}: {{type_1}} - {{description_1}}
210
+ - {{attribute_2}}: {{type_2}} - {{description_2}}
211
+ sections:
212
+ - id: typescript-interface
213
+ title: TypeScript Interface
214
+ type: code
215
+ language: typescript
216
+ template: "{{model_interface}}"
217
+ - id: relationships
218
+ title: Relationships
219
+ type: bullet-list
220
+ template: "- {{relationship}}"
221
+
222
+ - id: api-spec
223
+ title: API Specification
224
+ instruction: |
225
+ Based on the chosen API style from Tech Stack:
226
+
227
+ 1. If REST API, create an OpenAPI 3.0 specification
228
+ 2. If GraphQL, provide the GraphQL schema
229
+ 3. If tRPC, show router definitions
230
+ 4. Include all endpoints from epics/stories
231
+ 5. Define request/response schemas based on data models
232
+ 6. Document authentication requirements
233
+ 7. Include example requests/responses
234
+
235
+ Use appropriate format for the chosen API style. If no API (e.g., static site), skip this section.
236
+ elicit: true
237
+ sections:
238
+ - id: rest-api
239
+ title: REST API Specification
240
+ condition: API style is REST
241
+ type: code
242
+ language: yaml
243
+ template: |
244
+ openapi: 3.0.0
245
+ info:
246
+ title: {{api_title}}
247
+ version: {{api_version}}
248
+ description: {{api_description}}
249
+ servers:
250
+ - url: {{server_url}}
251
+ description: {{server_description}}
252
+ - id: graphql-api
253
+ title: GraphQL Schema
254
+ condition: API style is GraphQL
255
+ type: code
256
+ language: graphql
257
+ template: "{{graphql_schema}}"
258
+ - id: trpc-api
259
+ title: tRPC Router Definitions
260
+ condition: API style is tRPC
261
+ type: code
262
+ language: typescript
263
+ template: "{{trpc_routers}}"
264
+
265
+ - id: components
266
+ title: Components
267
+ instruction: |
268
+ Based on the architectural patterns, tech stack, and data models from above:
269
+
270
+ 1. Identify major logical components/services across the fullstack
271
+ 2. Consider both frontend and backend components
272
+ 3. Define clear boundaries and interfaces between components
273
+ 4. For each component, specify:
274
+ - Primary responsibility
275
+ - Key interfaces/APIs exposed
276
+ - Dependencies on other components
277
+ - Technology specifics based on tech stack choices
278
+
279
+ 5. Create component diagrams where helpful
280
+ elicit: true
281
+ sections:
282
+ - id: component-list
283
+ repeatable: true
284
+ title: "{{component_name}}"
285
+ template: |
286
+ **Responsibility:** {{component_description}}
287
+
288
+ **Key Interfaces:**
289
+ - {{interface_1}}
290
+ - {{interface_2}}
291
+
292
+ **Dependencies:** {{dependencies}}
293
+
294
+ **Technology Stack:** {{component_tech_details}}
295
+ - id: component-diagrams
296
+ title: Component Diagrams
297
+ type: mermaid
298
+ instruction: |
299
+ Create Mermaid diagrams to visualize component relationships. Options:
300
+ - C4 Container diagram for high-level view
301
+ - Component diagram for detailed internal structure
302
+ - Sequence diagrams for complex interactions
303
+ Choose the most appropriate for clarity
304
+
305
+ - id: external-apis
306
+ title: External APIs
307
+ condition: Project requires external API integrations
308
+ instruction: |
309
+ For each external service integration:
310
+
311
+ 1. Identify APIs needed based on PRD requirements and component design
312
+ 2. If documentation URLs are unknown, ask user for specifics
313
+ 3. Document authentication methods and security considerations
314
+ 4. List specific endpoints that will be used
315
+ 5. Note any rate limits or usage constraints
316
+
317
+ If no external APIs are needed, state this explicitly and skip to next section.
318
+ elicit: true
319
+ repeatable: true
320
+ sections:
321
+ - id: api
322
+ title: "{{api_name}} API"
323
+ template: |
324
+ - **Purpose:** {{api_purpose}}
325
+ - **Documentation:** {{api_docs_url}}
326
+ - **Base URL(s):** {{api_base_url}}
327
+ - **Authentication:** {{auth_method}}
328
+ - **Rate Limits:** {{rate_limits}}
329
+
330
+ **Key Endpoints Used:**
331
+ - `{{method}} {{endpoint_path}}` - {{endpoint_purpose}}
332
+
333
+ **Integration Notes:** {{integration_considerations}}
334
+
335
+ - id: core-workflows
336
+ title: Core Workflows
337
+ type: mermaid
338
+ mermaid_type: sequence
339
+ instruction: |
340
+ Illustrate key system workflows using sequence diagrams:
341
+
342
+ 1. Identify critical user journeys from PRD
343
+ 2. Show component interactions including external APIs
344
+ 3. Include both frontend and backend flows
345
+ 4. Include error handling paths
346
+ 5. Document async operations
347
+ 6. Create both high-level and detailed diagrams as needed
348
+
349
+ Focus on workflows that clarify architecture decisions or complex interactions.
350
+ elicit: true
351
+
352
+ - id: database-schema
353
+ title: Database Schema
354
+ instruction: |
355
+ Transform the conceptual data models into concrete database schemas:
356
+
357
+ 1. Use the database type(s) selected in Tech Stack
358
+ 2. Create schema definitions using appropriate notation
359
+ 3. Include indexes, constraints, and relationships
360
+ 4. Consider performance and scalability
361
+ 5. For NoSQL, show document structures
362
+
363
+ Present schema in format appropriate to database type (SQL DDL, JSON schema, etc.)
364
+ elicit: true
365
+
366
+ - id: frontend-architecture
367
+ title: Frontend Architecture
368
+ instruction: Define frontend-specific architecture details. After each subsection, note if user wants to refine before continuing.
369
+ elicit: true
370
+ sections:
371
+ - id: component-architecture
372
+ title: Component Architecture
373
+ instruction: Define component organization and patterns based on chosen framework.
374
+ sections:
375
+ - id: component-organization
376
+ title: Component Organization
377
+ type: code
378
+ language: text
379
+ template: "{{component_structure}}"
380
+ - id: component-template
381
+ title: Component Template
382
+ type: code
383
+ language: typescript
384
+ template: "{{component_template}}"
385
+ - id: state-management
386
+ title: State Management Architecture
387
+ instruction: Detail state management approach based on chosen solution.
388
+ sections:
389
+ - id: state-structure
390
+ title: State Structure
391
+ type: code
392
+ language: typescript
393
+ template: "{{state_structure}}"
394
+ - id: state-patterns
395
+ title: State Management Patterns
396
+ type: bullet-list
397
+ template: "- {{pattern}}"
398
+ - id: routing-architecture
399
+ title: Routing Architecture
400
+ instruction: Define routing structure based on framework choice.
401
+ sections:
402
+ - id: route-organization
403
+ title: Route Organization
404
+ type: code
405
+ language: text
406
+ template: "{{route_structure}}"
407
+ - id: protected-routes
408
+ title: Protected Route Pattern
409
+ type: code
410
+ language: typescript
411
+ template: "{{protected_route_example}}"
412
+ - id: frontend-services
413
+ title: Frontend Services Layer
414
+ instruction: Define how frontend communicates with backend.
415
+ sections:
416
+ - id: api-client-setup
417
+ title: API Client Setup
418
+ type: code
419
+ language: typescript
420
+ template: "{{api_client_setup}}"
421
+ - id: service-example
422
+ title: Service Example
423
+ type: code
424
+ language: typescript
425
+ template: "{{service_example}}"
426
+
427
+ - id: backend-architecture
428
+ title: Backend Architecture
429
+ instruction: Define backend-specific architecture details. Consider serverless vs traditional server approaches.
430
+ elicit: true
431
+ sections:
432
+ - id: service-architecture
433
+ title: Service Architecture
434
+ instruction: Based on platform choice, define service organization.
435
+ sections:
436
+ - id: serverless-architecture
437
+ condition: Serverless architecture chosen
438
+ sections:
439
+ - id: function-organization
440
+ title: Function Organization
441
+ type: code
442
+ language: text
443
+ template: "{{function_structure}}"
444
+ - id: function-template
445
+ title: Function Template
446
+ type: code
447
+ language: typescript
448
+ template: "{{function_template}}"
449
+ - id: traditional-server
450
+ condition: Traditional server architecture chosen
451
+ sections:
452
+ - id: controller-organization
453
+ title: Controller/Route Organization
454
+ type: code
455
+ language: text
456
+ template: "{{controller_structure}}"
457
+ - id: controller-template
458
+ title: Controller Template
459
+ type: code
460
+ language: typescript
461
+ template: "{{controller_template}}"
462
+ - id: database-architecture
463
+ title: Database Architecture
464
+ instruction: Define database schema and access patterns.
465
+ sections:
466
+ - id: schema-design
467
+ title: Schema Design
468
+ type: code
469
+ language: sql
470
+ template: "{{database_schema}}"
471
+ - id: data-access-layer
472
+ title: Data Access Layer
473
+ type: code
474
+ language: typescript
475
+ template: "{{repository_pattern}}"
476
+ - id: auth-architecture
477
+ title: Authentication and Authorization
478
+ instruction: Define auth implementation details.
479
+ sections:
480
+ - id: auth-flow
481
+ title: Auth Flow
482
+ type: mermaid
483
+ mermaid_type: sequence
484
+ template: "{{auth_flow_diagram}}"
485
+ - id: auth-middleware
486
+ title: Middleware/Guards
487
+ type: code
488
+ language: typescript
489
+ template: "{{auth_middleware}}"
490
+
491
+ - id: unified-project-structure
492
+ title: Unified Project Structure
493
+ instruction: Create a monorepo structure that accommodates both frontend and backend. Adapt based on chosen tools and frameworks.
494
+ elicit: true
495
+ type: code
496
+ language: plaintext
497
+ examples:
498
+ - |
499
+ {{project-name}}/
500
+ ├── .github/ # CI/CD workflows
501
+ │ └── workflows/
502
+ │ ├── ci.yaml
503
+ │ └── deploy.yaml
504
+ ├── apps/ # Application packages
505
+ │ ├── web/ # Frontend application
506
+ │ │ ├── src/
507
+ │ │ │ ├── components/ # UI components
508
+ │ │ │ ├── pages/ # Page components/routes
509
+ │ │ │ ├── hooks/ # Custom React hooks
510
+ │ │ │ ├── services/ # API client services
511
+ │ │ │ ├── stores/ # State management
512
+ │ │ │ ├── styles/ # Global styles/themes
513
+ │ │ │ └── utils/ # Frontend utilities
514
+ │ │ ├── public/ # Static assets
515
+ │ │ ├── tests/ # Frontend tests
516
+ │ │ └── package.json
517
+ │ └── api/ # Backend application
518
+ │ ├── src/
519
+ │ │ ├── routes/ # API routes/controllers
520
+ │ │ ├── services/ # Business logic
521
+ │ │ ├── models/ # Data models
522
+ │ │ ├── middleware/ # Express/API middleware
523
+ │ │ ├── utils/ # Backend utilities
524
+ │ │ └── {{serverless_or_server_entry}}
525
+ │ ├── tests/ # Backend tests
526
+ │ └── package.json
527
+ ├── packages/ # Shared packages
528
+ │ ├── shared/ # Shared types/utilities
529
+ │ │ ├── src/
530
+ │ │ │ ├── types/ # TypeScript interfaces
531
+ │ │ │ ├── constants/ # Shared constants
532
+ │ │ │ └── utils/ # Shared utilities
533
+ │ │ └── package.json
534
+ │ ├── ui/ # Shared UI components
535
+ │ │ ├── src/
536
+ │ │ └── package.json
537
+ │ └── config/ # Shared configuration
538
+ │ ├── eslint/
539
+ │ ├── typescript/
540
+ │ └── jest/
541
+ ├── infrastructure/ # IaC definitions
542
+ │ └── {{iac_structure}}
543
+ ├── scripts/ # Build/deploy scripts
544
+ ├── docs/ # Documentation
545
+ │ ├── prd.md
546
+ │ ├── front-end-spec.md
547
+ │ └── fullstack-architecture.md
548
+ ├── .env.example # Environment template
549
+ ├── package.json # Root package.json
550
+ ├── {{monorepo_config}} # Monorepo configuration
551
+ └── README.md
552
+
553
+ - id: development-workflow
554
+ title: Development Workflow
555
+ instruction: Define the development setup and workflow for the fullstack application.
556
+ elicit: true
557
+ sections:
558
+ - id: local-setup
559
+ title: Local Development Setup
560
+ sections:
561
+ - id: prerequisites
562
+ title: Prerequisites
563
+ type: code
564
+ language: bash
565
+ template: "{{prerequisites_commands}}"
566
+ - id: initial-setup
567
+ title: Initial Setup
568
+ type: code
569
+ language: bash
570
+ template: "{{setup_commands}}"
571
+ - id: dev-commands
572
+ title: Development Commands
573
+ type: code
574
+ language: bash
575
+ template: |
576
+ # Start all services
577
+ {{start_all_command}}
578
+
579
+ # Start frontend only
580
+ {{start_frontend_command}}
581
+
582
+ # Start backend only
583
+ {{start_backend_command}}
584
+
585
+ # Run tests
586
+ {{test_commands}}
587
+ - id: environment-config
588
+ title: Environment Configuration
589
+ sections:
590
+ - id: env-vars
591
+ title: Required Environment Variables
592
+ type: code
593
+ language: bash
594
+ template: |
595
+ # Frontend (.env.local)
596
+ {{frontend_env_vars}}
597
+
598
+ # Backend (.env)
599
+ {{backend_env_vars}}
600
+
601
+ # Shared
602
+ {{shared_env_vars}}
603
+
604
+ - id: deployment-architecture
605
+ title: Deployment Architecture
606
+ instruction: Define deployment strategy based on platform choice.
607
+ elicit: true
608
+ sections:
609
+ - id: deployment-strategy
610
+ title: Deployment Strategy
611
+ template: |
612
+ **Frontend Deployment:**
613
+ - **Platform:** {{frontend_deploy_platform}}
614
+ - **Build Command:** {{frontend_build_command}}
615
+ - **Output Directory:** {{frontend_output_dir}}
616
+ - **CDN/Edge:** {{cdn_strategy}}
617
+
618
+ **Backend Deployment:**
619
+ - **Platform:** {{backend_deploy_platform}}
620
+ - **Build Command:** {{backend_build_command}}
621
+ - **Deployment Method:** {{deployment_method}}
622
+ - id: cicd-pipeline
623
+ title: CI/CD Pipeline
624
+ type: code
625
+ language: yaml
626
+ template: "{{cicd_pipeline_config}}"
627
+ - id: environments
628
+ title: Environments
629
+ type: table
630
+ columns: [Environment, Frontend URL, Backend URL, Purpose]
631
+ rows:
632
+ - ["Development", "{{dev_fe_url}}", "{{dev_be_url}}", "Local development"]
633
+ - ["Staging", "{{staging_fe_url}}", "{{staging_be_url}}", "Pre-production testing"]
634
+ - ["Production", "{{prod_fe_url}}", "{{prod_be_url}}", "Live environment"]
635
+
636
+ - id: security-performance
637
+ title: Security and Performance
638
+ instruction: Define security and performance considerations for the fullstack application.
639
+ elicit: true
640
+ sections:
641
+ - id: security-requirements
642
+ title: Security Requirements
643
+ template: |
644
+ **Frontend Security:**
645
+ - CSP Headers: {{csp_policy}}
646
+ - XSS Prevention: {{xss_strategy}}
647
+ - Secure Storage: {{storage_strategy}}
648
+
649
+ **Backend Security:**
650
+ - Input Validation: {{validation_approach}}
651
+ - Rate Limiting: {{rate_limit_config}}
652
+ - CORS Policy: {{cors_config}}
653
+
654
+ **Authentication Security:**
655
+ - Token Storage: {{token_strategy}}
656
+ - Session Management: {{session_approach}}
657
+ - Password Policy: {{password_requirements}}
658
+ - id: performance-optimization
659
+ title: Performance Optimization
660
+ template: |
661
+ **Frontend Performance:**
662
+ - Bundle Size Target: {{bundle_size}}
663
+ - Loading Strategy: {{loading_approach}}
664
+ - Caching Strategy: {{fe_cache_strategy}}
665
+
666
+ **Backend Performance:**
667
+ - Response Time Target: {{response_target}}
668
+ - Database Optimization: {{db_optimization}}
669
+ - Caching Strategy: {{be_cache_strategy}}
670
+
671
+ - id: testing-strategy
672
+ title: Testing Strategy
673
+ instruction: Define comprehensive testing approach for fullstack application.
674
+ elicit: true
675
+ sections:
676
+ - id: testing-pyramid
677
+ title: Testing Pyramid
678
+ type: code
679
+ language: text
680
+ template: |
681
+ Testing Pyramid Structure:
682
+
683
+ Level 3: E2E Tests (Few)
684
+ Level 2: Integration Tests (Some)
685
+ Level 1: Unit Tests (Many - Frontend & Backend)
686
+ - id: test-organization
687
+ title: Test Organization
688
+ sections:
689
+ - id: frontend-tests
690
+ title: Frontend Tests
691
+ type: code
692
+ language: text
693
+ template: "{{frontend_test_structure}}"
694
+ - id: backend-tests
695
+ title: Backend Tests
696
+ type: code
697
+ language: text
698
+ template: "{{backend_test_structure}}"
699
+ - id: e2e-tests
700
+ title: E2E Tests
701
+ type: code
702
+ language: text
703
+ template: "{{e2e_test_structure}}"
704
+ - id: test-examples
705
+ title: Test Examples
706
+ sections:
707
+ - id: frontend-test
708
+ title: Frontend Component Test
709
+ type: code
710
+ language: typescript
711
+ template: "{{frontend_test_example}}"
712
+ - id: backend-test
713
+ title: Backend API Test
714
+ type: code
715
+ language: typescript
716
+ template: "{{backend_test_example}}"
717
+ - id: e2e-test
718
+ title: E2E Test
719
+ type: code
720
+ language: typescript
721
+ template: "{{e2e_test_example}}"
722
+
723
+ - id: coding-standards
724
+ title: Coding Standards
725
+ instruction: Define MINIMAL but CRITICAL standards for AI agents. Focus only on project-specific rules that prevent common mistakes. These will be used by dev agents.
726
+ elicit: true
727
+ sections:
728
+ - id: critical-rules
729
+ title: Critical Fullstack Rules
730
+ repeatable: true
731
+ template: "- **{{rule_name}}:** {{rule_description}}"
732
+ examples:
733
+ - "**Type Sharing:** Always define types in packages/shared and import from there"
734
+ - "**API Calls:** Never make direct HTTP calls - use the service layer"
735
+ - "**Environment Variables:** Access only through config objects, never process.env directly"
736
+ - "**Error Handling:** All API routes must use the standard error handler"
737
+ - "**State Updates:** Never mutate state directly - use proper state management patterns"
738
+ - id: naming-conventions
739
+ title: Naming Conventions
740
+ type: table
741
+ columns: [Element, Frontend, Backend, Example]
742
+ rows:
743
+ - ["Components", "PascalCase", "-", "`UserProfile.tsx`"]
744
+ - ["Hooks", "camelCase with 'use'", "-", "`useAuth.ts`"]
745
+ - ["API Routes", "-", "kebab-case", "`/api/user-profile`"]
746
+ - ["Database Tables", "-", "snake_case", "`user_profiles`"]
747
+
748
+ - id: error-handling
749
+ title: Error Handling Strategy
750
+ instruction: Define unified error handling across frontend and backend.
751
+ elicit: true
752
+ sections:
753
+ - id: error-flow
754
+ title: Error Flow
755
+ type: mermaid
756
+ mermaid_type: sequence
757
+ template: "{{error_flow_diagram}}"
758
+ - id: error-format
759
+ title: Error Response Format
760
+ type: code
761
+ language: typescript
762
+ template: |
763
+ interface ApiError {
764
+ error: {
765
+ code: string;
766
+ message: string;
767
+ details?: Record<string, any>;
768
+ timestamp: string;
769
+ requestId: string;
770
+ };
771
+ }
772
+ - id: frontend-error-handling
773
+ title: Frontend Error Handling
774
+ type: code
775
+ language: typescript
776
+ template: "{{frontend_error_handler}}"
777
+ - id: backend-error-handling
778
+ title: Backend Error Handling
779
+ type: code
780
+ language: typescript
781
+ template: "{{backend_error_handler}}"
782
+
783
+ - id: monitoring
784
+ title: Monitoring and Observability
785
+ instruction: Define monitoring strategy for fullstack application.
786
+ elicit: true
787
+ sections:
788
+ - id: monitoring-stack
789
+ title: Monitoring Stack
790
+ template: |
791
+ - **Frontend Monitoring:** {{frontend_monitoring}}
792
+ - **Backend Monitoring:** {{backend_monitoring}}
793
+ - **Error Tracking:** {{error_tracking}}
794
+ - **Performance Monitoring:** {{perf_monitoring}}
795
+ - id: key-metrics
796
+ title: Key Metrics
797
+ template: |
798
+ **Frontend Metrics:**
799
+ - Core Web Vitals
800
+ - JavaScript errors
801
+ - API response times
802
+ - User interactions
803
+
804
+ **Backend Metrics:**
805
+ - Request rate
806
+ - Error rate
807
+ - Response time
808
+ - Database query performance
809
+
810
+ - id: checklist-results
811
+ title: Checklist Results Report
812
+ instruction: Before running the checklist, offer to output the full architecture document. Once user confirms, execute the architect-checklist and populate results here.