About this project
RxDB (Reactive Database) is a local-first, NoSQL database for JavaScript applications. It is reactive: besides querying the current state, applications can subscribe to changes in a query result or even a single field of a document, which the project presents as useful for realtime, UI-driven applications.
The database is built around a storage interface, so the underlying storage engine can be swapped. Documented storage options include LocalStorage, IndexedDB, OPFS, LokiJS, Dexie.js, in-memory, SQLite, running inside a WebWorker, FoundationDB and DenoKV. The same database code can thus be reused across environments. Supported JavaScript runtimes listed in the README include browsers, Node.js, React Native, Capacitor, NativeScript, Flutter and Electron.
For replication, RxDB provides a Sync Engine intended to work with existing infrastructure rather than a specific cloud or backend database. The protocol is described as implementable through three HTTP endpoints, and production-ready plugins are listed for GraphQL, CouchDB, WebSocket, WebRTC (P2P), Supabase, Firestore, NATS and Google Drive.
The feature set includes logging, attachments, an ORM layer, conflict handling, middleware, signals, integration with TanStack DB, reactive state, backup, replication, a server component, storages, local documents, schema validation, key compression, schema migration, encryption, CRDT support and population of referenced documents. Installation is via npm (rxdb and rxjs). The README shows a quickstart that creates a database with a storage, adds a collection with a JSON schema, inserts a document, runs a query with exec(), and observes a query through an observable.
Documentation, tutorials and example projects are hosted at rxdb.info and in the repository's examples directory. The project also mentions premium plugins available for purchase and community support through Discord, Twitter and LinkedIn. RxDB's first release was in 2018, according to the README.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.