Meteor Provider and Consumer apps with same server


#1

Hi, I am making an app similar to Uber where there is a Consumer app and a Provider app. Consumers request a service and Provider can view the request and respond. It needs to work real time.
I have made a single server side code but now I need to split the front end into 2 different apps on Play store. How can i split the client code into 2 parts so they can’t access each others methods?
The Consumer app should not be able to access the Producer routes,methods,views etc. how can I do this?


#2

The way I do that is two apps. For now you can think it’s easier to go with one code base but in the long term it is bad. You will make mistakes and bugs and security holes while you are trying to separate the two in one app. Just make two apps that shares one database and you will see it’s better that way :smile:


#3

Can you help me out as how these 2 apps would communicate?
When a consumer generates a request, How can I notify the providers?
Is this the best approach? How do Uber kind of services do the same?


#5

I have no idea.

When a consumer generates a request, How can I notify the providers?

They would use one mongo, right? So all changes to your db will be synced to all the apps that uses that database.

Is this the best approach?

You should test and see what suits your needs. For my application it’s the right approach.