Skip to content

TopGun

Offline-first in-memory data grid with CRDT sync

Build real-time, collaborative applications that work seamlessly offline and sync automatically when back online.

Features

  • 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

Get Started

npm install @topgunbuild/client @topgunbuild/react
import { 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');

Links

Popular repositories Loading

  1. topgun topgun Public

    Offline-first in-memory data grid with CRDT sync

    TypeScript 35 2

  2. webcrypto webcrypto Public archive

    ⚠️ Archived. See github.com/TopGunBuild/topgun

    TypeScript 1

  3. socket socket Public archive

    ⚠️ Archived. See github.com/TopGunBuild/topgun

    TypeScript

  4. buffer buffer Public archive

    ⚠️ Archived. See github.com/TopGunBuild/topgun

    TypeScript

  5. jsonwebtoken jsonwebtoken Public archive

    ⚠️ Archived. See github.com/TopGunBuild/topgun

    TypeScript

  6. typed typed Public archive

    ⚠️ Archived. See github.com/TopGunBuild/topgun

    TypeScript

Repositories

Showing 10 of 12 repositories

Top languages

Loading…

Most used topics

Loading…