Household food CO2 emissions are one of the contributors of global CO2 emissions. By eating local, and healthier, these decisions can also offset our carbon footprint, thereby leading to a more environmental friendly lifestyle.

What it does

Our application, CowCulator is a progressive web application (accessible both online in the browser, and offline via caching on our native devices). CowCulator aims to track our daily, weekly, and monthly carbon footprint associated with the meals we eat. Using Image recognition, and ML, CowCulator is able to recognize the ingredients contained within our meals. CowCulator then makes calculations of our CO2 emissions based on those ingredients, and recommends healthier alternatives.

How we built it

The frontend of our application is built using React, with Typescript, and Sass and Bootstrap for styling. It also supports service workers, for use as a progressive web application (PWA). Being a PWA, our application is able to take photos of the meals we eat from our phone cameras, and upload them to the application, which is processed by FastAPI and then stored in MongoDB. These images are then sent to FoodAI's API to perform image recognition on the meals, and determine their constituent ingredients. The ingredient list is then returned to our web app. These ingredients are matched with our internal database of meal ingredients, and their associated CO2 emissions, to determine the total and breakdown of emissions associated with the meal. Using D3.js, these CO2 emission breakdowns are visualized into pie charts, bar graphs and blob plots, summarized by individual meal, week, and month calendar views. Suggestions are provided by our app to the user via Feed notifications, on ways to reduce their carbon footprint, based on their historical meal intake trends.

Challenges we ran into

Unfortunately, FoodAI's API went down during the weekend of the hackathon (it was proven to be working just prior to the official start of the hackathon), and the backend service we had deployed to Heroku to process the return data, was left unused for this hackathon. A bug report was sent to FoodAI regarding this, but there has not yet been a reply.

Accomplishments that we're proud of

Our team was flexible with the sudden breakdown of our ML API, and compensated by adjusting our UI designs, and changing focus to completing more of the frontend development, in the short 48 hours of this hackathon.

What we learned

Our team learned more about PWA, CI/CD (as was used for frontend deployment), mobile UI/UX, and FastAPI through the duration of this hackathon.

What's next for CowCulator

This weekend, CowCulator started its inception, with problem identification and solution formulation. The UI/UX designs for our application is ready for it's first prototype, and the frontend code is coming along nicely. For the future, we will need to implement a working food identification ML algorithm for our application (whether that is using FoodAI's API, or creating our own), and deploy a working backend, to hide sensitive implementation details from our users. We are also looking for feedback on ways to better improve our application, and contribute to solving one of the world's growing climate problems.

Built With

Share this project: