Inspiration

With the growing trend of restricting fad diets and the rate of children with allergies rising, we sought to make an app that made finding foods that fit dietary restrictions simple. The idea sparked when Duncan was working food service, and customers would consistently ask about whether foods fit their dietary needs. Finding out these details requires researching every minor ingredient, which is time-consuming and strenuous. Our app was designed to make this process easy by doing all the research for the user.

What it does

Our app allows users to pick from a database of common diet restricting foods and saves these picks for constant use whenever using the app. The user then can take a picture of an ingredients label and then using the user's allergy preferences, the app will look through the picture taken and find any ingredients the user can't eat. If the user can eat all the ingredients in the food product it lets the user know. Otherwise, if the user can not eat the ingredients, it displays which ingredients break the user's dietary restrictions.

How we built it

The app is split into two major sections: the front-end app using Swift and Xcode, and the back-end image processing host on the server. For the front-end, we taught ourselves how to use Swift and Xcode to deliver a seamless experience between the user and the back-end. For the back-end, we used Flask to create an API in Python. This API is able to receive POST requests where it receives an image and a list of allergies. It then uses the Google Cloud Vision API to find all the ingredients in the picture. The server then parses the list of ingredients and properly formats the into a list of all the ingredients. It then uses sets of dietary restrictions to find which ingredients the user cannot eat and sends this information back in a response back to the user.

Challenges we ran into

Our team ran into many challenges in the 36 hours. We consistently were hitting issues when learning how to code using Swift and Xcode. For example, saving the user's allergy list as a UserDefaults in IOS took hours to implement because of small syntax that was unknown to us as we were learning. We also ran into problems being able to send and receive an image through a JSON. The solution to this problem is encoding and decoding the image into base64 strings to be sent within the JSON POST parameters.

Accomplishments that we're proud of

We are very proud of the overall functionality of the app. We came into this hackathon with zero IOS development experience. We are all majority back-end programmers so making a UI to show off our impressive back-end was our biggest challenge from the start of the hackathon. We feel accomplished knowing we were able to successfully make an intuitive and elegant front-end to link our back-end with no prior IOS experience.

What we learned

We all learned a lot throughout this hackathon process. We all came into this hackathon without ever finishing a project in previous hackathons. Since we were able to finish this app, we learned a lot about project development and being able to split up workloads and have it all link together in the end. For example, we had one member work on computer vision, another on text parsing, another on creating the database, making an API, hosting the back-end on a server, and the last member work on making the IOS app. We also learned a lot about IOS development and being able to link front and back end processes.

What's next for Smarter Ingredients

Adding certain diets like vegan and vegetarian. Making a more extensive list of dietary allergies. Creating an Android equivalent app.

Built With

Share this project:

Updates