How it works
Every document in DocuSphere has a unique Liveblocks room whose ID matches the document’s ID in Convex. When you open a document, your browser joins that room. The Tiptap editor connects to the room using theuseLiveblocksExtension hook, which synchronises all editor state — text, formatting, cursor positions, and page layout — across every connected session.
Under the hood, Liveblocks uses CRDTs (conflict-free replicated data types). When two people type at the same time, their changes are merged automatically. You never see conflicting versions or have to choose which edit to keep.
Shared undo history
All collaborators share one undo stack. When you press Undo (⌘Z) or Redo (⌘Y), you step through changes made by anyone in the session — not just your own. DocuSphere disables Tiptap’s built-in undo/redo and hands full control to Liveblocks so the history stays consistent for everyone.
Shared page margins
Left and right page margins are stored in Liveblocks Storage (root.leftMargin and root.rightMargin). When one collaborator adjusts the ruler, the new margins propagate to everyone in the room immediately, keeping the page layout in sync.
Offline support is enabled with
offlineSupport_experimental: true. If you lose your connection while editing, your changes are queued locally and synced back to the room as soon as you reconnect. This feature is experimental and behaviour may change in future releases.How to start collaborating
Open your document
Navigate to any document in DocuSphere. The URL in your browser’s address bar uniquely identifies that document — for example,
https://your-app.com/documents/abc123.Share the URL
Copy the URL and send it to your teammates. Anyone who is authenticated and has access to the document (as owner or organization member) can open it.