Diagrams such as our context diagram are created using PlantUML i.e. diagrams as code.
💡 Hint: For C4 diagrams, see PlantUML library for C4 for more information.
- Install the PlantUML extension.
- Run a local PlantUML server using Docker:
docker run --name plantuml -d -p 1234:8080 plantuml/plantuml-server:jetty
- Create a
.vscode/settings.json
if one does not exist. - Within the
settings.json
file, add the follow properties:
{
"plantuml.server": "http://localhost:1234",
"plantuml.render": "PlantUMLServer"
}
This tells the PlantUML extension to use the local PlantUML server to render diagrams.
- Edit the
.puml
file for the diagram. - Preview any changes to the diagram by using
Alt + D
on Windows orOption + D
on MacOS.
When all changes have been made:
- Push your code back to the repository, the Generate PlantUML Diagrams GitHub Action will generate the required output file(s) automatically.
We have a GitHub Actions workflow named Generate PlantUML Diagrams
has been created to assist in the generation of diagrams. This automatically creates .svg
diagrams for each .puml
file within the ./docs/diagrams
directory. The benefit of this workflow is that the author does not have to manually
generate these diagrams.
This will execute on all branches on a git push
. The workflow can also be executed manually via the GitHub Actions page.