🛠️Structurizr
Also known as Structurizr DSL, Structurizr Lite, workspace.dsl
A tool that draws C4 diagrams from one text model. Change it once, and every view updates.
Think of it like
It is like one toy house you take photos of. Each photo shows the same house from near or far.
Example
Jack writes a workspace.dsl file for his shop. It draws a context diagram and a container diagram from the same model, and the file lives in Git.
Why it matters
Diagrams drawn by hand drift apart as a system changes. One model keeps every view telling the same story.
Definition
Example code
structurizr
workspace {
model {
u = person "Shopper"
s = softwareSystem "Online Shop"
u -> s "Buys from"
}
views {
systemContext s {
include *
}
}
}Common mistake
Key takeaways
- 1Model as code. One text file holds the whole system.
- 2Many views. Each diagram is one view of the model.
- 3Made for C4. From the maker of the C4 model.