Collaborative editing (local-first): Yjs + Hocuspocus + Tiptap + Postgres
Documents and boards several people edit at once — changes merge automatically, survive going offline, and persist to Postgres.
Sources verified Sep 2026
Circumstances — when to use it
- Several people edit the same document, page, or board at the same time
- Edits made offline or on a flaky connection must merge cleanly when it returns
- You want presence: live cursors and who's viewing
- You'd rather run the collaboration server yourself than pay per connection
Synergy — how the pieces fit
Yjs represents each document as a CRDT, so concurrent edits from any number of clients merge without conflicts and without a central lock. Tiptap binds the rich-text editor to the shared Yjs document through ProseMirror, and y-indexeddb keeps a copy in the browser so edits made offline sync when the connection returns. Hocuspocus is the WebSocket server in the middle: it authenticates each connection, relays updates and presence, persists the merged Yjs state to Postgres next to your regular rows, and fans out across instances through Redis. Your normal API keeps owning permissions, search, and everything that isn't the live document.
The tech and its role
Architectural examples
Each example links to a public source — no claims about private internals.
Outline
Open-source team knowledge base: a Hocuspocus server with Yjs and ProseMirror, whose persistence extension stores each document's Yjs state in Postgres, with Redis alongside.
sourcePlane
Open-source project management: a separate live service runs Hocuspocus with Tiptap and Yjs, using database and Redis extensions, while its editor keeps an offline copy with y-indexeddb.
sourceSkip if
Skip if edits rarely overlap — last-write-wins through a normal API is simpler, and a collaboration server is one more stateful service to run.