Why I Created the PlantUML Theme for Docusaurus
· 2 min read
Wherever generative AI can be used, I want to make the most of it.
That includes writing detailed design documents.
That's why I created the PlantUML theme.
Mermaid is a good option, but I preferred PlantUML because Mermaid’s default diagrams are too large, and it lacks support for use case diagrams.
Anyway, here’s a sample I created:
Benefits of Using PlantUML
- With PlantUML or Mermaid, UML diagrams can be fully written in text 🎵
- This makes it easy to manage with GitHub.
- It can also be generated using AI.
The above sample was generated using ChatGPT.
Here is the prompt I used:
Create a sample detailed design document in markdown (mdx) format.
The specifications are as follows:
- Backend using gRPC (connect-go)
- Viewing a customer list
- Conditions for mdx output:
- Use `1.` for all bullet points.
- Use half-width symbols (`(` and `:`).
- Do not include section numbers in headings.
- Processing order:
- Authentication
- Error check. Exit process if an error occurs.
- Parameter validation
- Error check. Exit process if an error occurs.
- Database permission check
- DB selection
- Error check. Exit process if an error occurs.
- Retrieve list from database
- Apply conditions based on parameters
- Fetch the list
- Convert to result format
- Return result to client
- Document structure:
- Overview (1-2 line description of the process)
- Prerequisites
- CRUD - Only "R" (Read) this time, with referenced table name
- Parameter specifications
- Result specifications
- Sequence diagram - Written in PlantUML, enclosed in ```pumld``` code blocks
- Processing details - Text-based, covering authentication, SQL queries, etc., written using `###`
We truly live in a convenient world!