Welcome to SyncKit! Build collaborative, offline-first apps without the complexity.
Everything you need for real-time collaboration.
v0.2.0 is production-ready with features that used to take months to build:
- ✍️ Rich text editing - Formatting conflicts resolved automatically (Peritext CRDT)
- ↩️ Cross-tab undo/redo - Works across browser tabs and persists across sessions
- 👥 Live presence - See who's editing in real-time
- 🖱️ Cursor sharing - Watch teammates type with animated cursors
- 🎯 Counters & Sets - PN-Counter and OR-Set CRDTs for distributed state
- ⚛️ Framework adapters - React, Vue 3, and Svelte 5 ready to use
Backed by 1,081 passing tests (87% coverage). Zero critical bugs. Production-ready.
New to SyncKit? Start here:
- 5-Minute Quick Start - Build your first synced app
- Installation Guide - Setup instructions
- Quick Start Example - Copy-paste code
Learn core concepts and patterns:
- Offline-First Patterns - True offline architecture, IndexedDB foundations, sync strategies
- Conflict Resolution - How conflicts work, LWW strategy, custom handlers
- Performance Optimization - Bundle size, memory optimization, Web Workers
- Testing Guide - Unit tests, property-based testing, chaos engineering, E2E
- Rich Text Editing - Peritext CRDT for formatted text
- Undo/Redo - Cross-tab undo with persistent history
- Cursor & Selection Sharing - Real-time cursor positions
- Counters & Sets - PN-Counter and OR-Set CRDTs
- Bundle Size Optimization - Tree-shaking, code splitting, lite variant
- Server Deployment - Production deployment
Switching from another platform or upgrading?
- From v0.1.0 to v0.2.0 - Upgrade guide with breaking changes and new features
- From Firebase/Firestore - Escape vendor lock-in, true offline support
- From Supabase - Add offline functionality
- From Yjs - Integrated solution with batteries included
Complete API documentation:
- SDK API Reference - Complete API for
SyncKit,Document,Text,Counter,Set - Network API Reference - Network sync, offline queue, connection monitoring
- Configuration Options - All SyncKit config options
- Storage API - IndexedDB, memory, OPFS, SQLite
- React Hooks -
useSyncText,useRichText,useCounter,useSet,usePresence,useCursor,useUndoRedo - Vue 3 Integration - Complete guide with composables and Composition API patterns
- Svelte 5 Integration - Reactive stores with runes support and context patterns
- Server API Reference - TypeScript server documentation
- Deployment Guide - Production deployment
- Authentication - JWT + RBAC
Understand how SyncKit works:
- System Architecture - High-level design, component interactions
- Protocol Specification - Binary protocol, message format
- Storage Schema - IndexedDB structure
- Security Model - Authentication, permissions
Learn from working examples:
- Todo App - Simple CRUD with offline support
- Demonstrates: Document API, offline persistence, real-time sync
-
Collaborative Editor - Real-time text editing with CodeMirror 6
- Demonstrates: Text CRDT, multi-document support, offline-first editing, live presence
-
Project Management App - Production-grade kanban board
- Demonstrates: Drag-and-drop with @dnd-kit, task management, team collaboration, shadcn/ui components
What is Local-First?
- Local database is the source of truth
- Network is optional (optimization, not requirement)
- Instant UI updates (<1ms)
- Works perfectly offline
Key Benefits:
- ✅ Speed: No network round-trips for reads
- ✅ Reliability: Works without internet
- ✅ Privacy: Data stays local by default
- ✅ Ownership: You control your data
Learn more about offline-first →
How Conflicts Work:
- Two clients edit same field while disconnected
- Both sync when back online
- SyncKit merges automatically
Strategies:
- LWW (Last-Write-Wins) - Default, works for 95% of cases
- Custom Handlers - Custom logic for specific fields
- Text CRDTs - Character-level merge for collaborative editing
Bundle Size (gzipped):
- Default variant: 154KB (everything included - text editing, rich text, undo/redo, presence, cursors, framework adapters)
- Lite variant: 46KB (basic sync only)
- What you get: For 154KB, you're shipping production-ready collaboration without building it yourself
Speed:
- Local updates: <1ms (instant user feedback)
- Network sync: 10-50ms p95 (faster than most REST APIs)
- Multi-client convergence: <100ms (real-time collaboration)
Stress-tested: 24-hour continuous operation, 1,081 tests, zero memory leaks.
Learn more about performance → | Bundle size optimization →
Learn how to test offline-first apps:
- Unit Testing - Test CRDT operations
- Property-Based Testing - Verify CRDT properties (convergence, commutativity)
- Network Testing - Simulate offline, slow networks, packet loss
- Chaos Engineering - Random failure injection, network partitions
- E2E Testing - Multi-client scenarios with Playwright
Module not found: @synckit-js/sdk
# Core SDK (includes React hooks via @synckit-js/sdk/react)
npm install @synckit-js/sdk
# React is a peer dependency if you use the React hooks
npm install reactQuotaExceededError: IndexedDB quota exceeded
// Request persistent storage
if (navigator.storage && navigator.storage.persist) {
await navigator.storage.persist()
}Changes not syncing across tabs
// ✅ Cross-tab sync via BroadcastChannel is fully implemented
// Changes sync automatically across tabs via BroadcastChannel API
// Multi-tab scenarios work both locally (BroadcastChannel) and via server
const todo = sync.document<Todo>('todo-1') // Same ID in both tabs - syncs automatically!TypeScript errors
// Define your interface
interface Todo {
id: string
text: string
completed: boolean
dueDate?: Date // Optional fields with ?
}
// Use with document
const todo = sync.document<Todo>('todo-1')- 📖 Documentation - You are here!
- 💬 Discord Community - Chat with the community (coming soon)
- 🐛 GitHub Issues - Report bugs, request features
- 📧 Email - Direct support for enterprise
We welcome contributions!
- Contributing Guide - How to contribute
- Code of Conduct - Community guidelines (coming soon)
- Roadmap - Development timeline
- Architecture Docs - Technical deep-dive
Current Release: v0.2.0 (December 2025) Production Ready: Complete local-first collaboration platform ✅
- ✅ Text CRDT (Fugue) - Collaborative text editing with conflict-free convergence
- ✅ Rich Text (Peritext) - Bold, italic, links with formatting conflict resolution
- ✅ Undo/Redo - Cross-tab undo with persistent history
- ✅ Awareness & Presence - Real-time user tracking
- ✅ Cursor Sharing - Live cursor positions with animations
- ✅ Counters & Sets - PN-Counter and OR-Set CRDTs
- ✅ Vue 3 Adapter - Complete composables with Composition API
- ✅ Svelte 5 Adapter - Reactive stores with runes support
- ✅ Core Rust engine (LWW sync, full CRDT suite, protocol)
- ✅ TypeScript SDK (Document, Text, RichText, Counter, Set APIs)
- ✅ Network sync layer (WebSocket, offline queue, auto-reconnect)
- ✅ Cross-tab sync (BroadcastChannel + server-mediated)
- ✅ React integration (complete hook library for all features)
- ✅ TypeScript server (WebSocket sync, JWT auth, PostgreSQL)
- ✅ Example applications (todo app, collaborative editor, project management)
- ✅ 1,081+ tests (87% coverage)
- ✅ Documentation (complete API reference, guides, migration docs)
- ✅ Formal verification (TLA+, 118K states explored)
- 🚧 Multi-language servers (Python, Go, Rust)
- 🚧 Advanced storage adapters (OPFS, SQLite)
- 🚧 Performance optimization (large documents >10K chars)
MIT License - see LICENSE for details.
- Main README - Project overview
- Getting Started - 5-minute tutorial
- API Reference - Complete API docs
- Network API - Network sync documentation
- Examples - Working examples
- GitHub - Source code
- Roadmap - Development timeline
Happy syncing! 🚀
Questions? Check the guides, API docs, or open an issue.