# sharedb

> JSON OT database backend

Latest version **6.0.3** (published 2026-09-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install sharedb
pnpm add sharedb
yarn add sharedb
bun add sharedb
```

## Health

**Score 63/100 (C)** — status: active.

Positive: has types package; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 6.0.3 |
| Published | 2026-09-07 |
| First published | 2015-10-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/sharedb) |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 682.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6535 |
| Author | Nate Smith and Joseph Gentle |
| Maintainers | nateps, rkstedman, avital, pypmannetjies, ericyhwang, alecgibson |

## Links

- npm: https://www.npmjs.com/package/sharedb
- Repository: https://github.com/share/sharedb
- Homepage: https://github.com/share/sharedb#readme
- Issues: https://github.com/share/sharedb/issues
- npm.io page: https://npm.io/package/sharedb

## Dependencies (5)

- [hat](https://npm.io/package/hat.md) 0.0.3
- [async](https://npm.io/package/async.md) ^3.2.4
- [ot-json0](https://npm.io/package/ot-json0.md) ^1.1.0
- [arraydiff](https://npm.io/package/arraydiff.md) ^0.1.3
- [fast-deep-equal](https://npm.io/package/fast-deep-equal.md) ^3.1.3

## Recent versions

- 6.0.3 (latest) — 2026-09-07
- 6.0.2 — 2026-08-25
- 6.0.1 — 2026-07-06
- 6.0.0 — 2026-06-23
- 5.2.2 — 2025-05-20
- 5.2.1 — 2025-03-11
- 5.2.0 — 2025-03-05
- 5.1.1 — 2024-10-24
- 5.1.0 — 2024-10-15
- 5.0.4 — 2024-08-27
- 5.0.3 — 2024-07-30
- 5.0.2 — 2024-06-11
- 5.0.1 — 2024-05-28
- 5.0.0 — 2024-05-17
- 4.1.5 — 2024-05-15
- … 133 more at https://npm.io/package/sharedb/versions

## README

# ShareDB

  [![NPM Version](https://img.shields.io/npm/v/sharedb.svg)](https://npmjs.org/package/sharedb)
  ![Test](https://github.com/share/sharedb/workflows/Test/badge.svg)
  [![Coverage Status](https://coveralls.io/repos/github/share/sharedb/badge.svg?branch=master)](https://coveralls.io/github/share/sharedb?branch=master)

ShareDB is a realtime database backend based on [Operational Transformation
(OT)](https://en.wikipedia.org/wiki/Operational_transformation) of JSON
documents. It is the realtime backend for the [DerbyJS web application
framework](http://derbyjs.com/).

For help, questions, discussion and announcements, join the [ShareJS mailing
list](https://groups.google.com/forum/?fromgroups#!forum/sharejs) or [read the documentation](https://share.github.io/sharedb/
).

Please report any bugs you find to the [issue
tracker](https://github.com/share/sharedb/issues).

## Features

 - Realtime synchronization of any JSON document
 - Concurrent multi-user collaboration
 - Synchronous editing API with asynchronous eventual consistency
 - Realtime query subscriptions
 - Simple integration with any database
 - Horizontally scalable with pub/sub integration
 - Projections to select desired fields from documents and operations
 - Middleware for implementing access control and custom extensions
 - Ideal for use in browsers or on the server
 - Offline change syncing upon reconnection
 - In-memory implementations of database and pub/sub for unit testing
 - Access to historic document versions
 - Realtime user presence syncing

## Documentation

https://share.github.io/sharedb/

## Examples

### Counter

[<img src="examples/counter/demo.gif" height="300">](examples/counter)

### Leaderboard

[<img src="examples/leaderboard/demo.gif" height="436">](examples/leaderboard)

## Development

### Documentation

The documentation is stored as Markdown files, but sometimes it can be useful to run these locally. The docs are served using [Jekyll](https://jekyllrb.com/), and require Ruby >2.4.0 and [Bundler](https://bundler.io/):

```bash
gem install jekyll bundler
```

The docs can be built locally and served with live reload:

```bash
npm run docs:install
npm run docs:start
```

---
_Source: https://npm.io/package/sharedb · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
