Inspiration

As students, we kept running into the same issue: we’d buy groceries with good intentions, then get buried in classes and forget what we already had. A few days later, food expires, money is wasted, and we still don’t know what to cook with what’s left.

That everyday problem inspired ReciPan: a smart pantry assistant that helps us reduce food waste and make faster meal decisions using AI.


What it does

ReciPan helps users track pantry items, prioritize what to use first, and generate recipes from what they already have.

Key features

  • 📸 Scan food items from camera/gallery and extract structured data with Gemini.
  • ✍️ Autofill an editable verification form before saving (name, category, expiry, quantity).
  • 🥕 Support perishable items with no fixed expiry date and prioritize them as “use soon.”
  • 🧺 Pantry CRUD with sorting (expiry, name, recently added), edit, and archive/throw.
  • 🍳 Generate recipes from pantry items using Gemini.
  • ✅ Mark recipes as “in progress,” then complete with quantity-aware consumption.
  • 🔖 Save recipes for later (persistent per-user saved recipes).
  • 🔔 Push reminders for:
    • items nearing expiry
    • perishable items that have been in pantry for a while
  • 🎬 Protected demo trigger for live showcase reminder testing.

Safety-first behavior

  • AI output is treated as a draft, not ground truth.
  • Inferred dates are clearly flagged.
  • Users verify/edit data before saving.
  • Perishable no-date mode is explicit and avoids fake precision.

How we built it

Frontend

  • Flutter with Riverpod + GoRouter
  • Multi-page UX:
    • Pantry
    • Recipes
    • Settings
    • Camera + Verify Scan flow
  • Freshness visuals (green/orange/red + perishable warning style)
  • Fun loading states with rotating status messages ✨

Backend & infrastructure

  • Firebase Authentication (anonymous)
  • Cloud Firestore for user-scoped data:
    • pantry
    • saved recipes
    • recipe attempts
    • token storage
    • settings
  • Cloud Functions (2nd gen):
    • image extraction function
    • recipe generation function
    • scheduled reminders
    • protected debug callable for demo reminders
  • Firebase Cloud Messaging for push notifications

AI integration

  • Gemini Flash behind secure backend-only API access
  • Strict JSON prompting + sanitization/parsing
  • Recipe prompting that prioritizes near-expiry and perishable-no-date items

Challenges we ran into

  • Ensuring consistent structured AI output required strict prompting and robust sanitization.
  • Handling date edge cases (missing/invalid/epoch dates) without crashing UI.
  • Notification reliability during demos:
    • backend “success” didn’t always mean visible foreground banners
    • solved with Android notification channel + foreground local notification handling
  • Cloud Function deployment and environment setup under hackathon time pressure.
  • Hardening from MVP to demo-ready quality (safety notes, release setup, UX polish).

Accomplishments that we're proud of

  • Built a true end-to-end product, not just a prototype screen set.
  • Added safety-focused UX around uncertain AI output.
  • Implemented quantity-aware recipe completion (not just delete-all behavior).
  • Added persistent saved recipes + recipe lifecycle tracking.
  • Enabled reliable live demo notifications with a protected on-demand trigger.
  • Kept secrets backend-only and data access user-scoped with Firestore rules.

What we learned

  • AI features need strong product guardrails, not just good prompts.
  • Mobile notification UX has platform nuances that matter for real users and demos.
  • Trust comes from transparent, editable workflows.
  • Firebase + Flutter is powerful for rapid iteration when scope evolves quickly.
  • Polish (error handling, safety messaging, flow clarity) is a competitive advantage.

What's next for ReciPan

  • Barcode + OCR hybrid scanning for faster and more accurate input.
  • Unit conversion support for smarter quantity math.
  • Recipe filters by prep time, diet, and budget.
  • Household/shared pantry support.
  • Waste-reduction analytics dashboard over time.

Potential impact metric we want to track: $$ \text{Waste Reduction Rate}=\frac{\text{items used before spoilage}}{\text{items at risk of spoilage}} $$

This helps users see measurable savings in both food and money. 💸🥬

Built With

Share this project:

Updates