This repository includes an example on building architecture diagrams by using code. It currently shows examples in PlantUML and Structurizr.
The repository contains all the necessary tools for a quick run. See below the dependencies used. You just need to clone the repository and use the makefile.
make
generates png and svg versions of plantUML diagrams, and png versions of Structurizr diagrams
make open
opens the png files with the default program on Linux (needs xdg-open)
If make open
doesn't work, just check the out/
folder for the results.
If make
doesn't work for some reason, check the makefile for command line examples.
Both samples show the same example: a system for buying train tickets.
Actors:
- Buyer
- Passenger
- Train personnel
- Train company back office - respond to complaints
- Train company sales department - need reports
Features:
- Reserve ticket - with or without paying
- Buy ticket
- Present ticket to control
- Complain about ticket / trip
- Get ticket reimbursed
- plantuml binary from official website
- Nice skins for plant uml from puml-themes
- puml support for the C4 model from C4-PlantUML
- Structurizr binary from the official website
The following resources are useful to learn more about the tools used:
- PlantUML official guide
- Structurizr official documentation
- ThoughtWorks Tech Radar article on architecture diagrams as code
- Structurizr DSL reference ('hidden' deep in the site)
- C4 Model primer
- Conversation with Simon Brown, the creator of C4 and Structurizr
- PlantUML tips and tricks blog post
- Skin parameters for PlantUML
Additional tools for integrating PlantUML or Structurizr with other tools: