Carbohydrates, fats and proteins are typical components of foods. Vitamins and minerals are essential nutrients. The first way to think about modules is to assemble ingredients according to their classification - vitamins, minerals, sugars, fats, amino acids etc. This is an obvious way to measure and mix ingredients in the laboratory to make a formula. Different carbohydrates provide the structure of plants and the energy we derive from plant foods arrives as sugars.
Digestion reduces the complex carbohydrates to simple sugars, which act as fuel in our body.
Similarly fats and proteins are complex structures in foods which are digested into fatty acids and amino acids. Fat is the second most important source of energy. The first thing we need from a nutritional formula is energy. If you are designing such a formula, you have to decide what fuels you are going to add to supply energy. Living cells are glucose-burning machines.