Mobile app architecture with NodeJS and Flutter

Hi, I’m a beginner at mobile app development and am having trouble with understanding where to integrate Realm. I’m building my mobile frontend on Realm and backend on NodeJS, and there are Realm SDKs for both.

Do I need to connect both my frontend and backend to the Realm SDKs? Or only the backend? If I only connect the backend, how does the local sync work (since requests from my Flutter app to NodeJS presumably would not go through)?

Did you find

Realm is an embedded database that runs on your phone/tablet/desktop. It has the ability to synchronise with a MongoDB running on Atlas using Atlas Device Sync (ADS for short).

There is no direct peer-to-peer sync between devices running Realm - all sync happens through Atlas in a star topology.

You do not (typically) run Realm in server-side processes, but it is obviously possible since we support both Linux and Windows for many of our Realm SDKs.

Yes, I’ve read the docs. Where I’m confused is on the backend NodeJS part. I think I should be accessing my data through a REST API or GraphQL, but the Realm NodeJS SDK exists. Is there one I should prefer?

In addition, I would. like to kick off business logic on my backend based on writes to the database, which I could do with subscriptions in the NodeJS SDK, but if I use another way to connect, I would need to use something like Triggers. Is that understanding correct?

Hi, @Kasper_Nielsen1 would you be able to help?