Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_collaborative-editor

Real-Time Collaborative Document Editor (CRDT / Yjs & WebSockets)

7 COMPONENTS · 6 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[![Real-Time Collaborative Document Editor (CRDT / Yjs & WebSockets) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_collaborative-editor/opengraph-image)](https://archos.sageideas.dev/d/dgm_collaborative-editor)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_collaborative-editor)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_collaborative-editor" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Real-Time Collaborative Document Editor (CRDT / Yjs & WebSockets) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0["Browser Clients"]
  ws_1["WebSocket Edge GW"]
  room_2[("Doc Sync Room")]
  red_3[("Redis Pub/Sub")]
  opl_4[("Append Op-Log Store")]
  s3_5[("Compacted Snapshots")]
  downstream_6["Downstream & OTel"]
  client_0 -->|"1. Binary · WSS"| ws_1
  ws_1 -->|"2. Route by · gRPC"| room_2
  room_2 -.->|"3a. Broadcast · PubSub"| red_3
  room_2 -.->|"3b. Batch · SQL"| opl_4
  s3_5 -->|"Compact · S3 API"| opl_4
  opl_4 -.->|"4. Emit / · OTLP/API"| downstream_6

COMPONENT STACK (7)

  • Browser ClientsSTATELESS
    Local Yjs CRDT + IndexedDB
  • WebSocket Edge GWSTATELESS
    Consistent-hashes by doc_id
  • Doc Sync RoomSTATEFUL
    Merges CRDT ops + presence
  • Redis Pub/SubSTATEFUL
    Cross-pod presence & cursors
  • Append Op-Log StoreSTATEFUL
    Durable binary CRDT deltas
  • Compacted SnapshotsSTATEFUL
    Periodic merged doc state
  • Downstream & OTelSTATELESS
    Consumers, metrics & SLOs

REQUEST & DATA FLOW (6)

  1. Browser Clients → WebSocket Edge GW (Binary)[WSS]
  2. WebSocket Edge GW → Doc Sync Room (Route by)[gRPC]
  3. Doc Sync Room → Redis Pub/Sub (Broadcast)[PubSub]
  4. Doc Sync Room → Append Op-Log Store (Batch)[SQL]
  5. Compacted Snapshots → Append Op-Log Store (Compact)[S3 API]
  6. Append Op-Log Store → Downstream & OTel (Emit /)[OTLP/API]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →