Inspiration πŸ€’

Hackathons are objectively one of the most unhealthy activities for humans πŸ•πŸŸ. When Tom got a stomach bug 🀒 after the first night (not Hacklytics' fault πŸ˜…), we wanted to investigate what was really in our food. We believe food is the most dangerous drug in America πŸ’ŠπŸ‡ΊπŸ‡Έ, and by giving people an easy, firsthand view πŸ‘€ of their consumption, everyone can make better, more sustainable 🌱 munching options.

What it does πŸ”

Hack-A-Food essentially "hacks" into any packaged food identified by a barcode πŸ“¦πŸ“±. Upon scanning the package, the user gets insights on all ingredients πŸ₯¦πŸ₯©, nutrients πŸ’Š, additives βš—οΈ, as well as environmental 🌍 influences involved in creating the food. Our website also allows for interactive learning through Cerebras Inference 🧠 and information marks. We even recommend similar foods 🍽️, enabling users to explore and discover healthier or more interesting alternatives as they browse through the web app.

How we built it πŸ› οΈ

We utilized the Open Food Facts dataset, providing comprehensive attributes for over 3.7 million varieties of packaged food. We called their API 🌐 to access information based on food barcodes. For our food similarity search algorithm, we employed Term Frequency-Inverse Document Frequency (TF-IDF) πŸ“Š vectorization of product names and keywords, calculating cosine similarity to recommend similar products. This approach effectively leveraged names, keywords, nutri-score πŸ“ˆ, and food attributes, with adjustable weights βš–οΈ. Our frontend was built with the Next.js framework πŸ’» for a reactive, responsive web experience.

Challenges we ran into πŸ˜…

Deployment. After finishing, we spent about ~4 hours struggling with deployment, yet still couldn't fully succeed πŸ˜΅β€πŸ’«. Technical debt 🧾 within our system led to infinite loops of errors, despite successful builds. The web interface itself deployed partially, but the backend infrastructure hit issues like import/export errors ⚠️. We also aimed to create a reinforcement learning (RL) model to understand relationships between foods, but computational constraints with 3.7 million data points made it impractical πŸ€”. We attempted a smaller-scale version and achieved decent results. Ultimately, we settled for a simpler recommender system but enjoyed experimenting with RL.

Accomplishments that we're proud of πŸ’ͺ

We completed a hackathon despite getting super sick πŸ€§β€”a true test of perseverance. We're proud of experimenting with reinforcement learning and successfully developing a smaller-scale (~10k data points) recommender model. It was incredibly rewarding to explore these new concepts.

What we learned 🧠

It's never truly over until it's over πŸ•’. Even when feeling down πŸ˜”, pressed for time, and unsure we'd finish, we quickly adapted to challenges through resourceful teamwork and technology ⚑. Resilience and flexibility were key lessons πŸ”‘ we took from this hackathon.

What's next for Hack-A-Food πŸ“±

Mobile App πŸ“²! We initially attempted mobile development with Expo and React-Native but found the learning curve too steep πŸ“ˆ. Now, without hackathon constraints, we're determined to create an accessible, user-friendly mobile app 🌟. Promoting food health education πŸŽπŸ“š should be simple and accessible to everyone!

Built With

Share this project:

Updates