yjs / yjs-demos

A collection of demos for Yjs
https://demos.yjs.dev
The Unlicense
750 stars 120 forks source link

Enable offline-first workflow in demos (for Tiptap) #29

Open anilgulecha opened 4 years ago

anilgulecha commented 4 years ago

This is an issue to track this feature. I'd like to see how N clients can work offline, make different changes, and then come online and have all changes be synced. (I'm using tiptap)

Specifically offline-first browser applications are closed/opened - which means my local changes have to survive a tab refresh. (Currently changes don't survive a tab refresh when offline.)

Solution

  1. Have tiptap sync changes sycned/persisted (y-indexeddb) - always on.
  2. Have tiptap sync changes synced to the demos y-websocket server (wss://demos.yjs.dev) - when available

With this N clients should be totally fine offline, and have their changes synced when online. I'm working with @Mansehej to build a PR for this.

Screenshot from 2020-06-27 12-05-15