When is local database support and sync be available for Web?


I’m evaluating offline-first options and MongoDB Realm and AWS Amplify DataStore are the 2 more interesting solutions for my case.
Sadly while DataStore supports local databases for Web and other platforms, such as RN, Android, etc, MongoDB Realm doesn’t, according to this statement on the Web SDK page:

“The Web SDK does not support creating a local database or using sync. Instead, web apps built with Realm use GraphQL or the Query API to query data stored in Atlas.”

Is there a near future plan for this to be added to the Realm features?

Thank you in advance for the attention.

Hi @Ricardo_Montoya,

Realm has offline-first SDKs including React Native, Android, Swift, .NET, Node.js, and alpha SDKs for Kotlin Multiplatform and Flutter. These SDKs can be used offline-only (no sync) or offline-first with Realm Sync providing bidirectional sync between local device storage and a MongoDB Atlas cluster.

The Realm Web SDK focuses on online browser-based use cases:

The MongoDB Realm Web SDK enables browser-based applications to access data stored in MongoDB Atlas and interact with MongoDB Realm services like Functions and authentication. The Web SDK supports both JavaScript and TypeScript applications.


Thank. you for the answer @Stennie,

So you mean off-line first for web is not considered a use case for Real Sync?

In Amplify DataStore I can save, query, delete and filter before sync, and the code can run across iOS, Android and Web with React Native using Expo. The Web version deployed uses IndexedDB for the DataStore and for Native it uses sqlite AFAIK. It could also be possible to create a storage engine adapter for other DBs.

Could you confirm please that in the case of Realm there are no plans to offer similar functionality to work across platforms? Thank you in advance.

PD: Here is the link to DataStore info regarding How it Works in case you are interested in having a look at it.

Hi @Ricardo_Montoya ,

Per my earlier note, Realm has offline-first SDKs and there are cross-platform Realm SDKs for different languages including a Node.js SDK and a React Native SDK that are comparable to Amplify DataStore. Local storage uses a Realm database and Realm Sync enables bi-directional sync to MongoDB Atlas.

The Realm Web SDK that you originally referenced is a solution for online browser-based applications that run in pure client-side JavaScript and do not have an app server (i.e. running solely in a web browser environment, no Node.js, npm packages, or app server deployment). I don’t believe this is a sync use case covered by Amplify as the first step appears to be installing npm packages.

If you are building cross-platform applications with React Native and Expo, you would use the React Native SDK: Build an Offline-First React Native Mobile App with Expo and Realm.


Thank you for the answer @Stennie_X ,

I’ll check out the RN SDK and get back to you in a few days to report if it worked cross platform in iOS, Android and Web using Expo, since that’s how I’m using Amplify DataStore.

Thank you for the attention :smiley:

1 Like

Hi All,

Device Sync for the realm-web is now available as a preview feature!


Hi @Mansoor_Omar, my project is not using Atlas services. Is my understanding correct that unless I use Atlas, then I will not be able to use Realm Web?

My app is currently using Realm, but considering switching off of it since it does not seem possible to have RealmJS work on both web and mobile (unless you use Atlas – which I cannot do)