Context Map
The context map visualizes the bounded context relationships defined in domains.json. Each node represents a bounded context. Edges show upstream/downstream relationships with their integration type (conformist, ACL, partnership, shared-kernel).
Interactive Visualization
Section titled “Interactive Visualization”What This Shows
Section titled “What This Shows”The visualization renders data from a domains.json file using ERPNext as the reference dataset:
- Node size reflects lines of code in the context
- Node color indicates context type: core (blue), supporting (green), generic (gray)
- Edge labels show the relationship type between contexts
- Edge direction flows from upstream to downstream
Sample Data
Section titled “Sample Data”This visualization renders the following domains.json structure:
{ "contexts": [ { "name": "Accounts", "type": "core", "loc": 45000, "dependencies": ["Stock", "Selling", "Buying"] }, { "name": "Stock", "type": "supporting", "loc": 28000, "dependencies": ["Accounts"] }, { "name": "Selling", "type": "supporting", "loc": 12000, "dependencies": ["Accounts", "Stock"] }, { "name": "Buying", "type": "supporting", "loc": 10000, "dependencies": ["Accounts", "Stock"] }, { "name": "Setup", "type": "generic", "loc": 8000, "dependencies": [] } ], "contextMap": [ { "upstream": "Accounts", "downstream": "Stock", "type": "conformist" }, { "upstream": "Accounts", "downstream": "Selling", "type": "conformist" }, { "upstream": "Accounts", "downstream": "Buying", "type": "conformist" }, { "upstream": "Setup", "downstream": "Accounts", "type": "shared-kernel" } ]}Reading the Map
Section titled “Reading the Map”| Relationship | Meaning | Visual |
|---|---|---|
| Conformist | Downstream adopts upstream’s model without translation | Solid arrow |
| ACL | Anti-Corruption Layer translates between models | Dashed arrow with shield |
| Partnership | Both contexts evolve together | Bidirectional arrow |
| Shared Kernel | Shared code/model owned jointly | Thick connecting line |
Using Context Maps in Modernization
Section titled “Using Context Maps in Modernization”Context maps answer critical questions during extraction:
- Where to start? — Core contexts with few upstream dependencies
- What breaks if I change this? — Follow downstream relationships
- Where do I need ACLs? — At conformist boundaries that should become independent
- What can be extracted independently? — Generic contexts with low coupling
Next Steps
Section titled “Next Steps”- domains.json Specification — Full field reference
- Dependency Graph — File-level dependency visualization