Repolode
share

share/sharedb

Realtime JSON document database backend using Operational Transformation for multi-user collaborative editing and live sync.

Stars
6,562
Forks
458
Open issues
171
Last commit
2 days ago

What is it?

ShareDB is a realtime database backend for JSON documents, built on Operational Transformation (OT), the technique behind many collaborative editors. Clients edit documents through a synchronous API, and changes are merged with other users' edits and propagated to all connected clients with eventual consistency.

It works with any underlying database through a simple adapter integration, and supports realtime query subscriptions, projections that limit which fields are sent, and middleware for access control and custom extensions. Horizontal scaling is possible through pub/sub integration. Offline changes are synced when the connection is restored, and historic document versions can be accessed.

ShareDB runs in browsers and on the server, and includes in-memory database and pub/sub implementations for unit testing. It is the realtime backend for the DerbyJS web application framework.

Key features

  • 01Realtime synchronization of JSON documents across clients
  • 02Concurrent multi-user editing via Operational Transformation
  • 03Realtime query subscriptions
  • 04Projections to select specific fields
  • 05Middleware for access control and custom extensions
  • 06Offline change syncing on reconnection

Use cases

  • Building collaborative editing features into a web application
  • Live dashboards or leaderboards that update across connected users
  • Adding realtime sync on top of an existing database
  • Testing realtime logic with the built-in in-memory adapters

Things to know

  • The license is not identified in the metadata (NOASSERTION), so check the repository's license before using it.

Topics

FAQ

What is sharedb?
Realtime JSON document database backend using Operational Transformation for multi-user collaborative editing and live sync. ShareDB is a realtime database backend for JSON documents, built on Operational Transformation (OT), the technique behind many collaborative editors. Clients edit documents through a synchronous API, and changes are merged with other users' edits and propagated to all connected clients with eventual consistency.
Is sharedb free to use? What license does it have?
sharedb is open source under the Other license. Check the license terms before using it in commercial products.
Is sharedb still maintained?
Actively maintained. The last commit to sharedb was on Nov 5, 2026.
What can I use sharedb for?
Building collaborative editing features into a web application Live dashboards or leaderboards that update across connected users Adding realtime sync on top of an existing database Testing realtime logic with the built-in in-memory adapters
Where can I get sharedb?
The source code and installation instructions are on GitHub: https://github.com/share/sharedb

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects