Adding mongorealm to my existing FullStack mobile App

I have a fullStack mobile application that interfaces with a node backend to communicate to my mongodb atlas, meaning I hit an endpoint to process any request from users. I would like to add offline capabilities to it through realm, does that mean i do not need the endpoints any more? How do i go about it (any rough description will help me a mile).Thank you!

Hi, I will try my best to answer your question, but it is a little open-ended. The short answer is “Yes, Atlas Device Sync should be able to help you out here”. I would recommend reading through a tutorial in the language of your choice: https://www.mongodb.com/docs/atlas/app-services/sync/get-started/

One key is that you can migrate functionality slowly to use ADS by starting to define a subset of your schemas in ADS/Realm and add more and more as you remove functionality from your node backend.

As an aside, it sounds like some of the friction in your questions is around the question of “what exactly is ADS and does it really solve my use case?”. I will selfishly point you to an article I wrote recently that I think might be a good place to start: MongoDB Realm Flexible Sync: A primer by an engineer, for an engineer (Part 1) | by Tyler Kaye | Realm Blog | Medium

If you have any more specific questions about your use case and challenges you are running into I would be happy to chat more and think through some issues with you.

Best,
Tyler

Thank you Tyler,
let me go through the resources when I get stuck I will reach out for further assistance.

Hello again @Tyler_Kaye ,
your resources were of great help, I have successfully been able to implement the basic react native features to get my device sync working,(I know this cause i can see my sync events in the Device sync section) however I have not tested it and I wanted to try it out first by the login process and specifically using data from my collection, I tried using custom user data and imported the collection containing the data but i see zero user list, Also as it is on my application it is convenient for my users to login with phone number and password instead of email.
how do I go about this
thanks

Hi, we support various authentication providers; however, you are correct in noting that a lot of people want to have their own authentication service (or another external one like Auth0). For these use cases, I would recommend using the Custom JWT integration. This just lets App Services be a bit more passive and allows you to use a different authentication provider.

Let me know if that works.
Tyler

Okay , i will check it out.
Do you have any Idea why I cannot see my users from the imported collection, or what can lead to them not being seen

I am not entirely sure what you are asking about. Can you add some more detail about what you are doing, what you are seeing, and what you would expect to be seeing?

I selected the custom user data and I have passed the collection that has my user data…i would like to use that data to handle the logins…Is it not supposed to show that list under the “Users” section or how exactly does it work?

Hi, I think the issue here might just be a slight misunderstanding in what custom user data is. I would recommend reading through this docs page: https://www.mongodb.com/docs/atlas/app-services/users/custom-metadata/

The TLDR is that we allow you to use “rules” to set permissions on who has access to what data. If you want additional information about a user to be present at the time of rules evaluation (you have roles, access lists, etc) you can use custom user data, and when a user logs in we will get that user with that user_id field (if it exists) and you can have a rule that references it in some way.

Therefore, the issue seems to be that you think this is seeding the user’s list, but really this is just metadata that is used as a lookup during permissions evaluation.

Another page that might be helpful is this: https://www.mongodb.com/docs/atlas/app-services/sync/app-builder/device-sync-permissions-guide/#std-label-restricted-news-feed

As a last note, I generally tend to push people to spend more time developing their app before diving too far into permissions. That should be considered in your development, but I think it would be valuable for you to initially build your app, play with Realm, design your schema, etc before you think about permissions and custom user data (a lot of people do not need to use custom user data).

Best,
Tyler