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?