Inspiration
We got inspiration from Tamagotchi apps and our own grocery spoilage patterns to design a food waste management app with a gamified reward system centered around a cute digital pet.
What it does
| Feature | What it does |
|---|---|
| AI Receipt Scanner | OCR a grocery receipt (upload/snap) → auto-extracts items, RM prices, and shelf-life expiry, then adds them to your pantry. Works with English receipts; falls back to free OCR so it runs with zero paid setup. |
| Smart Manual Add | Type an item — shelf-life expiry (FoodSafety.gov data) and estimated cost are filled in automatically. |
| Recipe Generator | Suggests recipes (via TheMealDB) from your pantry, prioritising items expiring soon. Save recipes, watch the YouTube guide, and tap "Cooked" to auto-remove used ingredients from your pantry. |
| Digital Eco-Pet | A pet (fox, wolf, tiger, dragon, or bat) whose health, mood, and evolution stage are driven by how much food you rescue vs. waste. |
| Impact Dashboard | Live pantry count, "expiring soon" alerts, total CO₂ saved and money saved, and pet status. |
| Leaderboard | Ranks users by CO₂ saved, with an animated pet podium. |
| Free & Premium tiers | Free: 3 recipe generations + 2 receipt scans per day. Premium: unlimited recipes + 10 scans/day. |
| Installable PWA | Add to home screen, works like a native app. |
How we built it
Backend
- Python · FastAPI (async REST API + server-rendered pages)
- PostgreSQL with SQLAlchemy 2.0 (async) + asyncpg
- Redis — caching + daily rate-limit counters
- Celery — background tasks
- JWT auth (python-jose) + bcrypt (passlib)
Frontend
- Vanilla JavaScript, HTML, CSS, Jinja2 templates
- PWA — service worker + web app manifest
AI / External APIs
- Google Cloud Vision (REST) — receipt OCR & ingredient image detection
- TheMealDB — recipe suggestions
Data sources
- FoodSafety.gov Cold Food Storage Chart — shelf-life estimates
- CO₂ emission factors (Poore & Nemecek, 2018) + typical Malaysian retail prices
Infrastructure
- Docker / docker-compose · deployed on Render (web + Postgres + Redis, auto HTTPS)
Challenges we ran into
The challenge: Food waste is one of the largest, most overlooked contributors to household emissions. Existing pantry trackers fail because logging is manual, tedious, and offers no reason to come back.
Our approach — remove friction, add motivation, prove impact:
- Remove friction with AI. Logging groceries is the #1 reason people quit. So we let users scan a receipt or photo — vision extracts the items, prices, and expiry dates automatically. Manual entry auto-fills shelf life from real food-safety data.
- Add motivation with a pet. Behaviour change needs an emotional hook. A digital pet that thrives when you rescue food and suffers when you waste it turns an abstract goal into something you care about daily.
- Close the loop with recipes. Knowing food is expiring isn't enough — we suggest recipes that use those exact items first, and update the pantry automatically when you cook.
- Prove the impact. Every rescued item converts to real CO₂ saved (per-ingredient emission factors) and money saved (RM), surfaced on a dashboard and a community leaderboard.
Accomplishments that we're proud of
Notable engineering challenges we solved
- Deploy without shell access: database tables are auto-created on startup, so the app deploys cleanly on free hosting tiers with no migration step.
- Honest failures: scanners surface the real error and never silently inject fake data into your pantry. -UI UX: the app runs smooth animations with beautiful color scheme on Vanilla Javascript
What we learned
ProjectManagement: This project was new to us in many ways in terms of time and resource management. This experience taught us how to target our goals to align with specific area, how to split tasks and how to manage time efficiently. DeploymentThis was our first time deploying a web application with PostgrateSQL and FastAPI. We learned a lot of methods through trial and errors. VersionControlThere were some unfamilarities with Git for us and this made us learn more about version control due to each of us developing many stuff at one time.
What's next for PantryPet
CommunityBasedPunishmentSystem:Since users can spam to gain more CO2 emission and money saved features, we plan to implement a system where the user must upload a photo of the meal they prepared. Other users may access it via a feed similar to instagram and they can report the user if they are abusing the system. IngredientScanner:Add items to the pantry by taking a photo of a group of items. The app will use computer vision, object detection and object segmentation to automatically recognize the item. SmarterShelfLifeAndCO2Calculation:Right now, the features work on some hard coded data values from a public dataset. This can be improved in the future.
Built With
- css
- fastapi
- google-cloud-vision
- html
- javascript
- postgresql
- python
- themealdb
Log in or sign up for Devpost to join the conversation.