Strategic Domain-driven Design

Model your domain.
Map your contexts.

Context Mapper is an open source modeling framework with a DSL for Context Mapping, Bounded Context modeling and service decomposition: write models as code, refactor them, and generate diagrams, contracts and code.

Also on Open VSX ยท Java library on Maven Central

insurance.cml
ContextMap InsuranceContextMap {
  contains CustomerManagementContext
  contains PolicyManagementContext, DebtCollection

  CustomerManagementContext [U,OHS,PL] -> [D,CF] PolicyManagementContext
  PolicyManagementContext [SK] <-> [SK] DebtCollection
}

BoundedContext PolicyManagementContext {
  type = FEATURE
  responsibilities = "Offers", "Contracts", "Policies"
}

From model to Context Map

Write your model in VS Code with validation, completion and quick fixes, then generate the graphical Context Map, PlantUML diagrams or service contracts with one command.

  1. Install the extension for VS Code
  2. Create a .cml file or start from one of our examples
  3. Refactor and generate what you need
Context Map of the insurance example, generated with Context Mapper