https://github.com/yjs/titanic
The fast CRDT database
https://github.com/yjs/titanic
Last synced: about 1 month ago
JSON representation
The fast CRDT database
- Host: GitHub
- URL: https://github.com/yjs/titanic
- Owner: yjs
- License: mit
- Created: 2022-12-07T13:31:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-22T03:18:10.000Z (5 months ago)
- Last Synced: 2024-12-22T04:21:56.112Z (5 months ago)
- Language: JavaScript
- Size: 813 KB
- Stars: 88
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Titanic
A *unique* attempt to create a multi-master eventual consistent database that
syncs many CRDTs (e.g. Yjs documents) efficiently.- network agnostic
- works everywhere (browser, node, ..)
- small footprint
- documents can have "capabilities" that can be synced with a filesystem.
- syncs __many__ documents efficiently
- Auth* integrated
- (experimental software)### Demos
The demos sync changes to server that I set up on `ystream.yjs.dev`. You can run
your own "server" using `npm run ws-server`. Note that a server is not strictly
required to sync ystreams. It is possible to write p2p connection providers for
ystream.#### Sync collection to filesystem
- run `./bin/yfs.js --init dir --collection my-collection-name` to sync `dir` to
a collection.
- run `./bin/yfs.js --clone clone --collection my-collection-name` to clone
collection state to a filesystem
- The different directories are now synced. If you open a file in one directory,
it will sync the changes to the other directory. This even works on different
computers. DONT SHARE SENSITIVE DATA!#### Sync collection to a browser application for real-time editing of the files
- `cd demo`
- Open `demo/src/app/ystream.tsx` and change the variable `collectionName`:
`const collectionName = 'my-collection-name'`
- `npm run dev`
- open [demo]{http://localhost:3000}
- You can run this demo in combination with the file-system demo to see
filesystem and editor state synced in real-time.### Work with me
This project is still in the early stages. I'm looking for a company that wants
to sponsor this work and integrate it in their product. Contact me
.