Structurizr Integration
Structurizr Integration
Availability
Structurizr is a C4-modeling tool and DSL ecosystem. It is generally a companion or alternative modeling environment rather than an EA-native plugin. It can be integrated with EA through documented exchange conventions, generated documentation, images, or custom automation.
Links
- Structurizr: https://structurizr.com/
- Structurizr DSL: https://github.com/structurizr/dsl
Instructions
- Define the software architecture in Structurizr DSL or the Structurizr workspace model.
- Create C4 views for system context, containers, components, and deployment where appropriate.
- Export diagrams/documentation in the format needed by stakeholders.
- Attach the exported views and DSL source to the corresponding EA package or architecture thought/model area.
- Establish ownership: either Structurizr is the C4 source of truth and EA references it, or EA is the source and a custom exporter produces Structurizr content.
- Use stable IDs and mapping tables for systems, containers, components, and relationships.
- Automate generation in CI/CD if documentation must be refreshed on every release.
Example DSL
workspace "Order Management" "C4 model" {
model {
customer = person "Customer"
orderSystem = softwareSystem "Order Management System"
payment = softwareSystem "Payment Service"
customer -> orderSystem "places orders"
orderSystem -> payment "authorizes payments"
orderSystem.containers {
web = container "Web Application" "Order entry UI" "React"
api = container "Orders API" "Processes orders" "Java/Spring"
db = containerDb "Orders Database" "Stores orders" "PostgreSQL"
web -> api "calls"
api -> db "reads/writes"
}
}
views {
systemContext orderSystem "order-context" {
include *
autolayout lr
}
container orderSystem "order-containers" {
include *
autolayout lr
}
}
}
Advantages
- Native alignment with the C4 method and DSL-based architecture-as-code.
- Clear separation between model and views.
- Suitable for version control and automated publishing.
- Useful when software teams already use Structurizr.
Limitations
- Not an EA-native MDG plugin by itself.
- Requires an integration boundary and ownership decision.
- Imported images do not provide the same semantic behavior as native EA elements.
- A custom synchronization/import tool may be needed for round-tripping.
Best use
Use Structurizr as the C4 source for software teams while EA remains the broader enterprise repository, or generate Structurizr views from EA data for automated C4 publishing.