Inspiration

One member of the team has a friend that recently started eating vegan. Due to this, he, as well as the rest of the team, was exposed to the vast amount of greenhouse gas emission caused by the current food industry, with emphasis on the meat industry. Seeing an opportunity to be able to help protect the Earth from greenhouse gas pollution, the team cam up with the idea of Leaf.

What it does

The objective of Leaf is to promote and assist users in eating in a way that is both healthier for them and the planet. A user can enter a recipe into the app and the app will then evaluate the environmental impact of the recipe. Impact on the environment is calculated by comparing the quantity of the ingredient called for in the recipe and comparing it to the average greenhouse gas emission for processing and packaging that ingredient. The value of greenhouse emissions used to generate that amount of ingredient in the recipe is then returned to the user. This process is completed for each ingredient in the recipe and then the sum of the greenhouse gas generated by the recipe is shown to the user. Once the user is notified of the impact that their recipe has, possible substitutions can be shown for the recipe that would decrease its carbon footprint. Overall, Leaf will allow for people to make healthier food lifestyle choices by helping ease users into a more sustainable, vegetarian inspired diet. Additionally, with these lifestyle changes comes a lessened carbon footprint by finding foods that are less damaging to the environment during their production.

How we built it

Initial data compiling and organization was done with Python. This included using a basic web crawler to acquire pricing, food, and environmental impact data. Additionally, this data was then converted into usable .json files to be used in the final project. Once this was completed, the back-end and front-end were constructed. To manage the dataset we compiled, we utilized a local MySQL relational database to store the information in a handful of tables. From there we set up a Spring server using Maven to create an API to access and manipulate the data from the database. Functionalities include user management and querying the database of green house gas emission records for common food options. The client side application was written for Android and features a clean, tabbed GUI. Each tab corresponds to a major function of the application. These include the home, where carbon emission statistics about the user can be observed, the ingredient replacement tab, where ingredients can be swapped out for cleaner alternatives, the recipes section, where a carbon emission score is calculated using calls to the back-end to process the food in question and finally the profile, where user settings can be found. The application features the full-stack and takes advantage of remote processing for determining clean food alternatives as well as storing user data.

Challenges we ran into

One of the biggest challenges we faced was when we went to connect the front-end and back-end of our app. A majority of this was due to various issues while making volley requests. One issue was syntax mismatches between the front-end and back-end which were difficult to locate, causing errors to arise when running our code. An example of this was that each end had the correct objects and attributes in the request, there were slight nomenclature issues that resulted in failure of our volley requests despite it being a subtle issue.

Accomplishments that we're proud of

We are most proud of the fact that we were able to complete a full stack project in only 36 hours. Our team has also learned many new skills over the course of this competition; this is another accomplishment that we are proud of.

What we learned

All of the team members were able to learn a new skill at this year's competition. Matt learned how to create a web crawler that is able to take prices, names, and image URLs off of an online shopping website. In addition, he learned the basics of app development by assisting and watching team members. Sam learned how to set up both a MySQL server for a database and a Spring Boot server from scratch to create the back-end. Jeff learned a lot about how to utilize volley and get requests to create communication between the front-end and back-end as well as the nuances of Android Studio.

What's next for Leaf

Once the 36 hour project version of Leaf concludes, a plethora of possible expansions are available. The ability to track how much greenhouse gas meals produce every week will be implemented and the user will also be able to set goals for emissions each week. In addition, a taste profile can be implemented which will allow for the user to indicate whether they prefer alternate meat, vegetarian, or vegan substitutions to be made into their recipes. This preference feature can also be used in order to accommodate food allergies and make recipe suggestions regarding them. Expanding beyond dietary choices and restrictions, users may choose a few favorite ingredients and have Eco-friendly recipes given to them including the ingredient(s) as a daily recipe suggestion. A final feature that the team will implement is sourcing substitutions for recipes. Once substitutions are displayed to the user, the suggestions may be clicked on to show more information. This information includes what stores within a set radius sell this product and their prices.

Share this project:

Updates