RxDB

active

by Daniel Meyer (pubkey) · since 2016 · also known as Reactive Database

Reactive local-first NoSQL database for JavaScript with pluggable storage and replication.

documentembedded libraryopen source (permissive)mature

Overview

RxDB is a TypeScript document database that runs in browsers, React Native, Electron, Capacitor and Node, with every query exposed as an observable so UIs update automatically. Storage is pluggable (IndexedDB, OPFS, SQLite, memory and more) and replication plugins sync with CouchDB, GraphQL, HTTP endpoints, Firestore, Supabase, NATS or WebRTC peers. It is one of the most actively maintained JavaScript local-first options. The catch is that the fastest storage engines and some plugins are paid premium add-ons, and its JSON-schema document model is not a fit for relational queries.

Strengths & trade-offs

Strengths

  • +Every query is an observable, so UI state stays in sync with stored data
  • +Swappable storage engines from IndexedDB to OPFS and SQLite
  • +Replication plugins for many backends, including peer-to-peer WebRTC
  • +Field-level encryption and key compression plugins
  • +Very active development with frequent releases

Trade-offs

  • −Best-performing storages and some features are paid
  • −No joins; relational data must be denormalised or stitched in code
  • −Large plugin surface makes configuration and bundle size easy to get wrong

Great for

  • +Offline-first progressive web apps
  • +React Native and Capacitor apps with background sync
  • +Electron apps needing local reactive storage
  • +Multi-tab browser apps sharing one database

Think twice for

  • −Relational data models with heavy joins
  • −Server-side primary databases
  • −Projects that cannot use paid plugins but need top performance

Capabilities

Native or official first-party support · 8 of 25 tracked

✓Secondary indexes
✓JSON
✓Change data capture
✓In-memory
✓Durable persistence
✓Compression
✓Encryption at rest
✓Offline sync
–Transactions
–Joins
–Full-text search
–Vector search
–Geospatial
–Triggers
–Stored procedures
–Materialized views
–TTL / expiry
–Pub/Sub
–Columnar storage
–Role-based access
–Time travel
–Branching
–Online schema changes
–Streaming ingest
–Runs in WebAssembly

Scale & consistency

Comfortable data size
Small · ≤ 100 GB
Horizontal scaling
None
Multi-region
No
Transactions
Limited ACID
Consistency
Eventual
Schema
Strict
Architecture
Embedded
Query languages
Mango query syntax

Client-side store; practical sizes are bounded by device storage and chosen backend.

Deployment

Self-hosted Vendor-managed cloud Serverless Embedded Edge Kubernetes operator

Ecosystem

apis & protocolsJavaScript/TypeScript API, RxJS observables
client languagesJavaScript, TypeScript

Alternatives to RxDB

Compare all→
PouchDBDocument23.2

JavaScript database for browsers and Node that speaks the CouchDB replication protocol.

rxdb vs pouchdb →
Dexie.jsDocument25.8

The most popular IndexedDB wrapper, with live queries and an optional Dexie Cloud sync service.

rxdb vs dexie →
WatermelonDBRelational17.8

Lazy-loading reactive database for React Native and React apps, built on SQLite.

rxdb vs watermelondb →
TinyBaseKey-Value18.4

Tiny reactive in-memory store for tables and values, with persisters and CRDT sync.

rxdb vs tinybase →
PowerSyncRelational23.3

Sync engine that keeps on-device SQLite in sync with Postgres, MongoDB, MySQL or SQL Server.

rxdb vs powersync →
ElectricSQLRelational30.4

Read-path sync engine that streams partial replicas of Postgres to clients over plain HTTP.

rxdb vs electricsql →

RxDB FAQ

What is RxDB?

RxDB is a document database by Daniel Meyer (pubkey), first released in 2016. RxDB is a TypeScript document database that runs in browsers, React Native, Electron, Capacitor and Node, with every query exposed as an observable so UIs update automatically. Storage is pluggable (IndexedDB, OPFS, SQLite, memory and more) and replication plugins sync with CouchDB, GraphQL, HTTP endpoints, Firestore, Supabase, NATS or WebRTC peers. It is one of the most actively maintained JavaScript local-first options. The catch is that the fastest storage engines and some plugins are paid premium add-ons, and its JSON-schema document model is not a fit for relational queries.

Is RxDB open source?

Yes. RxDB is open source. License: Apache License 2.0 (core); commercial premium plugins.

Does RxDB support ACID transactions?

Partly. RxDB offers limited ACID guarantees (for example, single-record or single-partition transactions), with eventual consistency.

Does RxDB scale horizontally?

RxDB does not scale horizontally; it runs on a single node, so you scale it up rather than out. It is comfortable at small scale (≤ 100 GB).

How can I run RxDB?

You can self-host it and embed it in your application.

What is RxDB best for?

RxDB is a strong fit for offline-first progressive web apps; react Native and Capacitor apps with background sync; and electron apps needing local reactive storage. Think twice for relational data models with heavy joins.

What are the best alternatives to RxDB?

Common alternatives to RxDB include PouchDB, Dexie.js, WatermelonDB, TinyBase and PowerSync. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.

How popular is RxDB?

RxDB ranks #161 of 844 databases on the WhichDB Score (20.2/100), and #18 among document databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.