Remix.run Logo
danbitengo 7 hours ago

Hey HN, I built SyncKit after shipping two local-first projects (RestBolt and Graft) and realizing there's no simple way to add cross-device sync.

The problem: Existing solutions are either too complex (Automerge/Yjs require learning CRDTs) or too restrictive (Firebase isn't truly local-first, Supabase has no offline support - issue #357 has been open 4+ years with 350+ upvotes).

SyncKit is the middle ground: simple API, works offline-first, self-hostable.

Technical highlights: - TLA+ formal verification: 118,711 states checked, caught bugs before implementation - Rust → WASM core (48.9KB gzipped) - 700+ tests including 80 chaos tests (zero data loss) - Server: Bun/Hono WebSocket (SDK works in any JS runtime) - Production-ready: v0.1.0 on npm and Docker Hub

Known limitations (v0.1.0): - LWW only - advanced CRDTs (Text, Counter, Set) coming in v0.2.0 - React hooks only - Vue/Svelte adapters planned - Reference server is Bun (Node/Deno coming v0.3.0)

Happy to answer questions about the CRDT implementation, TLA+ modeling, or WebSocket architecture.

GitHub: https://github.com/Dancode-188/synckit npm: @synckit-js/sdk

jmoggr 5 minutes ago | parent | next [-]

> Automerge/Yjs require learning CRDTs

I've been using Automerge for a while and haven't had to look at any CRDTs. To me this looks very similar to Automerge.

Neat project!

mkl 2 hours ago | parent | prev | next [-]

The ReadMe says "Zero data loss with automatic conflict resolution (Last-Write-Wins)", bur doesn't LWW guarantee data loss?

danbitengo 2 hours ago | parent [-]

See my response to skybrian above. You're both asking the same good question about the LWW messaging. Short version: system-level guarantees, not user-level concurrent edit preservation.

threatofrain 4 hours ago | parent | prev [-]

TLA+ checked! Whoa!

danbitengo 4 hours ago | parent [-]

Thanks! The TLA+ modeling actually caught 3 bugs even before I wrote any code. Worth the upfront investment. It's way easier to debug a state machine model than distributed sync logic.

Happy to share more about the verification approach if you're interested!

rancar2 2 hours ago | parent | next [-]

Please do in the repo, and thank you for the wonderful contribution on multiple fronts. This is very well done work and documentation. A few tips to help others discover the value on the Readme: Add the key memory benchmark (currently just above the acknowledgments) to the top of the Readme and link to the rest of the benchmarks on the page that you already have (maybe rename it benchmarks.md in the process): https://github.com/Dancode-188/synckit/blob/main/docs/guides...

danbitengo 2 hours ago | parent [-]

That's a great suggestion. The memory benchmark being buried is a fair point. I'll move it up top and create a proper benchmarks.md page. Thanks for the detailed feedback.

JackYoustra 2 hours ago | parent | prev [-]

VERY interested, are you planning on writing a blog? If so I would definitely read that post.

danbitengo 2 hours ago | parent [-]

I appreciate the enthusiasm! And yeah, I'm planning to start blogging about the build process and some of the technical decisions probably after launch week settles down. I'll post about it on LinkedIn and in the GitHub Discussions when it's live. If you're following either, you'll see it!

Thanks for the interest!