PlantUML is a plain text diagramming language. It can be used in Org Babel to display diagrams in Org Mode files.

It can generate the following UML diagrams:

  • Sequence diagram
  • Usecase diagram
  • Class diagram
  • Object diagram
  • Activity diagram (here is the legacy syntax)
  • Component diagram
  • Deployment diagram
  • State diagram
  • Timing diagram

Sequence Diagram

title Example Sequence Diagram
activate Client
Client -> Server: Session Initiation
note right: Client requests new session
activate Server
Client <-- Server: Authorization Request
note left: Server requires authentication
Client -> Server: Authorization Response
note right: Client provides authentication details
Server --> Client: Session Token
note left: Session established
deactivate Server
Client -> Client: Saves token
deactivate Client

img

Class Diagram

title Hello World
scale 600 width

note "An Example of Class Diagram" as NOTE1

interface Interface {
    public void method1();
    public void method2();
}

class NullObject extends Interface
note bottom of NullObject: refer to design pattern "null object"

abstract class BaseClass implements Interface {
    private int flag;
    protected void helper(){...}
}

class Concrete1 extends BaseClass
class Concrete2 extends BaseClass

img

See PlantUML Reference Guide