0

I've been reading inventory management system tutorials for a while but still don't understand. Let's assume we are in charge of developing a typical crud API to serve a variety of products. At first, we just have 10 different products, so we can make a model for each one. But the more successful the application, the more product models we will have to add. So it becomes tedious to make a unique model for each product. Therefore, I decide to use the flexibility of MongoDB documents and let the products not have a strict scheme. But it also has its own challenge, like validating an incoming product to make sure it has at least the minimum required fields since we don't have a scheme against which to validate the incoming product.

What recommendations can I apply in a scenario like this?

New contributor
Leiver Moreno is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • Any architecture decision is a trade-off, so choose what's more important to you. – mustaccio May 22 at 17:42

Browse other questions tagged or ask your own question.