Inspiration

AllerGen AI started at my home. My mom was suffering from recurring allergy reactions, but we couldn’t pinpoint the trigger. Ingredient labels are long, symptoms are easy to forget, and trial-and-error can take months. I built this to make logging effortless (barcode/OCR/manual) and to surface patterns that help narrow down the unknown allergen faster.

What it does

AllerGen AI helps users track allergy-related reactions and identify likely triggers by:

  • Logging symptom events with severity, notes, and possible environmental factors
  • Capturing ingredients through barcode lookup (OpenFoodFacts) or label photo OCR (API Ninjas)
  • Normalizing messy ingredient text into a clean ingredient list using Gemini
  • Summarizing patterns over time and highlighting likely allergens based on frequency and severity

How we built it

  • Frontend: React + TypeScript (Create React App) with a dashboard-style UI
  • Auth & Data: Firebase Authentication + Firestore for storing logs/history
  • Barcode flow: OpenFoodFacts product API → ingredient/allergen extraction → Gemini cleanup → deduped list
  • Image-to-text flow: API Ninjas OCR → Gemini ingredient extraction → add to log
  • AI: Gemini API for ingredient normalization and clinical-style summaries/insights

Challenges we ran into

  • Ingredient data inconsistency across products (structured ingredients vs plain ingredients_text)
  • OCR output being noisy (line breaks, partial words, duplicates) and needing normalization
  • Handling rate limits/timeouts and keeping the UX responsive during AI calls
  • Ensuring secrets aren’t committed (moving API keys into .env and ignoring it in git)

Accomplishments that we're proud of

  • A smooth “capture ingredients” experience with multiple input modes (barcode + image + manual)
  • Automatic ingredient list cleanup and deduping so logs stay usable
  • End-to-end pipeline from “scan” → “structured ingredients” → “stored log” → “analysis-ready data”
  • Clear project setup and GitHub-ready documentation

What we learned

  • Real-world product/label data is messy. Fallbacks and normalization are important
  • OCR needs post-processing to be useful—LLMs are great at turning raw text into structured lists
  • Client-side env vars in CRA are convenient, but true secret protection requires a backend proxy
  • Small UX details (loading states, error messages, progressive steps) make complex flows feel simple

What's next for AllerGen AI

  • Move Gemini + OCR calls to a backend so API keys are never exposed in the browser
  • Add better allergen analytics, such as trendlines, correlations, and “suspected trigger confidence” over time
  • Improve barcode support (multi-region endpoints, caching, alternate databases)
  • Export/shareable reports for clinicians and caregivers in many formats
  • Add user controls for dietary exclusions, verified allergens, and safe-food baselines

Built With

Share this project:

Updates