Domain Design
Create domain-driven design diagrams including bounded context maps, event storming results, and API design documentation.
Domain-driven design (DDD) diagrams document bounded contexts, context relationships, and domain events. These diagrams help teams understand domain boundaries and integration patterns.
Bounded Context Maps
Bounded context maps show:
Creating Context Maps
Context Relationship Patterns
| Pattern | Representation |
|---|---|
| Shared Kernel | Shared model subset, bidirectional line |
| Customer-Supplier | Upstream/downstream, directed arrow |
| Conformist | Downstream conforms to upstream |
| Anti-Corruption Layer | Translation layer, ACL notation |
| Open Host Service | Published API |
| Published Language | Shared schema or protocol |
Event Storming Results
Capture event storming workshop outputs:
| Element | Colour |
|---|---|
| Domain Events | Orange sticky notes |
| Commands | Blue sticky notes |
| Aggregates | Yellow sticky notes |
| Policies | Purple sticky notes |
| External Systems | Pink sticky notes |
| Actors | Small yellow for users |
Creating Event Storming Diagrams
API Design Diagrams
Document API structure visually:
Creating API Diagrams
Best Practices
Start with Events
Domain events drive design.
Define Boundaries Clearly
Ambiguous boundaries cause problems.
Document Integration
How contexts communicate matters.
Keep Context Maps Current
Update as domains evolve.
Collaborate with Experts
DDD is a team activity.
Link to Code
Connect diagrams to implementations.