https://github.com/pubkey/rxdb Skip to content Sign up * Why GitHub? Features - + Mobile - + Actions - + Codespaces - + Packages - + Security - + Code review - + Project management - + Integrations - + GitHub Sponsors - + Customer stories - + Security - * Team * Enterprise * Explore + Explore GitHub - Learn & contribute + Topics - + Collections - + Trending - + Learning Lab - + Open source guides - Connect with others + The ReadME Project - + Events - + Community forum - + GitHub Education - + GitHub Stars program - * Marketplace * Pricing Plans - + Compare plans - + Contact Sales - + Nonprofit - + Education - [ ] [search-key] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} pubkey / rxdb * Sponsor Sponsor pubkey/rxdb * Watch 230 * Star 15.1k * Fork 682 A realtime Database for JavaScript Applications rxdb.info/ Apache-2.0 License 15.1k stars 682 forks Star Watch * Code * Issues 3 * Pull requests 10 * Discussions * Actions * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Security * Insights master 18 branches 63 tags Go to file Code Clone HTTPS GitHub CLI [https://github.com/p] Use Git or checkout with SVN using the web URL. [gh repo clone pubkey] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching Xcode If nothing happens, download Xcode and try again. Go back Launching Visual Studio If nothing happens, download the GitHub extension for Visual Studio and try again. Go back Latest commit @renovate-bot @renovate renovate-bot and renovate Update dependency karma to v6.1.0 ... 9babeaf Feb 3, 2021 Update dependency karma to v6.1.0 9babeaf Git stats * 4,941 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github ADD minor stuff Jan 24, 2021 config Use terser for better JS language feature support Jul 29, 2020 dist BUILD Jan 24, 2021 docs-src ADD(docs) #2805 warning about using keyCompression with remote non rx... Jan 23, 2021 docs BUILD Jan 24, 2021 examples Update dependency eslint to v7.19.0 Jan 31, 2021 orga ADD minor stuff Jan 24, 2021 plugins ADD sideEffects:false to all plugins Jun 20, 2020 scripts ADD link Jun 21, 2020 src UPGRADE typescript to 4.1.3 Jan 23, 2021 test Update dependency typescript to v4.1.3 Jan 24, 2021 .editorconfig Add editorconfig Oct 16, 2017 .eslintignore FIX lint Sep 9, 2018 .eslintrc.json ADD graphql-sync basic sync is working now Jul 8, 2019 .gitignore Merged `indexes` and `compoundIndexes` into a single field in the schema Nov 15, 2019 .npmignore fix: remove scripts dir from npmignore; will fix #1509 after npm publish Sep 25, 2019 .npmrc DISABLE package-lock.json Mar 19, 2018 CHANGELOG.md FIX link format Jan 24, 2021 ISSUE_TEMPLATE.md ADD check to prevent #2251 Jun 20, 2020 LICENSE.txt ADD LICENSE Dec 2, 2016 PULL_REQUEST_TEMPLATE.md ADD hint for #669 Jun 2, 2018 README.md Add minimum typescript version to readme Sep 2, 2020 babel.config.js CHORE typescript Sep 18, 2019 package.json Update dependency karma to v6.1.0 Feb 3, 2021 perf.md ADD RxDatabase.addCollections(), deprecate RxDatabase.colleciton() Nov 22, 2020 renovate.json Update renovate.json Nov 23, 2020 tsconfig.json ADD(server) pouchdbExpressOptions May 27, 2020 tslint.json FIX lint Jan 23, 2021 View code README.md Announcement Version 9.0.0 is now released, read the ANNOUNCEMENT [68747470733a2f2f63646e2e7261776769742e636f6d2f7075626] RxDB A realtime Database for JavaScript Applications RxDB (short for Reactive Database) is a NoSQL-database for JavaScript Applications like Websites, hybrid Apps, Electron-Apps, Progressive Web Apps and NodeJs. Reactive means that you can not only query the current state, but subscribe to all state changes like the result of a query or even a single field of a document. This is great for UI-based realtime applications in way that makes it easy to develop and also has great performance benefits. To replicate data between your clients and server, RxDB provides modules for realtime replication with any CouchDB compliant endpoint and also with custom GraphQL endpoints. Documentation | Example-Projects [6874747073] follow on Twitter reactive.gif --------------------------------------------------------------------- Features Multiplatform support for browsers, nodejs, electron, cordova, react-native and every other javascript-runtime 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 pouchdbPouchDB, couchdbCouchDB and cloudantIBM 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 (Requires Typescript v3.8 or higher) Platform-support RxDB is made so that you can use exactly the same code at * Chrome Firefox Safari Edge Internet Explorer 11 Browsers * NodeJS NodeJS * electron Electron * react-native React-Native * cordova Cordova/Phonegap We optimized, double-checked and made boilerplates so you can directly start to use RxDB with frameworks like * angular Angular * vuejs Vuejs * react React * ionic Ionic2 Quickstart Installation: npm install rxdb --save # peerDependencies npm install rxjs --save Import: import { createRxDatabase } from 'rxdb'; const db = await createRxDatabase({ name: 'heroesdb', adapter: 'indexeddb', password: 'myLongAndStupidPassword' // optional }); // create database await db.collection({name: 'heroes', schema: mySchema}); // create collection db.heroes.insert({ name: 'Bob' }); // insert document Feature-Showroom (click to toggle) Mango-Query To find data in your collection, use the mquery api to create chained mango-queries, which you maybe know from mongoDB or mongoose. myCollection .find() .where('name').ne('Alice') .where('age').gt(18).lt(67) .limit(10) .sort('-age') .exec().then( docs => { console.dir(docs); }); Reactive 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. db.heroes .find() .sort('name') .$ // <- returns observable of query .subscribe( docs => { myDomElement.innerHTML = docs .map(doc => '