The Spark
One evening I opened my fridge, stared at a chaotic mix of half-used ingredients, and thought: “Why can’t my phone just tell me what to cook tonight?” I waste food every week because I forget what I have, buy duplicates, or simply lack inspiration. At the same time, I noticed friends posting “What should I cook?” stories on Instagram with a photo of their fridge. The problem was obvious — and unsolved. That’s how FridgeNutri-AI was born: take a photo of your fridge → instantly get personalized recipes + an automatic shopping list for the rest of the week.
What we Built
A full-stack Next.js 16 (App Router + Turbopack) mobile-first web app with two core flows: Fridge Mode → Upload fridge photo → GPT-4o vision detects every ingredient → generates 8–12 realistic recipes using only what’s inside → lets you pick meals for the week → auto-creates a minimal shopping list for the missing items. Dish-to-Shop Mode → Snap a photo of a finished dish (e.g., bryndzové halušky) → GPT-4o recognizes it → extracts the exact ingredients and quantities → instantly adds everything to your shopping list with real Slovak prices (future feature). Both modes are swipeable 7-day planners, persist via localStorage, and aggressively revoke blob URLs so invalid photos disappear instantly — zero ghost images.
Biggest Challenges & What we Learned
**GPT loves to wrap JSON in ```json:disable-run → Built a bulletproof multi-stage cleaner + fallback error objects. Now works 100% even when the model misbehaves. Next.js 16 + Turbopack hates TypeScript syntax in .jsx files → Learned to write pure JS with zero type annotations in client components — painful but necessary. Blob URLs leaking memory and ghost images → Implemented strict URL.revokeObjectURL() on unmount + reset logic. Invalid photos now vanish instantly. .map is not a function crashes when GPT returns null instead of [] → Adopted the (data || []).map() religion everywhere + inline fallbacks. The app is now truly unbreakable. Making the UI feel native-app smooth on mobile web → Custom swipe gestures, fixed viewports, aggressive safe-area handling, and gradient beauty.
The Result A working product that already feels magical: open the app, snap your fridge, swipe through the week, pick meals, and walk out with a perfect shopping list. Zero food waste. Zero decision fatigue. Pure dopamine. I can finally answer “What’s for dinner?” in under 10 seconds — and so can you. This is just day one. Next: real-time Slovak supermarket price scraping, calorie/goal tracking, and sharing weekly plans with family. Thank you for trying FridgeNutri-AI. Now go open your fridge and let the AI cook for you.
Log in or sign up for Devpost to join the conversation.