explaingit

pubkey/rxdb

📈 Trending23,202TypeScriptAudience · developerComplexity · 3/5ActiveLicenseSetup · easy

TLDR

A JavaScript database for offline-first apps that syncs with servers and automatically updates your UI when data changes.

Mindmap

mindmap
  root((RxDB))
    What it does
      Offline-first storage
      Real-time sync
      Auto UI updates
    Storage backends
      IndexedDB
      SQLite
      LocalStorage
      In-memory
    Sync options
      GraphQL
      CouchDB
      Supabase
      WebRTC
    Use cases
      Collaborative apps
      Live dashboards
      Mobile offline apps
    Platforms
      Browser
      React Native
      Electron
      Node.js

Things people build with this

USE CASE 1

Build a collaborative document editor that works offline and syncs changes when users reconnect.

USE CASE 2

Create a mobile app with local data storage that automatically updates across multiple devices.

USE CASE 3

Build a real-time dashboard that refreshes instantly when underlying data changes without manual re-fetching.

USE CASE 4

Develop a peer-to-peer app using WebRTC where users can share and sync data directly without a central server.

Tech stack

TypeScriptJavaScriptIndexedDBSQLiteGraphQLCouchDBSupabaseFirestore

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose including commercial. Keep the notice and disclose changes to the patent grant.

In plain English

RxDB (Reactive Database) is a local-first JavaScript database designed for building real-time applications that work offline and sync with a server when connected. "Local-first" means the app stores data directly in the user's browser or device and remains fully functional without an internet connection, syncing changes when connectivity is available. The "reactive" part means your application can subscribe to data changes like a live feed, when a query result changes because data was updated, your UI automatically refreshes without you having to manually re-fetch. This makes building real-time collaborative features or live-updating dashboards much simpler. RxDB supports a variety of storage backends so you can use the same database code across different environments: browser storage (IndexedDB, LocalStorage), SQLite for mobile and desktop apps, in-memory storage for testing, and more. The database code stays the same regardless of where it runs, browser, Node.js, React Native, Electron desktop apps, or mobile via Capacitor. For syncing data with a server, it has built-in plugins for many popular backends including GraphQL, CouchDB, Supabase, Firestore, and WebRTC (peer-to-peer). It also handles conflict resolution when multiple users edit the same data offline. You would use RxDB when building a JavaScript app that needs offline support, real-time updates, or multi-device sync. It is written in TypeScript.

Copy-paste prompts

Prompt 1
Show me how to set up RxDB with IndexedDB storage and create a simple collection to store user notes.
Prompt 2
How do I subscribe to query changes in RxDB so my React component re-renders automatically when data updates?
Prompt 3
Set up RxDB with Supabase sync so my offline changes automatically push to the server when I reconnect.
Prompt 4
Create a conflict resolution strategy in RxDB for when two users edit the same document offline.
Prompt 5
How do I use RxDB in a React Native app with SQLite as the storage backend?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.