Sequence Diagrams
Sequence diagrams show interactions between actors over time.
Basic Sequence
Section titled “Basic Sequence”sequenceDiagram participant Alice participant Bob Alice->>John: Hello John, how are you? John-->>Alice: Great! Alice->>John: See you later!
With Notes and Loops
Section titled “With Notes and Loops”sequenceDiagram
participant Client
participant Server
participant Database
Client->>Server: POST /api/login
Note over Server: Validate credentials
Server->>Database: SELECT user WHERE email=?
Database-->>Server: user row
alt password matches
Server-->>Client: 200 OK + JWT
else invalid password
Server-->>Client: 401 Unauthorized
end
Note over Client: Store token
Activation Boxes
Section titled “Activation Boxes”sequenceDiagram Alice->>+Bob: Hello Bob, how are you? Bob->>+Alice: Great thanks! Alice-->>-Bob: See you later! Bob-->>-Alice: Goodbye!