Open-source reactive database for web apps, letting you write server functions and data logic in pure TypeScript.
pubkey/rxdb
A local-first, reactive NoSQL database for JavaScript apps that runs in browsers, Node.js, React Native and Electron, with replication to your own backend.
Open-source alternative to:Firebase Realtime Database
Firestore
- Stars
- 23,411
- Forks
- 1,182
- Open issues
- 19
- Last commit
- 4 hours ago
What is it?
RxDB is a NoSQL database for JavaScript applications that keeps data local-first and lets you subscribe to changes. Queries can be run once or observed, so a UI updates automatically when a query result or a single field changes.
The storage layer is pluggable. The same database code can sit on top of LocalStorage, IndexedDB, OPFS, SQLite, an in-memory store, a WebWorker, or other engines, which makes it usable in browsers, Node.js, React Native, Capacitor, Flutter and Electron.
For syncing, RxDB includes a replication engine that works with HTTP endpoints you implement, and ships plugins for GraphQL, CouchDB, WebSocket, WebRTC, Supabase, Firestore, NATS and Google Drive. It also covers schema validation, encryption, migrations, conflict handling, attachments and CRDT support.
Key features
- 01Reactive queries that emit updates when results or single fields change.
- 02Pluggable storage engines including IndexedDB, OPFS, SQLite and in-memory.
- 03Replication over your own HTTP endpoints or plugins for GraphQL, CouchDB, Supabase and others.
- 04Schema validation, encryption, migrations and conflict handling.
- 05Runs in browsers, Node.js, React Native, Capacitor, Flutter and Electron.
Use cases
- Building offline-capable or realtime UI apps that keep data on the client.
- Adding sync to an existing backend without adopting a specific cloud database.
- Sharing one data layer across web, mobile and desktop JavaScript targets.
- Creating multiplayer or collaborative features that update views live.
Quick start
- 1
Install RxDB and RxJS via npm
npm install rxdb rxjs --save - 2
Create a database with a collection and insert a document
- 3
Query data once or subscribe to live query results
Things to know
- Browser storage uses LocalStorage in the quickstart, and other environments need different storage plugins.
- Some replication plugins and advanced features are premium and require purchase.
Topics
FAQ
- What is rxdb?
- A local-first, reactive NoSQL database for JavaScript apps that runs in browsers, Node.js, React Native and Electron, with replication to your own backend. RxDB is a NoSQL database for JavaScript applications that keeps data local-first and lets you subscribe to changes. Queries can be run once or observed, so a UI updates automatically when a query result or a single field changes.
- Is rxdb free to use? What license does it have?
- rxdb is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is rxdb still maintained?
- Actively maintained. The last commit to rxdb was on Oct 21, 2026.
- What can I use rxdb for?
- Building offline-capable or realtime UI apps that keep data on the client. Adding sync to an existing backend without adopting a specific cloud database. Sharing one data layer across web, mobile and desktop JavaScript targets. Creating multiplayer or collaborative features that update views live.
- How do I install rxdb?
- Install RxDB and RxJS via npm: npm install rxdb rxjs --save Create a database with a collection and insert a document Query data once or subscribe to live query results
- Where can I get rxdb?
- The source code and installation instructions are on GitHub: https://github.com/pubkey/rxdb
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A PowerPoint alternative delivered as a single self-contained HTML file that includes its own viewer, presenter, and editor.
An opinionated code formatter that re-prints JavaScript, TypeScript, CSS, HTML, Markdown, YAML and more to a consistent style.
A Go framework for building cross-platform desktop apps with a web frontend (React, Vue, Svelte, etc.) using native rendering engines.
A curated list of libraries, tools, news sources and learning resources for building React Native apps.
A framework for building native iOS, Android and visionOS apps with JavaScript or TypeScript, using native UI and APIs directly.