Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yjs/ystream
The fast CRDT database
https://github.com/yjs/ystream
Last synced: 4 days ago
JSON representation
The fast CRDT database
- Host: GitHub
- URL: https://github.com/yjs/ystream
- Owner: yjs
- License: mit
- Created: 2022-12-07T13:31:02.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-22T09:30:20.000Z (6 months ago)
- Last Synced: 2024-05-22T17:36:56.907Z (6 months ago)
- Language: JavaScript
- Size: 330 KB
- Stars: 37
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Y/stream
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
.