Deploy Now

Stars

2,647

Forks

227

Watchers

97

Developer links

Hocuspocus

Hocuspocus is the WebSocket backend that turns a regular editor into a multiplayer one: two people open the same document, type at the same time, and watch each other's words appear in place, with every keystroke merged cleanly and no save conflicts to untangle later. The server speaks the Yjs synchronization protocol, so clients built with Tiptap, ProseMirror, Slate, Quill, or Monaco editors connect over a persistent connection and exchange small updates that the conflict-free data type orders correctly regardless of arrival sequence, and awareness messages carry cursor positions and presence so collaborators see who is in the document. Teams that outgrow one process add the Redis extension to balance connections across multiple server instances, reaching very large numbers of simultaneous editors on the same documents. Persistence extensions store documents in SQLite for small deployments or in a database or S3-compatible storage through your own fetch and store callbacks, the webhook extension notifies your application when documents change, throttling guards against abusive connections, and hooks for authentication and document loading let you enforce per-document permissions before anyone joins. Developers embed the server into an existing Node.js, Bun, Deno, or Cloudflare Workers runtime, or run it as the collaboration tier beside their main application, and offline-first clients queue changes locally and synchronize when the connection returns. Running on a dedicated VPS on RepoCloud with guaranteed CPU, RAM, and SSD, full root SSH access, and a browser serial console. MIT licensed.

Hocuspocus

Benefits

  • Multiplayer Editing Without Merge Conflicts
  • The conflict-free data type merges simultaneous edits in any arrival order, so collaborators type in the same paragraph at the same time without overwrites, locked sections, or lost sentences to reconcile afterward.
  • Scales From Side Project To Platform
  • A single process serves small tools directly, and the Redis extension distributes connections and document state across multiple server instances when simultaneous editors grow into the hundreds of thousands.
  • Persistence Through Pluggable Storage Extensions
  • Documents are stored in SQLite for small deployments, in S3-compatible object storage, or through your own fetch and store callbacks connected to an existing database, keeping the collaboration tier inside your architecture.
  • Fits Editors You Already Use
  • Clients for Tiptap, ProseMirror, Slate, Quill, and Monaco editors connect over WebSocket, first-class React bindings simplify integration, and offline-first clients queue changes locally and synchronize when the connection returns.

Features

  • Yjs WebSocket Synchronization Server
  • Accepts persistent WebSocket connections from editor clients, exchanges incremental document updates, and resolves ordering through the Yjs conflict-free replicated data type independent of arrival sequence.
  • Awareness And Presence State
  • A separate awareness protocol carries cursor positions, selections, and user presence alongside document content, so collaborators see who is in the document and where they are working.
  • Redis Scaling Extension
  • The Redis extension synchronizes messages across multiple server instances behind a load balancer, removing the single-process ceiling for applications with very large numbers of simultaneous editors.
  • Storage Extension Family
  • SQLite persists documents for small deployments, S3 stores them in compatible object storage, and the database extension accepts fetch and store callbacks for existing application databases.
  • Webhooks Throttling And Logging
  • The webhook extension notifies your application when documents change, throttling limits abusive connection rates, and the logger extension records connections, document activity, and errors for operations.
  • Runs On Modern Runtimes
  • The server runs on Node.js, Bun, Deno, and Cloudflare Workers, embeds into existing applications through lifecycle hooks, and ships a provider library with first-class React bindings.

Apps Similar to Hocuspocus