Inspiration
We were inspired by the enormous problem of global food waste.
According to the UN, about 1.3 billion tons of food are wasted each year, creating nearly 8–10% of global greenhouse gas emissions. We wanted to build something that helps people reduce food waste at home and make sustainable food choices easier.
What it does
Smart Fridge is a web application that:
- Accepts multiple photos of a fridge or pantry.
- Uses AWS Rekognition to detect and normalize ingredients into a clean inventory list.
- Prompts for the number of people you’re cooking for and uses an AI agent (OpenAI GPT-4o) to generate recipes with the ingredients you already have.
- Scores each ingredient’s carbon footprint using a curated dataset and highlights high-impact foods like beef.
- Suggests low-carbon swaps and calculates a household sustainability score to guide future shopping decisions.
How we built it
Before coding, we created a logical flow chart to map the process:
Image Upload → Ingredient Detection → Inventory Merge → Carbon Scoring → AI Recipe Generation.
Tech Stack:
- Frontend: Next.js + Tailwind for a responsive UI with multi-image upload and results display.
- Backend: FastAPI for REST endpoints, orchestration, and data validation.
- Image Analysis: AWS Rekognition for food detection and RapidFuzz for label normalization.
- AI Agent: OpenAI GPT-4o mini for recipe generation and sustainability suggestions.
- Data: Custom JSON mapping ingredients to their CO₂e (kg per 100 g) and sustainability tags.
- Deployment: Frontend on Vercel, Backend on Render.
We divided the work into four key areas:
Frontend UI, Vision Service (Rekognition + normalization), Planner & Carbon Engine, and Recipe Service (LLM integration with strict JSON schema).
Challenges we ran into
- AI Tuning: Ensuring the AI only generated recipes using the detected ingredients required strict JSON schemas and careful prompt engineering.
- Merge Conflicts: With four beginners collaborating, Git merge conflicts were frequent and required quick resolution.
- Feature Scope: We debated which features to prioritize, balancing time constraints with our sustainability focus.
- API Limits & Latency: Managing Rekognition calls and OpenAI token limits while keeping response times short.
Accomplishments that we're proud of
- Building a fully working end-to-end system in under 24 hours.
- Designing a clean architecture that integrates computer vision, carbon scoring, and an AI recipe generator.
- Creating a simple but effective carbon impact scoring system with actionable low-carbon swap suggestions.
- Learning how to collaborate efficiently with Git despite frequent conflicts.
What we learned
- How to design and deploy a multi-service architecture combining real-time image analysis and AI.
- Effective Git collaboration with branching, pull requests, and conflict resolution.
- Prompt engineering and how to enforce structured JSON output from large language models.
- The importance of clear, impactful sustainability metrics that motivate users to act.
What's next for Smart Fridge
- Automatic Expiration Detection: Use computer vision to estimate expiration dates and alert users.
- Personal Sustainability Goals: Let users set targets (e.g., reduce carbon footprint by X% over time).
- Community Features: Integrate with local food donation or composting resources to help people keep food out of landfills.
- Enhanced Recipe Engine: Add filters for nutrition, allergy preferences, or regional cuisines.
Built With
- amazon-web-services
- fastapi
- next.js
- openai
- python
- rapidfuzz
- s3
- tailwind
- vercel
Log in or sign up for Devpost to join the conversation.