I am working on a project that will have multiple databases (users, billing, application data) and I am not sure the best way of going about this. I was thinking of multiple applications but that seems like there has to be an easier/better way.
I want it so that a user in can create or delete a sub user (update the users and billing databases) and that original user or sub user can interact with the application data database. Idea being that I will have a route /api/login
which gets a post request and log the user in using passport (maybe adding in passport totp eventually). The user then could read and write to both the application data and users database.
I also need it so that a user can load a page (say /users/profile
) and it will pull from the users database but then can go to another page (say /time/request
) and could then send a POST request to that route and write data to the application database.
I hope this is not too far outside the typical help found here. I know it is not a bug or directly code question but more of a software design question. Any help would be greatly appreciated.
The stack I am planning to work with is mongo, express, react and node.js.
Edit
I have already seen the 'possible duplicate' thread and it did not address my question in a way I felt was satisfactory for me. Please stop with a simple google search assuming it is the solution.