Inspiration
We’ve all stood in front of an open fridge, staring at a handful of random ingredients and thinking “there’s nothing to eat”, then ordered a takeaway while half the food went off. We wanted to fix that. Fridge Raiders turns “what can I make with this?” into a two-step answer: take a photo, get dinner.
What it does
Fridge Raiders lets you snap a photo of your fridge, freezer or cupboard, and AI works out what’s inside.
Scan: upload a photo and Gemini identifies the food items it can see.
Confirm: you review the ingredient list, fix anything it got wrong, and set your constraints. You can also flag ingredients to use first, such as things that are about to expire.
Cook: the app returns three recipes built from your ingredients, categorised as quick, healthy and adventurous. Each comes with steps, cooking time, difficulty, what you still need to buy, and nutrition info (calories and protein).
Recipes can also be saved and upvoted, so the best ones rise to the top.
How we built it
Frontend: React with Tailwind CSS.
Backend: Flask, with a /scan route (photo → Gemini → ingredient list) and a /meal route (confirmed ingredients and constraints → Gemini → recipe JSON).
AI: Google Gemini with structured output. We defined Pydantic schemas for both the ingredient list and the recipes, so Gemini returns JSON we can rely on instead of free text.
Database: SQLite for saved recipes and upvotes.
Safety and reliability: the API key stays server-side, requests are validated before they reach the model, and a mock mode let us develop and test without burning API calls.
Our team of three split the work between the frontend, the backend routes and the data layer, agreeing the JSON contracts between them early on.
Challenges we ran into
Trusting AI output. Even with a schema, Gemini doesn’t always follow the brief. We added a validation layer that checks each response, for example that three recipes come back, each is in the right category, and the “healthy” recipe really meets calorie and protein limits.
Keeping the schema in sync. The frontend, backend and Gemini schema all depend on the same field names, so one mismatch (like protein vs protein_g) could break the whole flow.
Handling failure gracefully. One bad recipe can invalidate a whole response, so we had to decide when to reject, when to retry and what to show the user instead of an internal error.
Learning on the fly. Some of us had never used Flask or SQLite before, and we picked both up mid-hackathon.
Accomplishments that we’re proud of
A full flow from photo to recipe that works end to end.
Structured, validated AI output instead of a fragile text-parsing hack.
A recipe system that goes beyond one suggestion, with three distinct options and nutrition info for each.
A clean split between frontend and backend that let three people build in parallel.
Picking up new tools (Flask, SQLite) and shipping something real with them within the hackathon.
What we learned
How to get reliable, structured output from an LLM using schemas, and why you should still validate what comes back.
How to design and build a Flask API, including routes, validation and error handling.
That agreeing a data contract early saves a lot of pain when several people build one product.
How to work with a database for the first time and keep the API key secure.
What’s next for Fridge Raiders
Smarter dietary controls: allergies, vegetarian/vegan, and budget limits. Pantry memory, so the app remembers staples and tracks what’s about to expire. Per-serving nutrition, with calorie and protein targets tailored to the user. Shopping lists for the “also needed” ingredients. Retry logic and caching to make recipe generation faster and cheaper. A community recipe feed built on the upvote system.