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)
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.
- run
./bin/yfs.js --init dir --collection my-collection-name
to syncdir
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!
cd demo
- Open
demo/src/app/ystream.tsx
and change the variablecollectionName
: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.
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 [email protected].