The other day, I found myself putting on some weight. This rather surprised me as I thought I was having a healthy diet and exercised almost daily. To identify the root of the problem, I decided to start measuring my calorie intake as well as the macronutrients that constitute said intake.
To achieve this, I built a simple web application using the MEVN stack. The application serves two purposes:
Store information about the various food I eat
Compute the total calorie count and macronutrients constitution of a given list of food
In order to compute a calorie count or macronutrient constitution of a meal, one must first know those values for each individual piece of food in it. This information is stored in a MongoDB collection, managed by its own model, controllers, routes and view.
With a database for foods available, one can compose meal plans and compute their nutrition data easily. Those meals plans basically consist of a list of foods with a title and date for future reference. Those are stored in their own MongoDB collection and also benefit from their own controllers and view.
The source code for this application is available on GitHub: