This looks really cool. I've actually been hacking on something very similar to this myself, although with clojure/script on the server / browser. The adapter architecture and equivalent nodes was something I first saw with PouchDB. ~830KB seems quite large for the browser library though.
This could be exactly what I need, AES GCM field-level encryption support is a godsend. Unfortunately seems like it’s planned and not ready.
If I hadn’t just finished rolling out a sync feature built around the Matrix protocol, I would have loved to properly try this out.
My app is for chat-based notes[1] and I have been wanting E2E local-first sync on it for a while. Switched from Realm to SQLite after it was deprecated but never found a good non-niche DB SDK for it on Flutter. Tried to handroll sync + AES-GCM encryption with Supabase Realtime and it kind of worked but I knew managing encryption was going to be hell and also wanted collaboration features. Matrix was built for chat, and at some point I read someone call it basically a graph sync engine & potentially supporting general texting with other clients also seemed like a cool bonus.
That said, adopting it (even partially) was/is a big mess, there's a thousand corner cases with key exchange, etc. so it's really a big commitment, especially if there's no existing user-friendly SDK for it.
I'm not using yjs (yet), just going to more basic event sourcing that is essentially last-write wins but that's a direction I want to explore in the future.
neat congrats on shipping! yeah i was kind of in the same boat which is why instantdb seemed like a good fit but it's early days. matrix feels like a house of cards that is meandering a bit with a ton of msc's. you using synapse or?