Inspiration
Intolerances are easy to overlook, because they seem more minor than allergies on the surface, but they can significantly hinder the quality of your daily life. When you're constantly dealing with discomfort, it can be harder to focus and harder to function. And despite these significant effects they can be hard to understand or identify, especially when triggered by minor ingredients or preservatives. Our teammate Mikayla, and millions of other Americans, know firsthand how difficult dealing with stomach problems can be, but many don't know how much easier life can be when you finally find that common thread.
What it does
BiteCheck helps you easily find the common thread between triggering meals, all you have to do is scan the barcode of each item and quickly add and rate your symptoms. Our weighted algorithm determines suspicious ingredients based on the severity of your symptoms, and how commonly they occur in both triggering and non-triggering meals. From there, Gemini API breaks it down for you, providing unique insights about how your symptoms intertwine with your most likely triggers, bridging the gap between raw data and real symptoms.
finds the pattern between triggering meals and helps you identify the common ingredients present.
Mobile Capture: You can easily log each meal and its ingredients by scanning the barcode on the back of each item or manually inputting each part of your meal and its ingredients. From there, you log your symptoms and rate their severity on a scale of 0 to 5. This data is used to inform our weighted algorithm.
The Noise Filter (Mathematical Logic): The BiteCheck algorithm iterates through every meal and compares ingredients for meals that triggered symptoms for the user and those that did not. The algorithm uses this data to distinguish between a true trigger and a safe staple that happens to be present during a reaction.
The "Reasoning" (AI Interpretation): While the mathematical algorithm identifies "what" the suspects are, Gemini API explains the "why." It bridges the gap between raw data and human symptoms to provide a better analysis.
How we built it
Front End
- React Native - Structured the app as reusable components for screens like barcode scanning, meal logging, and symptom tracking, enabling a fast, engaging, and intuitive user experience.
- Expo - Accelerated development by simplifying native functionality like camera access for barcode scanning and streamlining builds and testing.
- TypeScript - Enforced consistent data shapes between the front end and backend responses, reducing runtime errors when handling meal logs, ingredients, and symptom data. Back End
- Supabase - Designed a relational schema with linked tables for users, meals, ingredients, symptoms, and severity ratings, and used Supabase Auth to manage secure user accounts.
- Python - Implemented the backend server and core algorithm logic, handling barcode submissions, database queries, API calls, and data aggregation.
- Gemini API - Passed structured analytical outputs into Gemini to generate user-friendly explanations that connect observed patterns to possible ingredient triggers.
- Open Food Facts API - Queried product data using scanned barcodes to fetch ingredient lists and product names, automatically populating meal logs while allowing manual overrides.
Challenges we ran into
- ** Merge Conflicts ** : We had trouble getting all of the different parts to integrate cleanly, and dealt with a plethora of complicated merge conflicts when attempting to merge our branches. One issue we dealt with was being unable to pull the most recent version of a teammate's commits, because the two histories were "unrelated". We were able to deal with this by ignoring unrelated histories.
- ** Backend Database Setup ** - We initially struggled to structure the database, due to the sheer amount of data it would have to support. We broke down the data into a variety of linked tables, such as Meal Logs, Meal Definitions, Meal Parts, Ingredients, Symptom Logs, and more. We also created a variety of getter and setter functions to efficiently pull data from and store data in the database.
Accomplishments that we're proud of
- Solving our noise problem with our algorithm was probably the most fundamental challenge we needed to address. It solves the issue of distinguishing which ingredients in the food you eat are actually affecting you, and it gets more accurate with the more data that is provided. We are proud of it because of how simple yet durable our algorithm is, and while we have great ideas for how it can be improved, we are still proud of it.
What we learned
- ** Gemini API & System Prompts ** : Learned how to design effective system prompts and manage token limits when generating meaningful, user-facing insights from structured data.
- ** Creating a Weighted Algorithm **: Learned how to assign and tune weights to different inputs in order to identify patterns, balance signal vs. noise, and adapt results based on user-specific data.
- ** JSON Formatting/Conversions **: Gained experience structuring, validating, and converting JSON data across the frontend, backend, and external APIs to ensure consistent data flow.
- ** Calling Online APIs **:
- Using SQL Databases: Employed the Supabase database to store the copious amount of data in connected tables allowing for accurate results on groups of food that can cause the user discomfort.
- ** Patience**:
## What's next for BiteCheck
-Adjust our algorithm so that it’s more accurate with a smaller pool of data
-Better optimized and more helpful Ai chat, that uses users data more effectively
-Allow for the algorithm and user choice to help build a safe food list in order to cut down on foods that cause discomfort
Log in or sign up for Devpost to join the conversation.