RxDB 17.0.0Local-First to the Moon
RxDB version 17 focuses on features for Vibe-Coders, better reactivity, improved debugging and DX-for-LLMs, performance and important breaking storage fixes, while also graduating several long-standing plugins out of beta.
Most applications can upgrade easily, but users of OPFS and filesystem-based storages must review the migration notes carefully.
Lets start with the most exciting features...
User Provided Sync EndpointsSync without Serversโ
RxDB 17 introduces two new replication plugins: Google Drive Replication and Microsoft OneDrive Replication.
These replication plugins are the future for vibe-coded applications. They allow developers to create fully functional, cross-device applications without hosting any backend servers or managing database infrastructure. Instead of storing user data on a central server, the application syncs directly to the user's own Google or Microsoft account.
Both plugins provide:
- Zero Backend Required: Developers avoid server hosting costs and maintenance.
- Privacy by Default: Data stays in the user's personal cloud storage.
- Real-Time Sync: Data synchronizes instantly across all of the user's devices, keeping their computers, tablets, and phones perfectly up to date in real time.
- Cross-App Data Sharing: Multiple applications can easily share and sync data by connecting to the same cloud storage folder.
By using these user-provided sync endpoints, you can build and distribute complex offline-first applications that scale to any number of users at zero infrastructure cost. Just host your static page on Github Pages, Vercel, Cloudflare or any other static hosting provider. Read more.
WebMCP PluginMake your App AI Agent Readyโ
RxDB 17 introduces the WebMCP Plugin to expose RxDB collections to AI Agents via the Web Model Context Protocol.
For years, AI interactions in the browser have relied on two ways: Either the agent renders the page and has to parse the pixels, or it has to guess the html structure. Both methods are expensive and often non-deterministic. Applications supporting WebMCP fix that by telling the Agent exactly what operations are available and how to use them.
WebMCP provides a formalized machine interface alongside the human interface.
WebMCP is highly effective when paired with a local-first database like RxDB. Instead of hardcoding specific WebMCP tools for each user actions, you can expose the local database which gives AI Agents unlimited generic query and mutation options.
Improvements for our Vibe-Codersโ
To improve vibe-coding with RxDB, we made the following DX-for-LLM improvements:
- ADD https://rxdb.info/llms.txt for LLM-friendly documentation access.
- ADD
ERROR-MESSAGES.mdto the root of the RxDB package so your LLM knows about all possible errors. - ADD Errors now contain a
cause,fixanddocsproperty which tells your LLM what went wrong and where to find information about possible fixes. This prevents LLMs from reaching dead-ends while debugging. - ADD
@exampletags to TypeScript comments in many parts of the typings so Agents know how to use the API without reading the docs.
Also to improve vibe-coding when working with RxDB directly we added the following files:
- ADD .aiexclude file to reduce context.
- ADD .agent Skill to verify code changes.
- ADD
.claudeignorefile to reduce context. - ADD
.claude/settings.jsonto improve post-generation testing. - ADD
CLAUDE.md
Expo Filesystem RxStorageFaster than SQLiteโ
RxDB 17 introduces the Expo Filesystem RxStorage, a high-performance storage backend for React Native and Expo applications. It is built on expo-opfs and uses the newest Expo Filesystem API. This delivers significant performance gains over SQLite for a wide range of access patterns. Currently I work on making pull requests to the Expo Core repository to further improve the performance of the underlying api. Read more.
Performance ImprovementsHarder, Better, Faster, Strongerโ
RxDB 17 ships with faster reads, faster writes, and lower memory usage across all storage backends. The bulk insert path, query routing, and internal data structures have been reworked to reduce CPU overhead per operation. IndexedDB now stores attachment data in a binary format for smaller on-disk size, and several memory leaks in OPFS and migration code paths have been fixed. Read more.
Better Framework Integrationsโ
- ADD React plugin for easier React integration with hooks and signals.
- ADD new
reactivity-angularpackage to use signals in Angular. - CHANGE moved
reactivity-vueandreactivity-preact-signalsfrom premium to core
Debugging & Developer Experienceโ
- CHANGE the documentation search has been migrated to Algolia DocSearch for better and faster results.
- ADD
contextfield to all RxDB write errors for easier debugging. - ADD improved OPFS RxStorage error logging in
devMode, including:- strict
TextDecodermode. - detailed decoding error output.
- strict
- ADD internal
WeakRefTypeScript types so users no longer need to enableES2021.WeakRef. - ADD
RxDatabase.collections$observable for reactive access to collections. - ADD docs page about testing with RxDB.
- ADD support for the JavaScript
usingkeyword to automatically remove databases in tests. - ADD correctly typed
$$properties andget$$()via HKT-basedReactivityLambdapattern. Signals now carry the document data type (e.g.Signal<number>instead ofSignal<any>). - ADD enforce maximum length for indexes and primary keys (
maxLength: 2048) because big maxLength values impact performance.
Plugins Graduating from Betaโ
The following plugins are no longer in beta and are now considered production-ready:
- Replication Appwrite
- Replication Supabase
- Replication MongoDB
- RxStorage MongoDB
- RxStorage Filesystem (Node)
- RxStorage DenoKV
- Attachment replication
- CRDT Plugin
- RxPipeline
Other Bugfixes, Breaking Changes and Improvementsโ
- FIX OPFS RxStorage memory and cleanup leaks
- FIX memory-mapped storage not purging deleted documents
- FIX
RxCollection.cleanup()ignoringminimumDeletedTime - FIX short primary key lengths not matching replication schema #7587
- FIX retry DenoKV commits when encountering
"database is locked"errors - FIX close broadcast channels and leader election after database shutdown, not during
- FIX migration memory leak: old collection meta doc not deleted #7792
- CHANGE Store data as binary in IndexedDB to use less disc space.
- CHANGE Pull-Only replications no longer store the server metadata on the client.
- FIX downstream replication issues #7804
- FIX add event guard to count and findByIds in _execOverDatabase #7864
- FIX memory leak in migratePromise() #7787
- FIX
exclusiveMinimumandexclusiveMaximumTypeScript types corrected frombooleantonumberto match JSON Schema Draft 6+ #7962 - FIX
find()with$inon the primary key now correctly uses the fastfindDocumentsByIdpath instead of falling back to a full storage query #7993 - FIX DenoKV cleanup deleting index entries with wrong key, causing orphaned indexes and flaky query crashes
- FIX Dexie and DenoKV RxStorages throwing errors (
DataError/ "Start key is greater than end key") on query ranges that yield no results (e.g.,$gtand$ltat the same value). - ADD
waitBeforePersistoption toReplicationPushOptionsto delay upstream persistence cycles, enabling write batching across collections and CPU-idle deferral #7872 - CHANGE
finalschema fields no longer need to be marked asrequired - UPDATE z-schema to version 9.
- CHANGE replace
appendToArray()withArray.concat()for better browser-level optimizations - CHANGE optimize the bulk insert hot path by inlining per-document helper calls, replacing
hasOwnPropertychecks, skipping unnecessary cloning on inserts, and using counter-based event IDs - ADD ensure indexes and primary keys are validated consistently across replication schemas
- CHANGE Reduce
NON_PREMIUM_COLLECTION_LIMITfrom16to13. - ADD Support
extendedLifetimewhen using the SharedWorker. - FIX remote-storage WebSocket server crash on client disconnect: handle missing connections, guard
send()calls, and clean up staleconnectionIdentries #8042 - FIX CRDT plugin not blocking
modify(),patch(),incrementalRemove(), andupdate()write paths, causing the document data and CRDT operation log to diverge silently #8075 - FIX false conflicts on push when using
serverOnlyFieldsin the RxServer plugin, caused byundefinedvalues in server-only fields creating phantom keys that brokedeepEqualcomparisons #8212 - CHANGE
toggleOnDocumentVisiblenow defaults totrue#6810 - FIX query results becoming incorrect when changes occur faster than query update #7067
- CHANGE The GitHub repository no longer contains prebuilt
distfiles. Install RxDB from npm or run the build scripts locally if you need them. - CHANGE Some integrations now use optional peer dependencies. You may need to install them manually:
firebasemongodbnats
Migration from version 16 to 17โ
RxDB 17 is mostly backward-compatible, but please review the following points before upgrading: If you use any of the following storages, you must migrate your data using the storage migrator:
- OPFS RxStorage
- Filesystem RxStorage (Node)
- IndexedDB RxStorage (if you use attachments)
For all other RxStorages, data created with RxDB v16 can be reused directly in RxDB v17 but it is still required to locally test compatibility before upgrading in production.
You can help!โ
There are many things that can be done by you to improve RxDB:
- Check the BACKLOG for features that would be great to have.
- Check the breaking backlog for breaking changes that must be implemented in the future but where I did not have the time yet.
- Check the todos in the code. There are many small improvements that can be done for performance and build size.
- Review the code and add tests.
- Tell a friend about RxDB.