gitmyhub

rxdb

TypeScript ★ 23k updated 22h ago

The local-first database that runs on every JS runtime and replicates with your existing backend - no vendor, no lock-in - https://rxdb.info/

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

TypeScriptJavaScriptIndexedDBSQLiteGraphQLCouchDBSupabaseFirestoresetup: easycomplexity 3/5

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.

Where it fits