Dancode-188/synckit: πŸ”„ A powerful, type-safe sync engine for building real-time collaborative applications. Local-first, CRDT-based, with zero-config offline support.

🚀 Read this awesome post from Hacker News 📖

📂 Category:

✅ Main takeaway:


SyncKit is a production-ready sync engine that makes building local-first applications trivial.

“Add sync.document() to your app, get real-time sync automatically.”

The problem: Building sync from scratch takes months. Existing solutions are complex (Yjs), expensive (Firebase), or don’t work offline (Supabase).

The solution: SyncKit gives you production-ready sync in 3 lines of code.

const sync = new SyncKit()
await sync.init()
const doc = sync.document<Todo>('todo-123')
await doc.update()
// ✨ Works offline, syncs automatically, resolves conflicts

SyncKit Demo

Real-time collaboration with offline resilience: Watch tasks sync instantly across tabs—even while offline. The example app demonstrates SyncKit’s offline-first capabilities combined with smart browser storage to create a seamless collaborative experience.


🚀 Works When Internet Doesn’t

True offline-first architecture—not just caching. Your app works perfectly on planes, trains, tunnels, and coffee shops with spotty WiFi.

📦 Enterprise Features, Startup Bundle

~59 KB gzipped (10KB SDK + 49KB WASM) – Complete WASM-based sync engine with TypeScript SDK.

Current features (v0.1.0):

  • ✅ Offline-first sync (LWW)
  • ✅ Real-time collaboration
  • ✅ Network protocol support
  • ✅ IndexedDB persistence
  • ✅ Cross-tab sync (see example)

Coming in v0.2.0:

  • 🚧 Text CRDTs (character-level editing)
  • 🚧 Counters, Sets (distributed data structures)

Size-critical apps? Use Lite variant (~45 KB gzipped: 1.5KB SDK + 44KB WASM, local-only)

Competitive bundle size: Larger than Yjs (~19KB pure JS), smaller than Automerge (~60-78KB).

🔓 Your Data, Your Rules

Open source and self-hostable. No vendor lock-in, no surprise $2,000/month bills, complete data sovereignty.

  • <1ms local operations (~5-20μs single field update)
  • <100ms sync latency (10-50ms p95)
  • ~59KB bundle (10KB SDK + 49KB WASM), ~45KB lite option
  • Sub-200KB total with React

🛡️ Data Integrity Guaranteed

  • Zero data loss with automatic conflict resolution (Last-Write-Wins)
  • Formal verification with TLA+ (3 bugs found and fixed)
  • 700+ comprehensive tests across TypeScript and Rust (unit, integration, chaos, load)

Feature SyncKit Firebase Supabase Yjs Automerge
True Offline-First ✅ Native ⚠️ Cache only
(40MB limit)
❌ None
(#357 – 4+ years)
✅ Full ✅ Full
Works Without Server ✅ Yes ❌ No ❌ No ✅ Yes ✅ Yes
Bundle Size (gzipped) ~59KB
(45KB lite)
~150KB ~45KB ~19KB ~60-78KB
Text CRDT 🚧 v0.2.0 ❌ No ❌ No ✅ Yes ✅ Yes
Counters/Sets 🚧 v0.2.0 ❌ No ❌ No ✅ Yes ✅ Yes
Automatic Conflicts ✅ LWW ✅ LWW ⚠️ Manual ✅ CRDT ✅ CRDT
Self-Hosted ✅ Yes ❌ No ✅ Yes ✅ Yes ✅ Yes
Multi-Language Server ✅ TS
🚧 Py/Go/Rust
❌ No ⚠️ Postgres only ❌ JS only ❌ JS only
Pricing Free (self-host) $25-$2,000+/mo $0-$25/mo Free Free
TypeScript Support ✅ Native ✅ Good ✅ Good ⚠️ Issues ✅ Good
Learning Curve ✅ 5 minutes ⚠️ Medium ⚠️ Medium ⚠️ Steep ⚠️ Complex
Production Status ✅ v0.1.0 ready ✅ Mature ✅ Mature ✅ Mature ⚠️ Alpha/Beta

TL;DR:

  • vs Firebase: No vendor lock-in, true offline, predictable costs
  • vs Supabase: Actually works offline (their #1 issue for 4+ years)
  • vs Yjs: WASM-based for multi-language server support, simpler API for structured data
  • vs Automerge: Smaller bundle, faster performance, production-ready

See detailed migration guides →


npm install @synckit-js/sdk
import What do you think? from '@synckit-js/sdk'
import { SyncProvider, useSyncDocument } from '@synckit-js/sdk/react'

// Initialize (works offline-only, no server needed!)
const sync = new SyncKit()
await sync.init()

function App() {
  return (
    <SyncProvider synckit={sync}>
      <TodoApp />
    </SyncProvider>
  )
}

function TodoApp() {
  const [todo, { update }] = useSyncDocument<Todo>('todo-1')

  if (!todo || !todo.text) return <div>Loading...</div>

  return (
    <div>
      <input
        type="checkbox"
        checked={todo.completed}
        onChange={(e) => update({ completed: e.target.checked })}
      />
      <span>{todo.text}</span>
    </div>
  )
}

That’s it! Your app now:

  • ✅ Works 100% offline
  • ✅ Syncs across tabs automatically
  • ✅ Persists data in IndexedDB
  • ✅ Resolves conflicts automatically

Bundle: SyncKit (~59 KB gzipped) + React (~130 KB) = ~189 KB total

Size-critical? import { SyncKit } from '@synckit-js/sdk/lite' (~45 KB gzipped, local-only)

Full tutorial (5 minutes) →


  • 🔄 Real-Time Sync – WebSocket-based instant sync across devices
  • 📴 Offline-First – Works perfectly with zero connectivity
  • 🗄️ Local Persistence – IndexedDB storage, unlimited capacity
  • 🔀 Conflict Resolution – Automatic Last-Write-Wins (LWW) merge
  • ⚡ Fast Operations – <1ms local updates, <100ms sync latency
  • 📦 Compact Bundle – ~59KB gzipped (10KB SDK + 49KB WASM)
  • 🔐 Secure – JWT authentication, RBAC permissions
  • ⚛️ React HooksuseSyncDocument, useSyncField, SyncProvider
  • 🌐 TypeScript Server – Bun + Hono reference implementation
  • 📦 Multi-Variant – Default (~59KB gzipped) or Lite (~45KB gzipped) builds
  • ✍️ Text CRDTs – Collaborative text editing (character-level sync)
  • 🔢 Counters – Conflict-free increment/decrement
  • 📋 Sets & Lists – Observed-Remove Sets for collections
  • 🎨 Framework Adapters – Vue composables, Svelte stores
  • 🌐 Multi-Language Servers – Python, Go, Rust implementations

graph TD
    A[Your Application
React/Vue/Svelte] --> B[SyncKit SDK
TypeScript] B -->|Simple API| B1[document, text, counter] B -->|Framework adapters| B2[React/Vue/Svelte hooks] B -->|Offline queue| B3[Storage adapters] B --> C[Rust Core Engine
WASM + Native] C -->|80% of use cases| C1[LWW Sync] C -->|Collaborative editing| C2[Text CRDTs] C -->|Advanced features| C3[Custom CRDTs
counters, sets] C --> D[IndexedDB Storage
Your local source of truth] D -.->|Optional| E[SyncKit Server
TypeScript/Python/Go/Rust] E -->|Real-time sync| E1[WebSocket] E -->|Persistence| E2[PostgreSQL/MongoDB] E -->|Security| E3[JWT auth + RBAC] style A fill:#e1f5ff,stroke:#333,stroke-width:2px,color:#1a1a1a style B fill:#fff4e1,stroke:#333,stroke-width:2px,color:#1a1a1a style C fill:#ffe1e1,stroke:#333,stroke-width:2px,color:#1a1a1a style D fill:#e1ffe1,stroke:#333,stroke-width:2px,color:#1a1a1a style E fill:#f0e1ff,stroke:#333,stroke-width:2px,color:#1a1a1a



Loading


Detailed architecture docs →


Browse all docs →


Tier 1: Simple Object Sync (LWW)

Perfect for: Task apps, CRMs, project management, note apps (80% of applications)

// Initialize once
const sync = new SyncKit()
await sync.init()

// Use anywhere
const doc = sync.document<Project>('project-123')
await doc.update({ status: 'completed' })
// Conflicts resolved automatically with Last-Write-Wins

Tier 2: Collaborative Text Editing (Coming Soon)

Perfect for: Collaborative editors, documentation, notes

// Note: Text CRDT API is planned for v0.2.0
const text = sync.text('document-456')
await text.insert(0, 'Hello ')
text.subscribe(content => editor.setValue(content))
// Character-level sync, conflict-free convergence

Tier 3: Custom CRDTs (Coming Soon)

Perfect for: Whiteboards, design tools, specialized apps

// Note: Counter API is planned for v0.2.0
const counter = sync.counter('likes-789')
await counter.increment()
// Conflict-free counter (additions never conflict)

  • @synckit-js/sdk – Core SDK (TypeScript) + WASM engine
  • @synckit-js/sdk/react – React hooks and components (export from SDK)
  • @synckit-js/sdk/lite – Lightweight version (local-only, 45KB gzipped)
  • @synckit-js/server – Bun + Hono reference server (production-ready)

Current Version: v0.1.0
Production Ready: Core sync engine, React hooks, TypeScript server ✅

  • Core Rust Engine – LWW sync engine with CRDT foundation
  • WASM Compilation – 59KB gzipped (45KB lite), optimized performance
  • TypeScript SDK – Document API, IndexedDB storage, offline queue
  • Cross-Tab Sync – Server-mediated sync with operation buffering for multi-tab coordination
  • React IntegrationuseSyncDocument, useSyncField, SyncProvider hooks
  • TypeScript Server – WebSocket sync server with Bun + Hono
  • Example Applications – Todo app, collaborative editor, project management demos
  • Documentation – Comprehensive guides and API reference
  • Build System – Complete toolchain with benchmarks and CI
  • 🚧 Text CRDTs – Collaborative text editing (useText hook) for character-level sync
  • 🚧 Counter CRDTs – Distributed counters (useCounter hook) for conflict-free increments
  • 🚧 BroadcastChannel Cross-Tab – Direct client-to-client sync without server (offline multi-tab)
  • 🚧 Framework Adapters – Vue composables (@synckit-js/sdk/vue), Svelte stores (@synckit-js/sdk/svelte)
  • 🚧 Multi-Language Servers – Python, Go, Rust server implementations (TypeScript complete)
  • 🚧 Advanced Storage – OPFS (Origin Private File System), SQLite adapter
  • 🚧 Conflict UI – Visual conflict resolution interface for complex merge scenarios

Full roadmap →


We welcome contributions from the community!

Ways to contribute:

  • 🐛 Bug Reports – Open an issue
  • 📚 Documentation – Improve guides, fix typos
  • 🧪 Tests – Add test coverage
  • 🌐 Servers – Implement Python/Go/Rust servers
  • 💡 Features – Propose new features in discussions

Contributing guide →


Need enterprise support?

  • 🎯 Managed Hosting – We host SyncKit servers for you
  • 🔒 Priority Support – 24/7 support, SLA guarantees
  • 📊 Monitoring & Analytics – Dashboard, alerts, insights
  • 🎓 Training & Consulting – Onboarding, architecture review

Contact: danbitengo@gmail.com


Yjs:                ~19 KB ████
SyncKit (lite):     ~45 KB █████████
SyncKit (default):  ~59 KB ████████████
Automerge:       ~60-78 KB ████████████████
Firebase:          ~150 KB ████████████████████████████████
Local update:       <1 ms  ████
Cross-tab sync:     <1 ms  ████
Network sync:    10-50 ms  ████████
Firebase (cold):  2-30 s   ████████████████████████████████

Memory Usage (10K documents)

SyncKit:       3 MB  ████
Yjs:           8 MB  █████████
Automerge:   180 MB  ████████████████████████████████████████

Detailed benchmarks →


Built with inspiration from:

  • Yjs – YATA algorithm and performance optimization
  • Automerge – CRDT theory and formal verification
  • Linear – Pragmatic approach to sync
  • Figma – Custom sync architecture patterns
  • RxDB – Local-first database patterns

Special thanks to the local-first community for pioneering this movement.


MIT License – see LICENSE for details.

Copyright (c) 2025 Daniel Bitengo



{💬|⚡|🔥} {What do you think?|Share your opinion below!|Tell us your thoughts in comments!}

#️⃣ #Dancode188synckit #powerful #typesafe #sync #engine #building #realtime #collaborative #applications #Localfirst #CRDTbased #zeroconfig #offline #support

🕒 Posted on 1764263531

By

Leave a Reply

Your email address will not be published. Required fields are marked *