Structure for a 'client portal' type application
Unanswered
Polish posted this in #help-forum
PolishOP
Hi,
We are currently building out a large enterprise-scale application, utilising Next.JS (and more) with a MongoDB backend.
I'm curious on the best structure from a MongoDB POV (this will contain lots of customer data, metrics, ticket information etc.):
Should I use a separate database per customer and then have the different collections in there?
Should I have a separate database per 'product item' and then have different customer collections?
And with either solution (I'm leaning towards #1), how best to 'route' the customer to their appropriate data? We utilise NextAuth in coordination with Azure AD, customers with the same email suffix should get the same data etc.
We are currently building out a large enterprise-scale application, utilising Next.JS (and more) with a MongoDB backend.
I'm curious on the best structure from a MongoDB POV (this will contain lots of customer data, metrics, ticket information etc.):
Should I use a separate database per customer and then have the different collections in there?
Should I have a separate database per 'product item' and then have different customer collections?
And with either solution (I'm leaning towards #1), how best to 'route' the customer to their appropriate data? We utilise NextAuth in coordination with Azure AD, customers with the same email suffix should get the same data etc.