PlantUML: The Ultimate System Design Aid

Sidharth Padhee
3 min readMar 5, 2022

As I gain more experience in writing software, I am constantly in search of tools that make my life easy and also save a lot of time. Some of the tools that i use are —

  1. Vim Everywhere — Starting from my code editors, to terminal command line, to my browser — all have vim keybindings. Heck, I have even customised my keyboard to create a HYPERKEY setup and Vim Everywhere mode via Hammerspoon and Karabiner.
  2. Sourcegraph — Code search in all repositories. Using the Sourcegraph extension in VSCode is very seamless.
  3. Alfred — This app gives you a Mac Spotlight like search capability, but on steroids. I create custom web searches in this app to get to websites with parameterised URLs in a matter of seconds. The Alfred Powerpack can make you more productive than ever with personalised workflows and endless automation of basic tasks!

But PlantUML is one of the most impressive tools!

What if i told you, You can code your architecture, interaction, sequence and class diagrams ? PlantUML does exactly that!

I have created templates for different types of Engineering diagrams, which I can quickly pull up and start charting my design!

For example this is my Architecture / Interaction Diagram Template.

Just paste the above code on the online server. This should generate something like this —

Now to add interaction between components in this diagram you just have to add —

service -> q : Push Elements into queue

There you go — You can code, save, version control, copy/paste your diagrams with amazing speed! You also have a lot of choices for the icons that you use in these diagrams.

You want to chart a sequence diagram ? This is my template —

I urge you to explore all the different diagrams in plantuml.com. It will definitely make your life very easy. For example, I was able to chart the high level design of a very basic chat application in like 10 mins →

Pro Tip:

1. Download VSCode.
2. Install PlantUML VSCode extension.
3. Create *.puml file.
4. Add your Plant UML code and run PlantUML: Preview Current Diagram to generate the diagram.

You don’t need draw.io, lucidchart.com, smartdraw.com, etc. Make the folder a git repository and you have an amazing local UML Design tool with version control!

From your next project, the design documentation could actually be part of your code repository. We can use CI/CD to re-generate these diagrams ( or Makefile with a make diagram target ). These diagrams can be imported in the README and other markdown documents. The documentation can be updated with your code as your architecture evolves.

--

--