|Reactive data-handling based on RxJS|
|Offline first let your app still work when the users has no internet|
|Replication between client and server-data, compatible with PouchDB, CouchDB and IBM Cloudant. There is also a plugin for a GraphQL replication|
|Schema-based with the easy-to-learn standard of json-schema|
|Mango-Query exactly like you know from mongoDB and mongoose|
|Encryption of single data-fields to protect your users data|
|Import/Export of the database-state (json), awesome for coding with TDD|
|Multi-Window to synchronise data between different browser-windows or nodejs-processes|
|ORM-capabilities to easily handle data-code-relations and customize functions of documents and collections|
|Full TypeScript support for fast and secure coding|
RxDB is made so that you can use exactly the same code at
We optimized, double-checked and made boilerplates so you can directly start to use RxDB with frameworks like
npm install rxdb --save # peerDependencies npm install rxjs --save
Feature-Showroom (click to toggle)
To find data in your collection, use the mquery api to create chained mango-queries, which you maybe know from mongoDB or mongoose.
RxDB implements rxjs to make your data reactive. This makes it easy to always show the real-time database-state in the dom without manually re-submitting your queries.
When two instances of RxDB use the same storage-engine, their state and action-stream will be broadcasted. This means with two browser-windows the change of window #1 will automatically affect window #2. This works completely offline.
Because RxDB relies on glorious PouchDB, it is easy to replicate the data between devices and servers. And yes, the changeEvents are also synced.
Schemas are defined via jsonschema and are used to describe your data.
By setting a schema-field to
encrypted: true, the value of this field will be stored in encryption-mode and can’t be read without the password. Of course you can also encrypt nested objects. Example:
The underlying pouchdb can use different adapters as storage engine. So you can use RxDB in different environments by just switching the adapter. For example you can use websql in the browser, localstorage in mobile-browsers and a leveldown-adapter in nodejs.
Import / Export
RxDB lets you import and export the whole database or single collections into json-objects. This is helpful to trace bugs in your application or to move to a given state in your tests.
Imagine your website needs to get a piece of data from the server once every minute. To accomplish this task you create a websocket or pull-interval. If your user now opens the site in 5 tabs parallel, it will run the interval or create the socket 5 times. This is a waste of resources which can be solved by RxDB’s LeaderElection.
Depending on which adapter and in which environment you use RxDB, client-side storage is limited in some way or the other. To save disc-space, RxDB has an internal schema-based key-compression to minimize the size of saved documents.
Similar to Meteors oplog-observe-driver, RxDB has a QueryChangeDetection to optimize observed or reused queries. This makes sure that when you update/insert/remove documents, the query does not have to re-run over the whole database but the new results will be calculated from the events. This creates a huge performance-gain with zero cost. The QueryChangeDetection works internally and is currently in beta (disabled by default).
All major evergreen browsers and IE11 are supported. Tests automatically run against Firefox and Chrome, and manually in a VirtualBox for IE11 and Edge.
We soon will switch to Browserstack and run automated tests in all major browsers
As RxDB heavily relies on PouchDB, see their browser support for more information. Also do keep in mind that different browsers have different storage limits, especially on mobile devices.
A big Thank you to every contributor of this project.