Inspiration

Our diet is a big part of our life. Having friends with allergies made us think about tools that might make their lives easier. When designing this tool, we realized that it had the power to steer us into making better decisions about the food we eat, by reducing our carbon foot print.

What it does

This app allows users to make informed decisions about what they consume, based on the data found in the product label. The app requires a picture of a product ingredient label, which it will translate into a text file. Once the ingredient information is obtained, it can compare the array with different lists of forbidden elements such as allergens or dietary restrictions (defined by the user) and ultimately notify if any of these ingredients are present in the product in question.

How I built it

On the back-end, it was initiated with Node.js and Express. Then, we brought in Multer in order to store the file so it could be read by Tesseract. Tesseract converted the file image to text which was then set to a variable that was initiated as an empty string. Using a compareStrings function, we took two strings: a list of items the user was allergic to or wanted to avoid(sent from the front-end), and the newly converted text from the photo. We did this by converting the strings into arrays and then filtering through them to see if any of the words match. Once a match was found, it could be sent back to the front-end to warn the user that there is an ingredient they are allergic to or just simply want to avoid.

Challenges I ran into

Tesseract was a new library that none of us had any experience with. So, figuring out how to incorporate that into the back-end. Then ultimately, we were unable to connect the Flutter front-end with the Node.js back-end. The front-end hacker lives in Asia so the time difference made communication a bit difficult. And the back-end hacker was only familiar with React so could not ultimately make the connection with Flutter. Also, downloading the necessary environment to run Flutter was a huge challenge.

Accomplishments that I'm proud of

Figuring out the Tesseract library and being able to incorporate that into our project. Also, figuring out the logic to compare the list of items to the list of ingredients using an enumerable.

What I learned

Communication is very important when you are working on a team.

What's next for Ingredients

Ingredients has the potential to help users reduce carbon emissions through changes in their diet It also keeps track of the user's consumption of certain ingredients (such as meat, palm-oil etc...) that are proven to increase a person's carbon footprint. If the user wishes, they can ask to be notified when they are close to a threshold of said ingredient, and recommend greener substitutes for it.

Front end: https://github.com/Akanksha1212/SheHacks Back end: https://github.com/MusicMeier/ingredient-backend

Share this project:

Updates