@onion-architect-ai/cli 4.1.0-beta.1 → 4.1.0-beta.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.
- package/dist/cli.js +8 -19
- package/dist/cli.js.map +1 -1
- package/package.json +4 -3
- package/templates/.cursor/agents/compliance/iso-22301-specialist.md +917 -0
- package/templates/.cursor/agents/compliance/iso-27001-specialist.md +641 -0
- package/templates/.cursor/agents/compliance/pmbok-specialist.md +669 -0
- package/templates/.cursor/agents/compliance/security-information-master.md +824 -0
- package/templates/.cursor/agents/compliance/soc2-specialist.md +818 -0
- package/templates/.cursor/agents/deployment/docker-specialist.md +1192 -0
- package/templates/.cursor/agents/meta/agent-creator-specialist.md +1135 -0
- package/templates/.cursor/agents/meta/command-creator-specialist.md +1519 -0
- package/templates/.cursor/agents/meta/metaspec-gate-keeper.md +240 -0
- package/templates/.cursor/agents/meta/onion.md +753 -0
- package/templates/.cursor/agents/research/research-agent.md +292 -0
- package/templates/.cursor/agents/review/corporate-compliance-specialist.md +370 -0
- package/templates/.cursor/commands/common/prompts/README.md +187 -0
- package/templates/.cursor/commands/common/prompts/clickup-patterns.md +144 -0
- package/templates/.cursor/commands/common/prompts/code-review-checklist.md +168 -0
- package/templates/.cursor/commands/common/prompts/git-workflow-patterns.md +235 -0
- package/templates/.cursor/commands/common/prompts/output-formats.md +240 -0
- package/templates/.cursor/commands/common/prompts/technical.md +172 -0
- package/templates/.cursor/commands/common/prompts/validation-rules.md +173 -0
- package/templates/.cursor/commands/common/templates/abstraction-template.md +400 -0
- package/templates/.cursor/commands/common/templates/agent-template.md +353 -0
- package/templates/.cursor/commands/common/templates/business_context_template.md +748 -0
- package/templates/.cursor/commands/common/templates/command-template.md +273 -0
- package/templates/.cursor/commands/common/templates/technical_context_template.md +526 -0
- package/templates/.cursor/commands/development/runflow-dev.md +465 -0
- package/templates/.cursor/commands/docs/build-compliance-docs.md +143 -0
- package/templates/.cursor/commands/git/README.md +606 -0
- package/templates/.cursor/commands/meta/all-tools.md +50 -0
- package/templates/.cursor/commands/meta/analyze-complex-problem.md +186 -0
- package/templates/.cursor/commands/meta/create-abstraction.md +859 -0
- package/templates/.cursor/commands/meta/create-agent-express.md +83 -0
- package/templates/.cursor/commands/meta/create-agent.md +210 -0
- package/templates/.cursor/commands/meta/create-command.md +203 -0
- package/templates/.cursor/commands/meta/create-knowledge-base.md +143 -0
- package/templates/.cursor/commands/meta/create-task-structure.md +150 -0
- package/templates/.cursor/commands/meta/setup-integration.md +257 -0
- package/templates/.cursor/commands/onion/setup.md +843 -0
- package/templates/.cursor/commands/onion.md +168 -0
- package/templates/.cursor/commands/product/README.md +230 -0
- package/templates/.cursor/commands/quick/analisys.md +17 -0
- package/templates/.cursor/commands/validate/collab/pair-testing.md +633 -0
- package/templates/.cursor/commands/validate/collab/three-amigos.md +505 -0
- package/templates/.cursor/commands/validate/qa-points/estimate.md +660 -0
- package/templates/.cursor/commands/validate/test-strategy/analyze.md +1134 -0
- package/templates/.cursor/commands/validate/test-strategy/create.md +392 -0
- package/templates/.cursor/commands/validate/workflow.md +360 -0
- package/templates/.cursor/commands/warm-up.md +91 -0
- package/templates/.cursor/docs/architecture/acoplamento-clickup-problema-analise.md +446 -0
- package/templates/.cursor/docs/architecture/desacoplamento-roadmap.md +360 -0
- package/templates/.cursor/docs/architecture/validacao-fase-1.md +219 -0
- package/templates/.cursor/docs/c4/c4-detection-rules.md +395 -0
- package/templates/.cursor/docs/c4/c4-documentation-templates.md +579 -0
- package/templates/.cursor/docs/c4/c4-mermaid-patterns.md +331 -0
- package/templates/.cursor/docs/c4/c4-templates.md +256 -0
- package/templates/.cursor/docs/clickup/clickup-acceptance-criteria-strategy.md +329 -0
- package/templates/.cursor/docs/clickup/clickup-auto-update-strategy.md +318 -0
- package/templates/.cursor/docs/clickup/clickup-comment-formatter.md +239 -0
- package/templates/.cursor/docs/clickup/clickup-description-fix.md +355 -0
- package/templates/.cursor/docs/clickup/clickup-dual-comment-strategy.md +505 -0
- package/templates/.cursor/docs/clickup/clickup-formatting.md +302 -0
- package/templates/.cursor/docs/clickup/separador-tamanho-otimizado.md +256 -0
- package/templates/.cursor/docs/engineer/pre-pr-acceptance-validation.md +256 -0
- package/templates/.cursor/docs/onion/ESPERANTO.md +278 -0
- package/templates/.cursor/docs/onion/agents-reference.md +832 -0
- package/templates/.cursor/docs/onion/clickup-integration.md +738 -0
- package/templates/.cursor/docs/onion/commands-guide.md +807 -0
- package/templates/.cursor/docs/onion/engineering-flows.md +865 -0
- package/templates/.cursor/docs/onion/getting-started.md +741 -0
- package/templates/.cursor/docs/onion/maintenance-checklist.md +388 -0
- package/templates/.cursor/docs/onion/naming-conventions.md +268 -0
- package/templates/.cursor/docs/onion/practical-examples.md +782 -0
- package/templates/.cursor/docs/product/story-points-integration.md +254 -0
- package/templates/.cursor/docs/product/story-points-validation.md +224 -0
- package/templates/.cursor/docs/reviews/task-manager-docs-review-2025-11-24.md +167 -0
- package/templates/.cursor/docs/strategies/clickup-comment-patterns.md +766 -0
- package/templates/.cursor/docs/strategies/clickup-integration-tests.md +599 -0
- package/templates/.cursor/docs/strategies/clickup-mcp-wrappers-tests.md +854 -0
- package/templates/.cursor/docs/strategies/clickup-regression-tests.md +589 -0
- package/templates/.cursor/docs/strategies/visual-patterns.md +308 -0
- package/templates/.cursor/docs/templates/README.md +624 -0
- package/templates/.cursor/docs/templates/adr-template.md +226 -0
- package/templates/.cursor/docs/templates/analysis-template.md +280 -0
- package/templates/.cursor/docs/templates/execution-plan-template.md +430 -0
- package/templates/.cursor/docs/templates/guide-template.md +367 -0
- package/templates/.cursor/docs/templates/phase-execution-prompt-template.md +504 -0
- package/templates/.cursor/docs/templates/reference-template.md +522 -0
- package/templates/.cursor/docs/templates/solution-template.md +390 -0
- package/templates/.cursor/docs/tools/README.md +325 -0
- package/templates/.cursor/docs/tools/agents.md +330 -0
- package/templates/.cursor/docs/tools/commands.md +606 -0
- package/templates/.cursor/docs/tools/cursor.md +498 -0
- package/templates/.cursor/docs/tools/mcps.md +858 -0
- package/templates/.cursor/docs/tools/rules.md +423 -0
- package/templates/.cursor/rules/language-and-documentation.mdc +371 -0
- package/templates/.cursor/rules/onion-patterns.mdc +197 -0
- package/templates/.cursor/rules/validation-rules.mdc +194 -0
- package/templates/.cursor/utils/clickup-mcp-wrappers.md +671 -0
- package/templates/.cursor/utils/date-time-standards.md +182 -0
- package/templates/.cursor/utils/task-manager/README.md +94 -0
- package/templates/.cursor/utils/task-manager/adapters/asana.md +377 -0
- package/templates/.cursor/utils/task-manager/adapters/clickup.md +467 -0
- package/templates/.cursor/utils/task-manager/adapters/linear.md +421 -0
- package/templates/.cursor/utils/task-manager/detector.md +290 -0
- package/templates/.cursor/utils/task-manager/factory.md +363 -0
- package/templates/.cursor/utils/task-manager/interface.md +248 -0
- package/templates/.cursor/utils/task-manager/types.md +409 -0
- package/templates/.cursor/validation/product-task-validation.md +344 -0
- package/templates/.onion/contexts/business/.context-config.yml +52 -0
- package/templates/.onion/contexts/business/README.md +222 -0
- package/templates/.onion/contexts/business/agents/branding-specialist.md +1030 -0
- package/templates/.onion/contexts/business/agents/clickup-specialist.md +397 -0
- package/templates/.onion/contexts/business/agents/extract-meeting-specialist.md +395 -0
- package/templates/.onion/contexts/business/agents/gamma-specialist.md +1169 -0
- package/templates/.onion/contexts/business/agents/meeting-consolidator.md +483 -0
- package/templates/.onion/contexts/business/agents/pain-price-specialist.md +509 -0
- package/templates/.onion/contexts/business/agents/presentation-orchestrator.md +1191 -0
- package/templates/.onion/contexts/business/agents/product-agent.md +202 -0
- package/templates/.onion/contexts/business/agents/story-points-specialist.md +539 -0
- package/templates/.onion/contexts/business/agents/storytelling-specialist.md +891 -0
- package/templates/.onion/contexts/business/agents/task-specialist.md +618 -0
- package/templates/.onion/contexts/business/agents/whisper-specialist.md +373 -0
- package/templates/.onion/contexts/business/commands/advanced/analyze-pain-price.md +709 -0
- package/templates/.onion/contexts/business/commands/advanced/branding.md +460 -0
- package/templates/.onion/contexts/business/commands/advanced/checklist-sync.md +241 -0
- package/templates/.onion/contexts/business/commands/advanced/presentation.md +189 -0
- package/templates/.onion/contexts/business/commands/advanced/transform-consolidated.md +592 -0
- package/templates/.onion/contexts/business/commands/help.md +212 -0
- package/templates/.onion/contexts/business/commands/intermediate/check.md +48 -0
- package/templates/.onion/contexts/business/commands/intermediate/collect.md +96 -0
- package/templates/.onion/contexts/business/commands/intermediate/consolidate-meetings.md +306 -0
- package/templates/.onion/contexts/business/commands/intermediate/convert-to-tasks.md +220 -0
- package/templates/.onion/contexts/business/commands/intermediate/extract-meeting.md +241 -0
- package/templates/.onion/contexts/business/commands/intermediate/feature.md +431 -0
- package/templates/.onion/contexts/business/commands/intermediate/light-arch.md +97 -0
- package/templates/.onion/contexts/business/commands/intermediate/task-check.md +340 -0
- package/templates/.onion/contexts/business/commands/intermediate/validate-task.md +294 -0
- package/templates/.onion/contexts/business/commands/intermediate/whisper.md +325 -0
- package/templates/.onion/contexts/business/commands/starter/estimate.md +519 -0
- package/templates/.onion/contexts/business/commands/starter/refine.md +186 -0
- package/templates/.onion/contexts/business/commands/starter/spec.md +107 -0
- package/templates/.onion/contexts/business/commands/starter/task.md +585 -0
- package/templates/.onion/contexts/business/commands/starter/warm-up.md +187 -0
- package/templates/.onion/contexts/technical/.context-config.yml +64 -0
- package/templates/.onion/contexts/technical/README.md +238 -0
- package/templates/.onion/contexts/technical/agents/branch-code-reviewer.md +200 -0
- package/templates/.onion/contexts/technical/agents/branch-doc-writer.md +162 -0
- package/templates/.onion/contexts/technical/agents/branch-metaspec-checker.md +68 -0
- package/templates/.onion/contexts/technical/agents/branch-test-planner.md +177 -0
- package/templates/.onion/contexts/technical/agents/c4-architecture-specialist.md +712 -0
- package/templates/.onion/contexts/technical/agents/c4-documentation-specialist.md +658 -0
- package/templates/.onion/contexts/technical/agents/code-reviewer.md +155 -0
- package/templates/.onion/contexts/technical/agents/cursor-specialist.md +249 -0
- package/templates/.onion/contexts/technical/agents/docs-reverse-engineer.md +418 -0
- package/templates/.onion/contexts/technical/agents/gitflow-specialist.md +1207 -0
- package/templates/.onion/contexts/technical/agents/linux-security-specialist.md +676 -0
- package/templates/.onion/contexts/technical/agents/mermaid-specialist.md +516 -0
- package/templates/.onion/contexts/technical/agents/nodejs-specialist.md +673 -0
- package/templates/.onion/contexts/technical/agents/nx-migration-specialist.md +867 -0
- package/templates/.onion/contexts/technical/agents/nx-monorepo-specialist.md +619 -0
- package/templates/.onion/contexts/technical/agents/postgres-specialist.md +1124 -0
- package/templates/.onion/contexts/technical/agents/react-developer.md +132 -0
- package/templates/.onion/contexts/technical/agents/runflow-specialist.md +278 -0
- package/templates/.onion/contexts/technical/agents/system-doc-orchestrator.md +1388 -0
- package/templates/.onion/contexts/technical/agents/test-agent.md +425 -0
- package/templates/.onion/contexts/technical/agents/test-engineer.md +295 -0
- package/templates/.onion/contexts/technical/agents/test-planner.md +118 -0
- package/templates/.onion/contexts/technical/agents/zen-engine-specialist.md +421 -0
- package/templates/.onion/contexts/technical/commands/advanced/bump.md +43 -0
- package/templates/.onion/contexts/technical/commands/advanced/consolidate-documents.md +424 -0
- package/templates/.onion/contexts/technical/commands/advanced/e2e.md +392 -0
- package/templates/.onion/contexts/technical/commands/advanced/feature-finish.md +90 -0
- package/templates/.onion/contexts/technical/commands/advanced/feature-publish.md +91 -0
- package/templates/.onion/contexts/technical/commands/advanced/feature-start.md +158 -0
- package/templates/.onion/contexts/technical/commands/advanced/hotfix-finish.md +98 -0
- package/templates/.onion/contexts/technical/commands/advanced/hotfix-start.md +94 -0
- package/templates/.onion/contexts/technical/commands/advanced/hotfix.md +186 -0
- package/templates/.onion/contexts/technical/commands/advanced/refine-vision.md +27 -0
- package/templates/.onion/contexts/technical/commands/advanced/release-finish.md +98 -0
- package/templates/.onion/contexts/technical/commands/advanced/release-start.md +95 -0
- package/templates/.onion/contexts/technical/commands/advanced/reverse-consolidate.md +160 -0
- package/templates/.onion/contexts/technical/commands/advanced/validate-phase-sync.md +118 -0
- package/templates/.onion/contexts/technical/commands/help.md +329 -0
- package/templates/.onion/contexts/technical/commands/intermediate/build-business-docs.md +276 -0
- package/templates/.onion/contexts/technical/commands/intermediate/build-index.md +128 -0
- package/templates/.onion/contexts/technical/commands/intermediate/build-tech-docs.md +204 -0
- package/templates/.onion/contexts/technical/commands/intermediate/code-review.md +215 -0
- package/templates/.onion/contexts/technical/commands/intermediate/docs-health.md +142 -0
- package/templates/.onion/contexts/technical/commands/intermediate/fast-commit.md +45 -0
- package/templates/.onion/contexts/technical/commands/intermediate/integration.md +523 -0
- package/templates/.onion/contexts/technical/commands/intermediate/pr-update.md +198 -0
- package/templates/.onion/contexts/technical/commands/intermediate/pre-pr.md +91 -0
- package/templates/.onion/contexts/technical/commands/intermediate/start.md +266 -0
- package/templates/.onion/contexts/technical/commands/intermediate/sync-sessions.md +320 -0
- package/templates/.onion/contexts/technical/commands/intermediate/unit.md +378 -0
- package/templates/.onion/contexts/technical/commands/intermediate/validate-docs.md +159 -0
- package/templates/.onion/contexts/technical/commands/starter/docs.md +39 -0
- package/templates/.onion/contexts/technical/commands/starter/help.md +306 -0
- package/templates/.onion/contexts/technical/commands/starter/init.md +139 -0
- package/templates/.onion/contexts/technical/commands/starter/plan.md +111 -0
- package/templates/.onion/contexts/technical/commands/starter/pr.md +136 -0
- package/templates/.onion/contexts/technical/commands/starter/sync.md +228 -0
- package/templates/.onion/contexts/technical/commands/starter/warm-up.md +173 -0
- package/templates/.onion/contexts/technical/commands/starter/work.md +169 -0
- package/templates/.onion/core/commands/help.md +388 -0
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
# 🎭 C4 Mermaid Patterns - Sistema Onion
|
|
2
|
+
|
|
3
|
+
## 📋 **Mermaid C4 Syntax Reference**
|
|
4
|
+
|
|
5
|
+
Padrões específicos para geração de diagramas C4 em Mermaid, focados em compatibilidade GitHub.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 🎨 **Context Diagram Patterns**
|
|
10
|
+
|
|
11
|
+
### **Basic Context Pattern**
|
|
12
|
+
```mermaid
|
|
13
|
+
C4Context
|
|
14
|
+
title System Context diagram for [System Name]
|
|
15
|
+
|
|
16
|
+
Person(user, "User", "Primary system user")
|
|
17
|
+
System(main_system, "Main System", "Core application system")
|
|
18
|
+
System_Ext(external, "External System", "Third-party service")
|
|
19
|
+
|
|
20
|
+
Rel(user, main_system, "Uses", "HTTPS")
|
|
21
|
+
Rel(main_system, external, "Integrates with", "API/HTTPS")
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### **Multi-User Context Pattern**
|
|
25
|
+
```mermaid
|
|
26
|
+
C4Context
|
|
27
|
+
title System Context - Multi-User Application
|
|
28
|
+
|
|
29
|
+
Person(end_user, "End User", "Application end user")
|
|
30
|
+
Person(admin, "Administrator", "System administrator")
|
|
31
|
+
Person(dev, "Developer", "Development team member")
|
|
32
|
+
|
|
33
|
+
System(app_system, "Application System", "Main application")
|
|
34
|
+
System_Ext(auth_service, "Auth Service", "Authentication provider")
|
|
35
|
+
SystemDb_Ext(analytics, "Analytics", "Usage analytics service")
|
|
36
|
+
|
|
37
|
+
Rel(end_user, app_system, "Uses application", "HTTPS")
|
|
38
|
+
Rel(admin, app_system, "Administers", "HTTPS/Admin Panel")
|
|
39
|
+
Rel(dev, app_system, "Develops & deploys", "CI/CD")
|
|
40
|
+
Rel(app_system, auth_service, "Authenticates users", "OAuth/JWT")
|
|
41
|
+
Rel(app_system, analytics, "Sends events", "HTTPS/Events API")
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### **Microservices Context Pattern**
|
|
45
|
+
```mermaid
|
|
46
|
+
C4Context
|
|
47
|
+
title System Context - Microservices Architecture
|
|
48
|
+
|
|
49
|
+
Person(user, "User", "System user")
|
|
50
|
+
|
|
51
|
+
System_Boundary(microservices, "Microservices Ecosystem") {
|
|
52
|
+
System(api_gateway, "API Gateway", "Request routing & authentication")
|
|
53
|
+
System(service_a, "Service A", "Domain-specific service")
|
|
54
|
+
System(service_b, "Service B", "Domain-specific service")
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
System_Ext(database, "Database Cluster", "Distributed data storage")
|
|
58
|
+
System_Ext(message_broker, "Message Broker", "Event streaming")
|
|
59
|
+
|
|
60
|
+
Rel(user, api_gateway, "API requests", "HTTPS/REST")
|
|
61
|
+
Rel(api_gateway, service_a, "Routes requests", "HTTP")
|
|
62
|
+
Rel(api_gateway, service_b, "Routes requests", "HTTP")
|
|
63
|
+
Rel(service_a, database, "Persists data", "SQL")
|
|
64
|
+
Rel(service_b, database, "Persists data", "SQL")
|
|
65
|
+
Rel(service_a, message_broker, "Publishes events", "Message Queue")
|
|
66
|
+
Rel(service_b, message_broker, "Consumes events", "Message Queue")
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 🏗️ **Container Diagram Patterns**
|
|
72
|
+
|
|
73
|
+
### **Web Application Container Pattern**
|
|
74
|
+
```mermaid
|
|
75
|
+
C4Container
|
|
76
|
+
title Container diagram for Web Application
|
|
77
|
+
|
|
78
|
+
Person(user, "User")
|
|
79
|
+
|
|
80
|
+
Container_Boundary(web_app, "Web Application") {
|
|
81
|
+
Container(spa, "Single Page App", "React/TypeScript", "User interface")
|
|
82
|
+
Container(api, "API Server", "Node.js/Express", "Business logic & API")
|
|
83
|
+
Container(bg_jobs, "Background Jobs", "Node.js/Queue", "Async processing")
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
ContainerDb(database, "Database", "PostgreSQL", "Application data")
|
|
87
|
+
ContainerDb(cache, "Cache", "Redis", "Session & temporary data")
|
|
88
|
+
Container_Ext(cdn, "CDN", "CloudFront", "Static assets")
|
|
89
|
+
|
|
90
|
+
Rel(user, spa, "Uses", "HTTPS")
|
|
91
|
+
Rel(spa, cdn, "Loads assets", "HTTPS")
|
|
92
|
+
Rel(spa, api, "API calls", "JSON/HTTPS")
|
|
93
|
+
Rel(api, database, "Reads/Writes", "SQL")
|
|
94
|
+
Rel(api, cache, "Caches data", "Redis Protocol")
|
|
95
|
+
Rel(api, bg_jobs, "Enqueues tasks", "Message Queue")
|
|
96
|
+
Rel(bg_jobs, database, "Updates data", "SQL")
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### **Monorepo Container Pattern**
|
|
100
|
+
```mermaid
|
|
101
|
+
C4Container
|
|
102
|
+
title Container diagram for NX Monorepo
|
|
103
|
+
|
|
104
|
+
Person(developer, "Developer")
|
|
105
|
+
Person(user, "End User")
|
|
106
|
+
|
|
107
|
+
Container_Boundary(nx_workspace, "NX Monorepo Workspace") {
|
|
108
|
+
Container(web_app, "Web App", "React", "Main user application")
|
|
109
|
+
Container(admin_app, "Admin App", "React", "Administrative interface")
|
|
110
|
+
Container(mobile_app, "Mobile App", "React Native", "Mobile application")
|
|
111
|
+
Container(api_service, "API Service", "NestJS", "Backend API")
|
|
112
|
+
Container(shared_libs, "Shared Libraries", "TypeScript", "Common utilities")
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
ContainerDb(database, "Database", "PostgreSQL", "Application data")
|
|
116
|
+
Container_Ext(registry, "Package Registry", "npm/private", "Package distribution")
|
|
117
|
+
|
|
118
|
+
Rel(developer, nx_workspace, "Develops", "NX CLI")
|
|
119
|
+
Rel(user, web_app, "Uses", "HTTPS")
|
|
120
|
+
Rel(user, mobile_app, "Uses", "Mobile App")
|
|
121
|
+
Rel(web_app, shared_libs, "Imports", "ES Modules")
|
|
122
|
+
Rel(admin_app, shared_libs, "Imports", "ES Modules")
|
|
123
|
+
Rel(mobile_app, shared_libs, "Imports", "ES Modules")
|
|
124
|
+
Rel(api_service, shared_libs, "Imports", "ES Modules")
|
|
125
|
+
Rel(web_app, api_service, "API calls", "HTTPS/REST")
|
|
126
|
+
Rel(admin_app, api_service, "API calls", "HTTPS/REST")
|
|
127
|
+
Rel(mobile_app, api_service, "API calls", "HTTPS/REST")
|
|
128
|
+
Rel(api_service, database, "Persists data", "SQL")
|
|
129
|
+
Rel(shared_libs, registry, "Published to", "npm publish")
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### **Full-stack Container Pattern**
|
|
133
|
+
```mermaid
|
|
134
|
+
C4Container
|
|
135
|
+
title Container diagram for Next.js Full-stack Application
|
|
136
|
+
|
|
137
|
+
Person(user, "User")
|
|
138
|
+
|
|
139
|
+
Container_Boundary(nextjs_app, "Next.js Application") {
|
|
140
|
+
Container(frontend, "Frontend", "React/Next.js", "User interface & pages")
|
|
141
|
+
Container(api_routes, "API Routes", "Next.js API", "Backend API endpoints")
|
|
142
|
+
Container(middleware, "Middleware", "Next.js Middleware", "Auth & routing logic")
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
ContainerDb(database, "Database", "PostgreSQL", "Application data")
|
|
146
|
+
Container_Ext(cdn, "CDN", "Vercel CDN", "Static assets & ISR")
|
|
147
|
+
Container_Ext(auth_provider, "Auth Provider", "NextAuth.js", "Authentication")
|
|
148
|
+
|
|
149
|
+
Rel(user, frontend, "Visits pages", "HTTPS")
|
|
150
|
+
Rel(user, cdn, "Loads static content", "HTTPS")
|
|
151
|
+
Rel(frontend, middleware, "Auth checks", "Server-side")
|
|
152
|
+
Rel(frontend, api_routes, "API calls", "HTTP/Internal")
|
|
153
|
+
Rel(middleware, auth_provider, "Validates auth", "OAuth")
|
|
154
|
+
Rel(api_routes, database, "Data operations", "SQL")
|
|
155
|
+
Rel(cdn, frontend, "Serves ISR content", "HTTP")
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## 🧩 **Component Diagram Patterns**
|
|
161
|
+
|
|
162
|
+
### **React Component Structure Pattern**
|
|
163
|
+
```mermaid
|
|
164
|
+
C4Component
|
|
165
|
+
title Component diagram for React Frontend
|
|
166
|
+
|
|
167
|
+
Container(frontend, "Frontend Container", "React")
|
|
168
|
+
|
|
169
|
+
Component(app, "App Component", "React", "Root application component")
|
|
170
|
+
Component(router, "Router", "React Router", "Client-side routing")
|
|
171
|
+
Component(pages, "Page Components", "React", "Route-specific pages")
|
|
172
|
+
Component(layout, "Layout Components", "React", "Common layout structures")
|
|
173
|
+
Component(ui_components, "UI Components", "React", "Reusable UI elements")
|
|
174
|
+
Component(hooks, "Custom Hooks", "React Hooks", "Business logic abstraction")
|
|
175
|
+
Component(context, "Context Providers", "React Context", "Global state management")
|
|
176
|
+
Component(services, "API Services", "TypeScript", "HTTP client abstractions")
|
|
177
|
+
Component(utils, "Utilities", "TypeScript", "Helper functions")
|
|
178
|
+
Component(constants, "Constants", "TypeScript", "Configuration & constants")
|
|
179
|
+
|
|
180
|
+
Rel(app, router, "Configures routes")
|
|
181
|
+
Rel(app, context, "Provides global state")
|
|
182
|
+
Rel(router, pages, "Renders page")
|
|
183
|
+
Rel(pages, layout, "Uses layout")
|
|
184
|
+
Rel(pages, ui_components, "Renders components")
|
|
185
|
+
Rel(pages, hooks, "Uses business logic")
|
|
186
|
+
Rel(layout, ui_components, "Composes UI")
|
|
187
|
+
Rel(hooks, services, "Calls APIs")
|
|
188
|
+
Rel(hooks, context, "Consumes context")
|
|
189
|
+
Rel(services, utils, "Uses utilities")
|
|
190
|
+
Rel(services, constants, "Uses configuration")
|
|
191
|
+
Rel(ui_components, constants, "Uses constants")
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### **API Service Component Pattern**
|
|
195
|
+
```mermaid
|
|
196
|
+
C4Component
|
|
197
|
+
title Component diagram for Node.js API Service
|
|
198
|
+
|
|
199
|
+
Container(api_service, "API Service Container", "Node.js")
|
|
200
|
+
|
|
201
|
+
Component(app, "App Module", "Express", "Application setup & middleware")
|
|
202
|
+
Component(routes, "Route Handlers", "Express Router", "HTTP endpoint definitions")
|
|
203
|
+
Component(controllers, "Controllers", "TypeScript Classes", "Request/response logic")
|
|
204
|
+
Component(services, "Business Services", "TypeScript Classes", "Business logic layer")
|
|
205
|
+
Component(repositories, "Repositories", "TypeScript Classes", "Data access layer")
|
|
206
|
+
Component(middleware, "Middleware", "Express Middleware", "Cross-cutting concerns")
|
|
207
|
+
Component(validators, "Validators", "Joi/Zod", "Input validation")
|
|
208
|
+
Component(auth, "Auth Module", "JWT/Passport", "Authentication & authorization")
|
|
209
|
+
Component(config, "Configuration", "TypeScript", "Environment & settings")
|
|
210
|
+
Component(utils, "Utilities", "TypeScript", "Helper functions")
|
|
211
|
+
|
|
212
|
+
Rel(app, routes, "Registers routes")
|
|
213
|
+
Rel(app, middleware, "Applies middleware")
|
|
214
|
+
Rel(app, auth, "Configures auth")
|
|
215
|
+
Rel(routes, controllers, "Delegates to")
|
|
216
|
+
Rel(controllers, validators, "Validates input")
|
|
217
|
+
Rel(controllers, services, "Calls business logic")
|
|
218
|
+
Rel(controllers, auth, "Checks authorization")
|
|
219
|
+
Rel(services, repositories, "Accesses data")
|
|
220
|
+
Rel(repositories, config, "Uses DB config")
|
|
221
|
+
Rel(middleware, auth, "Validates tokens")
|
|
222
|
+
Rel(auth, config, "Uses auth config")
|
|
223
|
+
Rel(services, utils, "Uses utilities")
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## 🎯 **Pattern Selection Rules**
|
|
229
|
+
|
|
230
|
+
### **Context Level Selection**
|
|
231
|
+
```typescript
|
|
232
|
+
const contextPatterns = {
|
|
233
|
+
'single-user-spa': 'basic-context-pattern',
|
|
234
|
+
'multi-user-app': 'multi-user-context-pattern',
|
|
235
|
+
'microservices': 'microservices-context-pattern',
|
|
236
|
+
'monolith': 'basic-context-pattern',
|
|
237
|
+
'serverless': 'serverless-context-pattern'
|
|
238
|
+
}
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### **Container Level Selection**
|
|
242
|
+
```typescript
|
|
243
|
+
const containerPatterns = {
|
|
244
|
+
'spa-with-api': 'web-application-container-pattern',
|
|
245
|
+
'monorepo-nx': 'monorepo-container-pattern',
|
|
246
|
+
'nextjs-fullstack': 'fullstack-container-pattern',
|
|
247
|
+
'microservices': 'microservices-container-pattern',
|
|
248
|
+
'api-only': 'api-service-container-pattern'
|
|
249
|
+
}
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### **Component Level Selection**
|
|
253
|
+
```typescript
|
|
254
|
+
const componentPatterns = {
|
|
255
|
+
'react-frontend': 'react-component-structure-pattern',
|
|
256
|
+
'vue-frontend': 'vue-component-structure-pattern',
|
|
257
|
+
'node-api': 'api-service-component-pattern',
|
|
258
|
+
'nestjs-api': 'nestjs-component-pattern',
|
|
259
|
+
'express-api': 'express-component-pattern'
|
|
260
|
+
}
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## 🔧 **Mermaid Optimization Rules**
|
|
266
|
+
|
|
267
|
+
### **GitHub Compatibility**
|
|
268
|
+
```yaml
|
|
269
|
+
github_optimizations:
|
|
270
|
+
max_diagram_size: '2MB'
|
|
271
|
+
recommended_nodes: '< 20 per diagram'
|
|
272
|
+
text_length: '< 50 chars per label'
|
|
273
|
+
|
|
274
|
+
avoid:
|
|
275
|
+
- Complex nested boundaries
|
|
276
|
+
- Too many relationship lines
|
|
277
|
+
- Very long descriptions
|
|
278
|
+
|
|
279
|
+
prefer:
|
|
280
|
+
- Simple, clear node names
|
|
281
|
+
- Consistent styling
|
|
282
|
+
- Logical grouping with boundaries
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### **Performance Guidelines**
|
|
286
|
+
```yaml
|
|
287
|
+
performance_rules:
|
|
288
|
+
context_diagrams:
|
|
289
|
+
max_systems: 8
|
|
290
|
+
max_actors: 4
|
|
291
|
+
max_relationships: 12
|
|
292
|
+
|
|
293
|
+
container_diagrams:
|
|
294
|
+
max_containers: 12
|
|
295
|
+
max_databases: 4
|
|
296
|
+
max_external_systems: 6
|
|
297
|
+
|
|
298
|
+
component_diagrams:
|
|
299
|
+
max_components: 15
|
|
300
|
+
max_relationships: 20
|
|
301
|
+
recommended_depth: 1 # Avoid nested components
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
### **Styling Consistency**
|
|
305
|
+
```yaml
|
|
306
|
+
styling_patterns:
|
|
307
|
+
colors:
|
|
308
|
+
person: '#08427B'
|
|
309
|
+
system: '#1168BD'
|
|
310
|
+
system_ext: '#999999'
|
|
311
|
+
container: '#438DD5'
|
|
312
|
+
component: '#85BBF0'
|
|
313
|
+
database: '#F2F2F2'
|
|
314
|
+
|
|
315
|
+
node_naming:
|
|
316
|
+
use_snake_case: true
|
|
317
|
+
max_length: 20
|
|
318
|
+
avoid_special_chars: true
|
|
319
|
+
|
|
320
|
+
relationship_labels:
|
|
321
|
+
action_oriented: 'Uses, Calls, Sends, Reads'
|
|
322
|
+
include_protocol: 'HTTPS, REST, SQL'
|
|
323
|
+
max_length: 30
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
**Patterns**: 🎭 **GitHub-Optimized & Performance-Tuned**
|
|
329
|
+
**Compatibility**: Testado com GitHub Mermaid rendering
|
|
330
|
+
**Performance**: Otimizado para diagramas < 2MB
|
|
331
|
+
**Quality**: Templates seguem melhores práticas C4 Model
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
# 🎨 C4 Templates - Sistema Onion
|
|
2
|
+
|
|
3
|
+
## 📋 **Template Strategy**
|
|
4
|
+
|
|
5
|
+
Templates Mermaid C4 adaptativos para diferentes tipos de projeto. Seguindo a estratégia "Cebola" (núcleo → abstração).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 🏢 **Single Page Application (SPA) Templates**
|
|
10
|
+
|
|
11
|
+
### **React SPA Template**
|
|
12
|
+
```mermaid
|
|
13
|
+
C4Context
|
|
14
|
+
title System Context diagram for React SPA Application
|
|
15
|
+
|
|
16
|
+
Person(user, "User", "End user of the application")
|
|
17
|
+
System(spa, "React SPA", "Single Page Application built with React")
|
|
18
|
+
System_Ext(api, "Backend API", "RESTful API providing data")
|
|
19
|
+
System_Ext(cdn, "CDN", "Content Delivery Network")
|
|
20
|
+
|
|
21
|
+
Rel(user, spa, "Uses", "HTTPS")
|
|
22
|
+
Rel(spa, api, "Fetches data", "HTTPS/REST")
|
|
23
|
+
Rel(spa, cdn, "Loads assets", "HTTPS")
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### **Vue.js SPA Template**
|
|
27
|
+
```mermaid
|
|
28
|
+
C4Context
|
|
29
|
+
title System Context diagram for Vue.js SPA Application
|
|
30
|
+
|
|
31
|
+
Person(user, "User", "Application user")
|
|
32
|
+
System(vue_spa, "Vue.js SPA", "Single Page Application built with Vue.js")
|
|
33
|
+
System_Ext(api, "Backend API", "Data provider")
|
|
34
|
+
System_Ext(router, "Vue Router", "Client-side routing")
|
|
35
|
+
|
|
36
|
+
Rel(user, vue_spa, "Interacts", "HTTPS")
|
|
37
|
+
Rel(vue_spa, api, "API calls", "HTTPS/REST")
|
|
38
|
+
Rel(vue_spa, router, "Navigation", "Client-side")
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 🔌 **API Service Templates**
|
|
44
|
+
|
|
45
|
+
### **Node.js Express API Template**
|
|
46
|
+
```mermaid
|
|
47
|
+
C4Context
|
|
48
|
+
title System Context diagram for Node.js Express API
|
|
49
|
+
|
|
50
|
+
System_Ext(client, "Client Applications", "Web, Mobile, or SPA")
|
|
51
|
+
System(api, "Express API", "Node.js REST API built with Express")
|
|
52
|
+
SystemDb(database, "Database", "PostgreSQL/MongoDB")
|
|
53
|
+
System_Ext(cache, "Redis Cache", "Caching layer")
|
|
54
|
+
|
|
55
|
+
Rel(client, api, "API Requests", "HTTPS/REST")
|
|
56
|
+
Rel(api, database, "Stores/Retrieves data", "SQL/NoSQL")
|
|
57
|
+
Rel(api, cache, "Caches data", "Redis Protocol")
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### **NestJS API Template**
|
|
61
|
+
```mermaid
|
|
62
|
+
C4Context
|
|
63
|
+
title System Context diagram for NestJS API
|
|
64
|
+
|
|
65
|
+
System_Ext(client, "Client Applications", "Various client types")
|
|
66
|
+
System(nestjs_api, "NestJS API", "Enterprise Node.js API with NestJS")
|
|
67
|
+
SystemDb(database, "Database", "TypeORM supported database")
|
|
68
|
+
System_Ext(auth, "Authentication Service", "JWT/OAuth provider")
|
|
69
|
+
|
|
70
|
+
Rel(client, nestjs_api, "API calls", "HTTPS/REST")
|
|
71
|
+
Rel(nestjs_api, database, "Data operations", "TypeORM")
|
|
72
|
+
Rel(nestjs_api, auth, "Authentication", "JWT/OAuth")
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 🌐 **Full-stack Application Templates**
|
|
78
|
+
|
|
79
|
+
### **Next.js Full-stack Template**
|
|
80
|
+
```mermaid
|
|
81
|
+
C4Context
|
|
82
|
+
title System Context diagram for Next.js Application
|
|
83
|
+
|
|
84
|
+
Person(user, "User", "Application user")
|
|
85
|
+
System(nextjs_app, "Next.js Application", "Full-stack React framework")
|
|
86
|
+
SystemDb(database, "Database", "Database system")
|
|
87
|
+
System_Ext(cdn, "Vercel CDN", "Static assets and ISR")
|
|
88
|
+
|
|
89
|
+
Rel(user, nextjs_app, "Uses application", "HTTPS")
|
|
90
|
+
Rel(nextjs_app, database, "Data operations", "Database connection")
|
|
91
|
+
Rel(nextjs_app, cdn, "Serves static content", "CDN")
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## 📦 **Monorepo Templates**
|
|
97
|
+
|
|
98
|
+
### **NX Monorepo Template**
|
|
99
|
+
```mermaid
|
|
100
|
+
C4Context
|
|
101
|
+
title System Context diagram for NX Monorepo Workspace
|
|
102
|
+
|
|
103
|
+
Person(dev, "Developer", "Development team member")
|
|
104
|
+
System(nx_workspace, "NX Workspace", "Monorepo with multiple applications")
|
|
105
|
+
System_Ext(registry, "Package Registry", "npm/private registry")
|
|
106
|
+
System_Ext(ci_cd, "CI/CD Pipeline", "Build and deployment automation")
|
|
107
|
+
|
|
108
|
+
Rel(dev, nx_workspace, "Develops", "CLI/IDE")
|
|
109
|
+
Rel(nx_workspace, registry, "Publishes packages", "npm publish")
|
|
110
|
+
Rel(nx_workspace, ci_cd, "Triggers builds", "Git hooks")
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### **Lerna Monorepo Template**
|
|
114
|
+
```mermaid
|
|
115
|
+
C4Context
|
|
116
|
+
title System Context diagram for Lerna Monorepo
|
|
117
|
+
|
|
118
|
+
Person(dev, "Developer", "Team member")
|
|
119
|
+
System(lerna_mono, "Lerna Monorepo", "Multi-package repository")
|
|
120
|
+
System_Ext(npm, "NPM Registry", "Package registry")
|
|
121
|
+
System_Ext(git, "Git Repository", "Version control")
|
|
122
|
+
|
|
123
|
+
Rel(dev, lerna_mono, "Manages packages", "Lerna CLI")
|
|
124
|
+
Rel(lerna_mono, npm, "Publishes", "npm")
|
|
125
|
+
Rel(lerna_mono, git, "Version control", "Git")
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## ☁️ **Serverless Templates**
|
|
131
|
+
|
|
132
|
+
### **AWS Lambda Template**
|
|
133
|
+
```mermaid
|
|
134
|
+
C4Context
|
|
135
|
+
title System Context diagram for AWS Lambda Functions
|
|
136
|
+
|
|
137
|
+
System_Ext(client, "Client", "Application or API Gateway")
|
|
138
|
+
System(lambda, "Lambda Functions", "Serverless compute functions")
|
|
139
|
+
SystemDb(dynamo, "DynamoDB", "NoSQL database")
|
|
140
|
+
System_Ext(s3, "S3 Bucket", "File storage")
|
|
141
|
+
|
|
142
|
+
Rel(client, lambda, "Invokes functions", "API Gateway/Direct")
|
|
143
|
+
Rel(lambda, dynamo, "Data operations", "AWS SDK")
|
|
144
|
+
Rel(lambda, s3, "File operations", "AWS SDK")
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## 🎯 **Container Level Templates**
|
|
150
|
+
|
|
151
|
+
### **React SPA Container Diagram**
|
|
152
|
+
```mermaid
|
|
153
|
+
C4Container
|
|
154
|
+
title Container diagram for React SPA
|
|
155
|
+
|
|
156
|
+
Person(user, "User")
|
|
157
|
+
|
|
158
|
+
Container(web_app, "Web Application", "React, TypeScript", "Single-page application")
|
|
159
|
+
Container(api_app, "API Application", "Node.js, Express", "Provides functionality via API")
|
|
160
|
+
ContainerDb(database, "Database", "PostgreSQL", "Stores data")
|
|
161
|
+
|
|
162
|
+
Rel(user, web_app, "Uses", "HTTPS")
|
|
163
|
+
Rel(web_app, api_app, "Makes API calls to", "JSON/HTTPS")
|
|
164
|
+
Rel(api_app, database, "Reads from and writes to", "SQL/JDBC")
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### **Monorepo Container Diagram**
|
|
168
|
+
```mermaid
|
|
169
|
+
C4Container
|
|
170
|
+
title Container diagram for NX Monorepo
|
|
171
|
+
|
|
172
|
+
Person(dev, "Developer")
|
|
173
|
+
|
|
174
|
+
Container(web_app, "Web Application", "React", "Main user-facing app")
|
|
175
|
+
Container(admin_app, "Admin Application", "React", "Administrative interface")
|
|
176
|
+
Container(api, "API Service", "Node.js/NestJS", "Backend API service")
|
|
177
|
+
Container(shared_lib, "Shared Libraries", "TypeScript", "Common utilities and types")
|
|
178
|
+
ContainerDb(database, "Database", "PostgreSQL", "Shared database")
|
|
179
|
+
|
|
180
|
+
Rel(dev, web_app, "Develops")
|
|
181
|
+
Rel(dev, admin_app, "Develops")
|
|
182
|
+
Rel(dev, api, "Develops")
|
|
183
|
+
Rel(web_app, shared_lib, "Uses")
|
|
184
|
+
Rel(admin_app, shared_lib, "Uses")
|
|
185
|
+
Rel(api, shared_lib, "Uses")
|
|
186
|
+
Rel(web_app, api, "API calls", "HTTPS")
|
|
187
|
+
Rel(admin_app, api, "API calls", "HTTPS")
|
|
188
|
+
Rel(api, database, "Persists data")
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## 🧩 **Component Level Templates**
|
|
194
|
+
|
|
195
|
+
### **React Component Structure**
|
|
196
|
+
```mermaid
|
|
197
|
+
C4Component
|
|
198
|
+
title Component diagram for React Application
|
|
199
|
+
|
|
200
|
+
Container(web_app, "Web Application", "React")
|
|
201
|
+
|
|
202
|
+
Component(app_comp, "App Component", "React Component", "Main application component")
|
|
203
|
+
Component(router, "Router", "React Router", "Handles client-side routing")
|
|
204
|
+
Component(pages, "Page Components", "React Components", "Individual page components")
|
|
205
|
+
Component(components, "UI Components", "React Components", "Reusable UI components")
|
|
206
|
+
Component(hooks, "Custom Hooks", "React Hooks", "Business logic hooks")
|
|
207
|
+
Component(services, "API Services", "TypeScript", "API communication layer")
|
|
208
|
+
Component(utils, "Utilities", "TypeScript", "Helper functions and utilities")
|
|
209
|
+
|
|
210
|
+
Rel(app_comp, router, "Uses")
|
|
211
|
+
Rel(router, pages, "Routes to")
|
|
212
|
+
Rel(pages, components, "Renders")
|
|
213
|
+
Rel(pages, hooks, "Uses")
|
|
214
|
+
Rel(hooks, services, "Calls")
|
|
215
|
+
Rel(services, utils, "Uses")
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## 🔧 **Template Selection Logic**
|
|
221
|
+
|
|
222
|
+
### **Detection Patterns**
|
|
223
|
+
```typescript
|
|
224
|
+
// Template selection based on project detection
|
|
225
|
+
const templateMappingRules = {
|
|
226
|
+
// SPA Projects
|
|
227
|
+
'spa-react': {
|
|
228
|
+
contextTemplate: 'react-spa-context',
|
|
229
|
+
containerTemplate: 'spa-container-diagram',
|
|
230
|
+
componentTemplate: 'react-component-structure'
|
|
231
|
+
},
|
|
232
|
+
|
|
233
|
+
// API Projects
|
|
234
|
+
'node-api': {
|
|
235
|
+
contextTemplate: 'nodejs-api-context',
|
|
236
|
+
containerTemplate: 'api-service-containers',
|
|
237
|
+
componentTemplate: 'api-layered-components'
|
|
238
|
+
},
|
|
239
|
+
|
|
240
|
+
// Monorepo Projects
|
|
241
|
+
'nx-monorepo': {
|
|
242
|
+
contextTemplate: 'nx-workspace-context',
|
|
243
|
+
containerTemplate: 'monorepo-container-diagram',
|
|
244
|
+
componentTemplate: 'nx-lib-components'
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// ... more mappings
|
|
248
|
+
}
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
**Templates**: 🎨 **Adaptive & Project-Aware**
|
|
254
|
+
**Strategy**: Seleção automática baseada em detecção de projeto
|
|
255
|
+
**Fallback**: Template genérico quando tipo não identificado
|
|
256
|
+
**Extensibilidade**: Novos templates facilmente adicionáveis
|