UNPKG

2.42 kBMarkdownView Raw
1_This README is for `sharedb@1.x`. For `sharedb@1.x-beta`, see [the 1.x-beta branch](https://github.com/share/sharedb/tree/1.x-beta). To upgrade, see [the upgrade guide](https://github.com/share/sharedb/wiki/Upgrading-to-sharedb@1.0.0-from-1.0.0-beta)._
2
3# ShareDB
4
5 [![NPM Version](https://img.shields.io/npm/v/sharedb.svg)](https://npmjs.org/package/sharedb)
6 ![Test](https://github.com/share/sharedb/workflows/Test/badge.svg)
7 [![Coverage Status](https://coveralls.io/repos/github/share/sharedb/badge.svg?branch=master)](https://coveralls.io/github/share/sharedb?branch=master)
8
9ShareDB is a realtime database backend based on [Operational Transformation
10(OT)](https://en.wikipedia.org/wiki/Operational_transformation) of JSON
11documents. It is the realtime backend for the [DerbyJS web application
12framework](http://derbyjs.com/).
13
14For questions, discussion and announcements, join the [ShareJS mailing
15list](https://groups.google.com/forum/?fromgroups#!forum/sharejs) or [check the FAQ](./docs/faq.md).
16
17Please report any bugs you find to the [issue
18tracker](https://github.com/share/sharedb/issues).
19
20## Features
21
22 - Realtime synchronization of any JSON document
23 - Concurrent multi-user collaboration
24 - Synchronous editing API with asynchronous eventual consistency
25 - Realtime query subscriptions
26 - Simple integration with any database
27 - Horizontally scalable with pub/sub integration
28 - Projections to select desired fields from documents and operations
29 - Middleware for implementing access control and custom extensions
30 - Ideal for use in browsers or on the server
31 - Offline change syncing upon reconnection
32 - In-memory implementations of database and pub/sub for unit testing
33 - Access to historic document versions
34 - Realtime user presence syncing
35
36## Documentation
37
38https://share.github.io/sharedb/
39
40## Examples
41
42### Counter
43
44[<img src="examples/counter/demo.gif" height="300">](examples/counter)
45
46### Leaderboard
47
48[<img src="examples/leaderboard/demo.gif" height="436">](examples/leaderboard)
49
50## Development
51
52### Documentation
53
54The 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/):
55
56```bash
57gem install jekyll bundler
58```
59
60The docs can be built locally and served with live reload:
61
62```bash
63npm run docs:install
64npm run docs:start
65```