Inspiration
As one eats food, one must think about nutrition and health. It is wise to plan out one's nutritional goals and track your progress toward them. Of course, It helps when you have a pal to advise you on your dietary needs.
What it does
You can input your daily nutritional goal regarding Calories, Protein, Fats, Sugar, Fiber, and Carbs. Afterward, you can use a text input to add your meals for the day. It takes in any and all food items(default quantity = 100g) and returns nutritional data regarding them. That data is used to track your progress toward the goal that you specified for that day. For example, if your daily calorific goal is 2000 calories and you input something that contains 500 calories then your progress will be increased by 500. Starting at 0, that would put it at 500/2000. You can keep adding things you have eaten into NutriPal and it will keep track of your progress.
And now for what this app can do with your progress data. At the end of the day when you have added all of the food items and your progress toward your daily goal has been recorded, you can ask NutriPal to give you dietary advice. NutriPal will take your progress and your initial daily goal and generate a custom prompt for GPT-4. This will provide you with important information on how to improve your dietary habits to bring you closer to your nutritional goal. Additionally, it will also give you suggestions on common food items that you can consume to achieve your goals.
Another thing that NutriPal can help you with is when you are out food shopping and are feeling a bit health conscious. NutriPal can give you the exact nutritional value of whatever food item you are thinking of buying, letting you make a more informed purchasing decision regarding your health.
How we built it
The front end is built upon vanilla HTML-CSS and JS while using TailWind. The Backend is built upon the Flask Framework in Python. All the functionality including the API requests and custom prompt generator are being handled by Flask or Python.
Challenges we ran into
One of the biggest challenges we ran into was integrating the front end with the back end. There was a lot of debugging required to successfully render some of the HTML files using Flask. Another challenge would be to integrate Firebase into our application which we failed to do within the 24-hour time-frame. Correctly rendering the login page did not work out very well and ultimately that and the Firebase integration was scraped before making it into the final version.
Accomplishments that we're proud of
Overall, we are relatively proud to have built NutriPal in such a short space of time considering that Flask, Python, and Tailwind were foreign concepts to us before starting work on NutriPal. Specific features that we take pride in are: The custom prompt generator that takes processed data from the nutrition API to get advice using GPT-4, the progress bars on the home page to track the user's progress and the item search that returns the nutritional value of any food item.
What we learned
New things that we learned were Flask, Python, and Tailwind CSS
Log in or sign up for Devpost to join the conversation.