Inspiration

Our inspiration behind creating this application is to help busy, working-class women manage their health and fitness more effectively. It is not news that our society faces an obesity epidemic. According to the latest findings of the CDC, the percentage of residents in Virginia who face obesity is around 30-35%, with over 21% of young women aged 18-24 years old reportedly facing some form of obesity. We aim to tackle this problem with calorie and macronutrient tracking where we plan to track the user's progress towards meeting daily goals and also generate trends over time to keep them motivated.

With busy schedules and limited time, many women struggle to plan healthy meals, and stick to a grocery list that supports their goals. To help navigate this, we created the grocery shopping list feature that will allow users to create and save lists, and even find the nearest store for easy shopping. This way, the web application will provide a comprehensive and convenient solution for busy, working-class women to easily find the availability and pip-point location of any items or missing ingredients in nearby stores, without having to sacrifice their time or energy in exhaustively going through every aisle and shelf.

In summary, the web application aims to simplify this process by providing an easy-to-use platform where women can log their food intake, track their progress (daily & monthly), and explore healthy meal ideas to create meaningful shopping lists (of any missing or extra ingredients). The ultimate goal is to empower women to make informed choices about their diet, and to help them lead more fulfilling and balanced lives.

What it does

TrackBites is an easy-to-follow, interactive web application focusing on the betterment of health and everyday management of busy and career-driven women.

How we built it

At a high-level, the system could be broken down into 3 independent components/phases:

Frontend & Middleware Dashboard For the frontend, we used Angular and JavaScript. Recipe APIs Edamam provides APIs for Recipes and much more. We utilized their Recipe API to fetch top recipes when a user searches for them. Since each recipe also has a calorie indicator, we keep track of the number of calories consumed and thus record it for that day. This forms the basis for our time series graph which shows a visual overview of how the caloric intake fluctuates every day over the period of a month. Kroger APIs We made use of Kroger APIs to fetch the list of nearest available stores and also for Product Search where users simply need to query a item and pick one of their liking. It is important to note that once the location is set by the user (via zipcode), we save it in our database (i.e. in MongoDB) and use it as the default location to find availability of products the user queries.

Backend and Database For the backend, Flask was used which made API development easy and quick. Our Flask App was also containerized, thus making the overall process of deployment seamless. To accommodate security, we made use of JWT (JSON Web Tokens) which are a form of tokens that can accommodate a payload and use hashing algorithms along with a secret key to encrypt it. Since we are storing passwords, we also need to encrypt them with care. For this reason, we use Bcrypt which is a popular password hashing algorithm that makes use of randomness as well. This is not all. In order to overcome Bcrypt's major shortcoming which is its limited ability to hash only 72 bytes, we first encoded the password by hashing it with SHA384 and then hashed it with Bcrypt. Lastly, MongoDB was our choice of database due to its distributed nature, unstructured collections and inherent sharding, all of which evaluates to a high performance database.

Deployment and Maintenance In order to containerize the application for easier deployment, we made use of Docker, which streamlined the entire process of deploying the web application on Google Cloud. More specifically, Google Cloud's Cloud Run was used to run our containerized apps and NginX functioned as the Reverse Proxy.

Challenges we ran into

Initially, we had trouble navigating the Kroger API and getting the right amount of access. Due to the inherent foreign (third-party) nature of the API, we had difficulty finding some free nutrition API that could provide us with the overall caloric value, list of ingredients and possible links to the full recipe. However, after extensive research, we decided to use Edamam API for gathering all nutrition-related information as it permits at most 20K calls/month. Lastly, integrating the backend with the frontend and deploying into the cloud proved to be tedious and stressful as well.

Accomplishments that we're proud of

While there are other popular applications like MyFitnessPal, Apple Fitness+ etc. that serve about the same purpose they are premium/subscription-based and offer only one set of the discussed overarching functionalities. Hence, even though fitness applications aren’t a new concept, it is the way that we approached to solve the problem by adding various features like Dashboard, integration with (Kroger) Shopping API etc. that make all the difference. We truly believe that this application will be a standard health app which will keep track of the food consumed so individuals can reach their macronutrient and/or caloric goal.

What we learned

This hackathon gave us a chance to explore the world of APIs and leverage them to the full-extent to build applications in a time-bound, fast-paced environment. It taught the true meaning of team-work, wherein we managed to accomplish so much in such a short time and also put out a meaningful and working product. We also got to explore a whole breadth of new and emerging technologies like Cloud Computing (Google Cloud), Web Hosting (Domain.com), and Communication (Twilio). Lastly, we also learned a great deal about creating insightful Dashboards to keep the end-users engaged and motivated.

What's next for TrackBites

For the Frontend, we plan to make the Trend chart interactive and exhaustive (would also include years and monthly breakdown). An even more extensive use of Twilio to deliver Daily and Monthly Digests of calories and foods consumed and also use it to share the shopping list and availability information of items/missing ingredients. Lastly, we plan to build an in-house Nutrition Database with dedicated API endpoints and provide support to stores like Walmart, Target, Aldi etc. other than only Kroger as we are doing now.

References

  1. https://www.cdc.gov/obesity/data/prevalence-maps.html
  2. https://www.csnews.com/shopping-patterns-working-women
  3. https://www.pewresearch.org/fact-tank/2019/09/24/among-u-s-couples-women-do-more-cooking-and-grocery-shopping-than-men
  4. https://www.edamam.com
  5. https://developer.kroger.com
  6. https://github.com/jtbricker/python-kroger-client

Built With

Share this project:

Updates