2.3. UML PlantUML

2.3.1. Class Diagram

../../_images/uml-plantuml-diagram-class.png
```plantuml

class Account {
    # username: str
    # password: str
    + login(username: str, password: str) -> None
    + logout() -> None
}

class User {
    # groups: list[str] = ['user']
    + edit_profile() -> None
}

class Admin {
    # groups: list[str] = ['staff', 'admin']
    + edit_user(uid: int) -> None
    + delete_user(uid: int) -> None
}

Account <|-- User
Account <|-- Admin

note as COMMENT
    class User inherits from Account
    class Admin inherits from Account
endnote

```

2.3.2. Sequence Diagram

../../_images/uml-plantuml-diagram-sequence.png
```plantuml
autonumber

actor Client
participant Server
database Database

activate Client
Client ->> Server: HTTP Request

activate Server
Server ->> Database: SQL Query

activate Database
Database -->> Server: Result
deactivate Database

Server -->> Client: HTTP Response
deactivate Server

deactivate Client
```
../../_images/uml-plantuml-diagram-sequence2.png
```plantuml
participant Participant as Foo
actor       Actor       as Foo1
boundary    Boundary    as Foo2
control     Control     as Foo3
entity      Entity      as Foo4
database    Database    as Foo5
collections Collections as Foo6
queue       Queue       as Foo7

Foo -> Foo1 : To actor
Foo -> Foo2 : To boundary
Foo -> Foo3 : To control
Foo -> Foo4 : To entity
Foo -> Foo5 : To database
Foo -> Foo6 : To collections
Foo -> Foo7: To queue
```

2.3.3. Gantt

../../_images/uml-plantuml-diagram-gantt-1.png
```plantuml
@startgantt

Project starts 2000-01-01
2000-01-26 to 2000-01-28 are colored in salmon
saturday are closed
sunday are closed

-- Version v1.0 --

[Prototype] starts 2000-01-05
[Prototype] lasts 18 days
[Prototype] is colored in Lavender

[Testing] starts 2000-01-31
[Testing] lasts 10 days
[Testing] is colored in LightBlue

-- Version v2.0 --

[MVP] starts 2000-01-15
[MVP] lasts 10 days
then [Test] lasts 5 days
```
../../_images/uml-plantuml-diagram-gantt-2.png
```plantuml
@startgantt
<style>
ganttDiagram {
  timeline {
    LineColor transparent
    FontColor transparent
 }
}
</style>

hide footbox

[Test prototype] requires 7 days
[Prototype completed] happens at [Test prototype]'s end
[Setup assembly line] requires 9 days

[Setup assembly line] starts at [Test prototype]'s end
then [Setup] requires 5 days

[T2] requires 2 days and starts at [Test prototype]'s end
then [T3] requires 3 days

-- end task --

then [T4] requires 2 days
@endgantt
```
../../_images/uml-plantuml-diagram-gantt-3.png
```plantuml
@startgantt
[foo] requires 21 days
[foo] is 40% completed
[bar] requires 30 days and is 10% complete
@endgantt
```
../../_images/uml-plantuml-diagram-gantt-4.png
```plantuml
@startgantt

<style>
ganttDiagram {
  task {
    BackGroundColor GreenYellow
    LineColor Green 
    unstarted {
      BackGroundColor Fuchsia 
      LineColor FireBrick
    }
  }
}
</style>

[Prototype design] requires 7 days
[Test prototype 0] requires 4 days
[Test prototype 10] requires 4 days
[Test prototype 20] requires 4 days
[Test prototype 30] requires 4 days
[Test prototype 40] requires 4 days
[Test prototype 50] requires 4 days
[Test prototype 60] requires 4 days
[Test prototype 70] requires 4 days
[Test prototype 80] requires 4 days
[Test prototype 90] requires 4 days
[Test prototype 100] requires 4 days

[Test prototype 0] starts at [Prototype design]'s end
[Test prototype 10] starts at [Prototype design]'s end
[Test prototype 20] starts at [Prototype design]'s end
[Test prototype 30] starts at [Prototype design]'s end
[Test prototype 40] starts at [Prototype design]'s end
[Test prototype 50] starts at [Prototype design]'s end
[Test prototype 60] starts at [Prototype design]'s end
[Test prototype 70] starts at [Prototype design]'s end
[Test prototype 80] starts at [Prototype design]'s end
[Test prototype 90] starts at [Prototype design]'s end
[Test prototype 100] starts at [Prototype design]'s end

[Test prototype 0] is 0% complete
[Test prototype 10] is 10% complete
[Test prototype 20] is 20% complete
[Test prototype 30] is 30% complete
[Test prototype 40] is 40% complete
[Test prototype 50] is 50% complete
[Test prototype 60] is 60% complete
[Test prototype 70] is 70% complete
[Test prototype 80] is 80% complete
[Test prototype 90] is 90% complete
[Test prototype 100] is 100% complete

@endgantt
```
../../_images/uml-plantuml-diagram-gantt-5.png

2.3.4. Theming

```plantuml
!theme plain
```

2.3.5. Config