YousefED / SyncedStore

SyncedStore CRDT is an easy-to-use library for building live, collaborative applications that sync automatically.
https://syncedstore.org
MIT License
1.71k stars 51 forks source link

Documentation on creating your own provider #72

Closed ericwooley closed 1 year ago

ericwooley commented 2 years ago

This looks fantastic, but I'm interested in creating my own provider, EG hasura or supabase.

Is there any guide to implementing your own provider? If so I would love to contribute by creating some open source ones.

YousefED commented 1 year ago

Hi @ericwooley!

At this moment, SyncedStore is pretty focused on yjs as backend. I hadn't thought of connecting a different backend to the same programming paradigm, but that's definitely interesting. There's no guide to this yet, but if you want to give it a go, you probably need to create your own versions of the object / array / doc files in https://github.com/YousefED/SyncedStore/tree/main/packages/core/src.

The basic architecture of SyncedStore is that it makes heavy use of Javascript Proxies to translate from the underlying platform (current case, yjs) to a more reactive paradigm (and vice versa)

ericwooley commented 1 year ago

Thanks @YousefED

After having researched this a bit more, I think what I actually would need to do is create a yjs provider, which is less to do with this project and more with yjs.

Thanks for the response!