Inspiration

Our teammate Mohit had been brainstorming this concept for weeks leading up to the hackathon. When we finally met to hash out the details, Dmitri dropped a bombshell—he'd seen the exact same idea on a TV show. As it turns out, Silicon Valley beat us to it! Rather than scrap the idea, we embraced it and set out to bring their vision to life.

What it does

MyFridge is a smart fridge management and recipe discovery app that helps users reduce food waste and make the most of their ingredients. Users can add items to their virtual fridge manually or via AI-powered image recognition, track expiration dates with color-coded alerts, and automatically remove expired items. The app generates personalized recipes based on available ingredients using the Spoonacular API, showing which ingredients you have and which you'll need. Each recipe includes detailed information like cooking time, servings, health scores, ingredients lists, and wine pairings—all presented in an intuitive, modern interface.

How we built it

We built MyFridge using React with hooks for state management and React Router for navigation. The frontend features a custom design system with inline CSS-in-JS styling, creating a clean, modern interface with smooth animations. We integrated the Spoonacular API for recipe generation and detailed recipe information, while our custom Express.js backend handles AI-powered food detection from uploaded images. User data persists via browser localStorage with custom utility functions, and we built a comprehensive ingredients library for intelligent autocomplete and auto-fill functionality. The entire app uses a component-based architecture with optimized performance through useMemo hooks and responsive grid layouts.

Challenges we ran into

AI Food Detection: Our biggest challenge was finding a reliable image recognition solution. We initially implemented Clarifai's food detection model, but it proved inconsistent and unreliable for our use case. We pivoted to OpenRouter, which significantly improved accuracy and performance.

Image Input Method: We iterated through multiple approaches for capturing food items. Our first version used simple file uploads, which worked but felt clunky. We then experimented with real-time video detection that would continuously analyze frames—unfortunately, this hammered our API with requests on every single frame, making it impractical. Our final solution uses a live camera feed where users can capture a single frame, which is then processed by our detection model. This balanced user experience with API efficiency.

Data Management: Integrating the detection results with our ingredient library and auto-fill system required careful mapping and fallback logic to handle edge cases when items weren't recognized or matched.

Accomplishments that we're proud of

We're particularly proud of successfully integrating OpenRouter's AI detection API to accurately identify food items from images—a feature that took several iterations to get right. Implementing the Spoonacular API to generate intelligent, personalized recipes based on available ingredients was another major win. On the technical side, building a live camera capture system that efficiently processes images without overwhelming our API was a rewarding challenge to solve.

Finally, we're excited about the clean, modern UI we designed from scratch. The cohesive design system with smooth animations, intuitive navigation, and thoughtful user experience details like color-coded expiry alerts and interactive recipe modals came together beautifully, making the app both functional and delightful to use.

What we learned

This project taught us valuable lessons about API integration and iteration. We learned that not all APIs are created equal—sometimes you need to pivot quickly when a solution isn't working. Through trial and error with Clarifai and OpenRouter, we discovered the importance of testing third-party services early and having backup plans.

We gained hands-on experience with real-time media capture and learned the hard way about API rate limiting when our video stream approach hit our endpoints every frame. This taught us to balance feature ambition with practical constraints like cost and performance.

On the frontend, we deepened our understanding of React hooks optimization using useMemo and useRef for performance, and learned how to build a cohesive design system without relying on CSS frameworks. Most importantly, we learned that good UX requires iteration. From the AI detection method to the recipe modal interface, each feature went through multiple versions based on what actually felt intuitive to use. The best solutions often came from stepping back and asking "how would a real user interact with this?"

What's next for MyFridge

Enhanced Recipe Customization: We want to give users more control over recipe generation with advanced filtering options including cuisine preferences (Italian, Mexican, Asian, etc.), dietary restrictions (vegetarian, vegan, keto, paleo), allergen exclusions (nuts, dairy, gluten, shellfish), calorie limits, cooking time constraints, difficulty levels, and meal types (breakfast, lunch, dinner, snacks). This would make MyFridge truly personalized to each user's lifestyle and needs.

Smart Fridge Monitoring: We envision implementing intelligent monitoring features that track consumption patterns and predict when items will run out. The system would send push notifications for items approaching expiration, suggest optimal times to use ingredients before they spoil, and generate shopping lists based on frequently used items that are running low. We'd also like to add analytics showing food waste statistics, most-used ingredients, and cost savings over time to help users make more sustainable and economical choices.

Additional Future Features: Integration with smart home devices and IoT fridge sensors for automatic inventory tracking, meal planning calendars that schedule recipes throughout the week, family sharing capabilities so households can collaborate on their fridge inventory, and a barcode scanner for lightning-fast item entry. We'd also love to add a community feature where users can share their favorite recipes and ingredient combinations.

Built With

Share this project:

Updates