Awesome
Announcement |
---|
Help testing the RxDB version 16 release |
Use the quickstart, read the documentation or explore the example projects.
<h2> <img height="16" width="16" src="./docs-src/static/files/icons/with-gradient/people.svg"> Used by <b style="color: #e6008d;">many</b> </h2>RxDB is a proven technology used by thousands of developers worldwide. With its flexibility, RxDB is used in a diverse range of apps and services.
<a href="https://rxdb.info/#reviews" target="_blank"> <img src="./docs-src/static/files/used-by-many.png" /> </a> <br /> (<a href="https://forms.gle/7taae27VqLXqd4sF6">add yours</a>) <h2> <img height="16" width="16" src="./docs-src/static/files/icons/with-gradient/multiplayer.svg"> Multiplayer realtime applications <img height="36" src="./docs-src/static/files/icons/with-gradient/text/made-easy.svg"> </h2> <h2> <img height="16" width="16" src="./docs-src/static/files/icons/with-gradient/replication.svg"> Replicate with your <b style="color: #e6008d;">existing infrastructure</b> </h2>RxDB provides an easy to implement, <b>battle-tested</b> <a href="https://rxdb.info/replication.html"> replication protocol</a> for realtime sync with your existing infrastructure.<br /> You do not have to use a specific cloud or backend database. The protocol works by implementing three simple HTTP endpoints. There are also production-ready plugins to easily replicate with <a href="https://rxdb.info/replication-graphql.html">GraphQL</a>, <a href="https://rxdb.info/replication-couchdb.html">CouchDB</a>, <a href="https://rxdb.info/replication-websocket.html">Websocket</a>, <a href="https://rxdb.info/replication-webrtc.html">WebRTC (P2P)</a>,<a href="https://github.com/marceljuenemann/rxdb-supabase">Supabase</a>, <a href="https://rxdb.info/replication-firestore.html">Firestore</a> or <a href="https://rxdb.info/replication-nats.html">NATS</a>.
<h2> <img height="16" width="16" src="./docs-src/static/files/icons/with-gradient/storage-layer.svg"> <b style="color: #8D2089;">Flexible</b> storage layer </h2>RxDB is based on a storage interface that enables you to swap out the underlying storage engine. This increases code reuse because the same database code can be used in different JavaScript environments by just switching out the storage settings.
You can use RxDB on top of IndexedDB, OPFS, LokiJS, Dexie.js, in-memory, SQLite, in a WebWorker thread and even on top of FoundationDB and DenoKV.
No matter what kind of runtime you have, as long as it runs JavaScript, it can run RxDB:
<h4> <img height="13" src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/39.2.2/chrome/chrome_24x24.png" /> <img height="13" src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/39.2.2/firefox/firefox_24x24.png" /> <img height="13" src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/39.2.2/safari/safari_24x24.png" /> <img height="13" src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/39.2.2/edge/edge_24x24.png" /> <img height="13" src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/39.2.2/archive/internet-explorer_9-11/internet-explorer_9-11_24x24.png" /> <a href="./examples/angular">Browsers</a> <img height="13" src="docs-src/static/files/icons/nodejs.png" /> <a href="./examples/node">Node.js</a> <img height="13" src="docs-src/static/files/icons/react-native.png" /> <a href="https://rxdb.info/react-native-database.html">React Native</a> <img height="13" src="docs-src/static/files/icons/capacitor.svg" /> <a href="https://rxdb.info/capacitor-database.html">Capacitor</a> <img height="13" src="docs-src/static/files/icons/nativescript.svg" /> <a href="https://github.com/herefishyfish/rxdb-nativescript">NativeScript</a> <img height="13" src="docs-src/static/files/icons/flutter.svg" /> <a href="./examples/flutter">Flutter</a> or as an <img height="13" src="docs-src/static/files/icons/electron.png" /> <a href="https://rxdb.info/electron-database.html">Electron Database</a> </h4> <h2> All the features that you need </h2>Since its beginning in 2018, RxDB has gained a huge set of features and plugins which makes it a flexible full solution regardless of which type of application you are building. Every feature that you need now or might need in the future is already there.
<table> <tr> <td> <a href="https://rxdb.info/logger.html">Logging</a><br> <a href="https://rxdb.info/rx-attachment.html">Attachments</a><br> <a href="https://rxdb.info/orm.html">ORM</a><br> <a href="https://rxdb.info/transactions-conflicts-revisions.html">Conflict Handling</a><br> <a href="https://rxdb.info/middleware.html">Middleware</a><br> <a href="https://rxdb.info/reactivity.html">Signals</a> </td> <td> <a href="https://rxdb.info/rx-state.html">State</a><br> <a href="https://rxdb.info/backup.html">Backup</a><br> <a href="https://rxdb.info/replication.html">Replication</a><br> <a href="https://rxdb.info/rx-server.html">Server</a><br> <a href="https://rxdb.info/rx-storage.html">Storages</a><br> <a href="https://rxdb.info/rx-local-document.html">Local Documents</a> </td> <td> <a href="https://rxdb.info/schema-validation.html">Schema Validation</a><br> <a href="https://rxdb.info/key-compression.html">Compression</a><br> <a href="https://rxdb.info/migration-schema.html">Migration</a><br> <a href="https://rxdb.info/encryption.html">Encryption</a><br> <a href="https://rxdb.info/crdt.html">CRDT</a><br> <a href="https://rxdb.info/population.html">Population</a> </td> </tr> </table> <!-- - [Logging](https://rxdb.info/logger.html) - [Attachments](https://rxdb.info/rx-attachment.html) - [ORM](https://rxdb.info/orm.html) - [Conflict Handling](https://rxdb.info/transactions-conflicts-revisions.html) - [Middleware](https://rxdb.info/middleware.html) - [Signals](https://rxdb.info/reactivity.html) - [State](https://rxdb.info/rx-state.html) - [Backup](https://rxdb.info/backup.html) - [Replication](https://rxdb.info/replication.html) - [Server](https://rxdb.info/rx-server.html) - [Storages](https://rxdb.info/rx-storage.html) - [Local Documents](https://rxdb.info/rx-local-document.html) - [Schema Validation](https://rxdb.info/schema-validation.html) - [Compression](https://rxdb.info/key-compression.html) - [Migration](https://rxdb.info/migration-schema.html) - [Encryption](https://rxdb.info/encryption.html) - [CRDT](https://rxdb.info/crdt.html) - [Population](https://rxdb.info/population.html) --> <h2> <img height="16" width="16" src="./docs-src/static/files/icons/with-gradient/rocket.svg"> Quick start </h2>Install
npm install rxdb rxjs --save
Store data
import {
createRxDatabase
} from 'rxdb/plugins/core';
/**
* For browsers, we use the dexie.js based storage
* which stores data in IndexedDB in the browser.
* In other JavaScript runtimes, we can use different storages:
* @link https://rxdb.info/rx-storage.html
*/
import { getRxStorageDexie } from 'rxdb/plugins/storage-dexie';
// create a database
const db = await createRxDatabase({
name: 'heroesdb', // the name of the database
storage: getRxStorageDexie()
});
// add collections
await db.addCollections({
heroes: {
schema: mySchema
}
});
// insert a document
await db.heroes.insert({
name: 'Bob',
healthpoints: 100
});
Query data once
const aliveHeroes = await db.heroes.find({
selector: {
healthpoints: {
$gt: 0
}
}
}).exec(); // the exec() returns the result once
Observe a Query
await db.heroes.find({
selector: {
healthpoints: {
$gt: 0
}
}
})
.$ // the $ returns an observable that emits each time the result set of the query changes
.subscribe(aliveHeroes => console.dir(aliveHeroes));
<h2>
<img height="16" width="16" src="./docs-src/static/files/icons/with-gradient/rocket.svg"> Get started
</h2>
Get started now by reading the docs or exploring the example-projects.
<h2> <img height="16" width="16" src="./docs-src/static/files/icons/with-gradient/contribute.svg"> Support and Contribute </h2>- Leave a Star ☝️
- Check out how you can contribute to this project.
- Read this when you have found a bug
- Buy access to the premium plugins
- Join us at discord to get help
- Follow us at LinkedIn
- Give Feedback (anonymous)
More content
Angular Database, Frontend Database, localStorage, React Database, Browser Database, React Native Database, PWA Database, In-memory NoSQL database, JSON database