ZeBridge keeps a full PostgreSQL replica on every device, synced over NATS

ZeBridge – PostgreSQL replicas on devices, synchronized over NATS

ZeBridge is a bidirectional, local-first sync engine that puts a real database on each device—SQLite, PGlite, DuckDB, or PostgreSQL—and syncs writes through NATS when connectivity returns. PostgreSQL stays authoritative, judging every mutation and resolving conflicts. Built for B2B operational apps where each customer tenant shares a working dataset across field teams, it offers a single client library for reads, mutations, and remote service queries. A Docker quickstart spins up a live demo with five trucks on a map of France's 16,173 charge points.

ZeBridge keeps a local database on each device, queues writes while it is offline, and synchronizes through NATS when it reconnects.
  1. satvikpendem

    Is this like ElectricSQL which was acquired recently?

  2. ndrean

    I built ZeBridge to keep a local database on each device (SQLite, PGlite or DuckDB) in sync with a central PostgreSQL, for apps that must keep working on a bad connection.

    It's aimed at B2B operational apps (fleets, depots, field teams), where each customer organisation is a tenant. It isn't built for consumer apps with one tenant per user.

    How it works: a bridge written in Zig reads PostgreSQL's logical replication and publishes changes to NATS JetStream, one stream per tenant. Clients seed from snapshots kept in the NATS object store, then follow the stream. Writes made offline wait in a local outbox. When the device reconnects they go to PostgreSQL, which applies your rules (functions, row-level security) and sends back a verdict for each one. PostgreSQL stays the authority; NATS only carries the data.

    The same NATS connection also reaches your own services. The live demo uses this to ask a routing service for a truck's route: https://bridge.zebridge.eu/demo (five trucks on a map of 16,173 charge points; open it in two tabs).

    Clients: TypeScript (browser and Node), and a native Zig library with a C ABI, wrapped for Swift, Android, React Native, Flutter and Python.

More from this day

2026-11-07