FlowDiagram
UML: sequence, class & stateMermaid

WebSocket chat message sequence diagram template

Shows a chat message travelling from sender to recipients over WebSockets, via a chat server, pub/sub broker and message store, with offline push; used by real-time app developers. This sequence diagram template contains 6 labelled participants.

Open in the editor →
  • Free — no account, no trial, no watermark
  • Fully editable shapes and connectors, not a screenshot
  • Export PNG, SVG or PDF, or share it as a link
  • Private: the diagram never leaves your browser

Participants in this sequence diagram

  • Alice
  • Chat server
  • Pub/sub broker
  • Message store
  • Push service
  • Bob

How to use this sequence diagram template

  1. Click Open in the editor. The sequence diagram opens on a new page in FlowDiagram — nothing is uploaded and there is no sign-up.
  2. Rename, add or delete shapes and drag them where you want; connectors stay attached as things move.
  3. Drop in vendor logos from the library — 1,160 of them, including every AWS, Azure and Google Cloud service icon — or restyle it with the colour and theme controls.
  4. Prefer text? Edit the Mermaid source below and paste it in through ☰ → Import diagram (see the Mermaid editor); it imports as an editable diagram.
  5. Export to PNG, SVG or PDF, or press Ctrl+L for a link that carries the whole diagram.

Mermaid source

The whole template is the text below. Paste it into FlowDiagram, keep it in Git next to the code it describes, or hand it to an AI assistant to extend.

sequenceDiagram
  autonumber
  actor A as Alice
  participant WS as Chat server
  participant Bus as Pub/sub broker
  participant DB as Message store
  participant Push as Push service
  actor B as Bob
  A->>WS: send {room: 7, text: "Hi"}
  WS->>DB: Persist message, assign id
  DB-->>WS: Message id 9812
  WS-->>A: ack 9812 (sent)
  WS->>Bus: Publish to room:7
  Bus->>WS: Fan out to subscribed nodes
  alt Bob online
    WS->>B: message 9812
    B-->>WS: delivered receipt
    WS-->>A: delivered tick
  else Bob offline
    WS->>Push: Notify Bob's devices
    Push-->>B: Push notification
  end
  B->>WS: read 9812
  WS-->>A: read receipt

Related: Mermaid editor · All uml: sequence, class & state templates · All 521 templates