Listen to this post
Structurizr is primarily a diagram generation tool created by Simon Brown, the creator of the C4 Model. The primary focus of the tool is the rapid generation of several diagrams with the same components. It appears that Simon was tired of the other tools that make you reinvent the wheel. I share the sentiment and believe that most diagram tools don’t facilitate reuse.
Primary Use Cases
- Creation of architecture diagrams
- Capture architecture decisions
- Diagram review
- Saving time!
Building diagrams can be very tedious, and Structrizr addresses this tedium. A typical workflow in Structurizr looks like this.
- Add diagram elements
- Create relationships
- Layout your diagram
- Download your diagrams
Diagrams can be edited using the Structurizr command-line interface. If you’re on macOS you can follow these steps to start editing immediately.
# Install docker or some other docker-like app wget -P /tmp https://raw.githubusercontent.com/structurizr/cli/master/examples/getting-started/workspace.dsl docker pull structurizr/lite docker run -it --rm -p 8080:8080 -v /tmp:/usr/local/structurizr structurizr/lite open http://localhost:8080/ # Start editing! # Update /tmp with your preferred directory
I’ve found that learning how to use Structrizr will take time. I’ve barely scratched the surface of what it can do, but luckily you can get help.
I like to learn with examples. I found the Spring PetClinic example to be the best way to learn how to use it. Try exporting the workspace from the workspace menu.
Then import the workspace so you can explore how those diagrams were created.
Learn Structurizr – Beyond the Basics
- The Structurizr Website
- https://structurizr.org/ – The open-source community site for Structurizr tooling.
- Structurizr CLI – A command line interface.
- Structurizr DSL Editor – An editor for the domain specific language.
- Getting started with Structurizr Lite – A free version you can run on your machine.
- Structurizr Puppeteer – Automate the usage of the Structurizr UI.
- Simon Brown’s Website
- The C4 Model