Offline-first in-memory data grid with CRDT sync
Build real-time, collaborative applications that work seamlessly offline and sync automatically when back online.
- Offline-first — Works without internet, syncs when connected
- CRDT-based — Automatic conflict resolution with LWW-Map and OR-Map
- Real-time sync — Instant updates via WebSockets with Merkle tree delta sync
- TypeScript-first — Full type safety from client to server
npm install @topgunbuild/client @topgunbuild/reactimport { TopGunClient } from '@topgunbuild/client';
import { IDBAdapter } from '@topgunbuild/client';
const client = new TopGunClient({
serverUrl: 'ws://localhost:8080',
storage: new IDBAdapter(),
});
client.start();
// Write data (instant, works offline)
const todos = client.getMap('todos');
todos.set('todo-1', { text: 'Buy milk', done: false });
// Read data
const todo = todos.get('todo-1');