Does Realm support browser Web apps?

Hi. I’m navigating my way through the Realm docs and tutorials to validate it for my next project. Something that’s really not clear to me is whether I can use Realm for a web app? Having read the documentation, my understanding is that Realm cannot be used for Web apps. At the same time, I can see tutorials how to use Realm with Angular or React, which is very confusing.

Your official documentation for the Web SDK states:

The MongoDB Realm Web SDK enables server-side client 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.


The same page states:

The Web SDK does not support JavaScript or TypeScript applications written for the Node.js environment or React Native mobile apps.

To sum up: the Web SDK can be used for server-side applications provided they are not Node.js applications. What other server environment can run JS apart from Node.js? Maybe Deno, but I doubt this SDK is for Deno?

While I see example how to use Realm with browser Web apps, I am not sure whether this is the intended use of the SDK or simply an unsupported hack?

1 Like


Thanks for pointing that out. That should say “browser applications” rather than “server-side client applications”. You can use the Web SDK for web apps (webpack, React, etc.). The key point is that you cannot currently use Realm Database or Sync with the Web SDK (i.e. in the browser). You can use MongoDB Realm functionality such as Remote MongoDB Access, GraphQL, calling Realm Functions, and user authentication.

Hope this helps.

1 Like

Thank you for this explanation.

Are there any plans to add support for Realm DB on the Web (e.g. using IndexedDB)? Some competitors already have such solutions, e.g. Firestore or PouchDB.

Here’s a couple of links where you might want to share your enthusiasm:

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.