ShelfSense

Inspiration

Every year, households waste tons of food simply because items expire unnoticed. With rising prices and increasing environmental concerns, we wanted to create something simple yet powerful that helps people manage their groceries better, save money, and reduce waste — automatically.

What it does

ShelfSense is a smart food inventory and expiry tracking system. Users can:

  • Add, view, update, and delete grocery items.
  • Receive automatic alerts (SMS or email) for items nearing expiry.
  • Get recipe suggestions based on items expiring soon.
  • Automatically clean expired items from the inventory.
  • Optionally, view analytics like most used ingredients or items that expire frequently.

How we built it

ShelfSense was built using a modular and serverless architecture:

  • Frontend: Streamlit (Python) for a clean and interactive UI.
  • Backend: AWS Lambda functions for each operation (Add, Get, Update, CheckExpiry).
  • Database: DynamoDB to store grocery items.
  • API Gateway: To expose Lambda functions as REST endpoints.
  • SNS (Simple Notification Service): For sending alerts via email/SMS.
  • EventBridge: To run scheduled daily checks for expiry.
  • Spoonacular API: To fetch recipes using expiring ingredients.
  • Terraform: For complete infrastructure provisioning (IAC).
  • Secrets Handling: API keys are securely stored in .env and .tfvars, both gitignored.

Challenges we ran into

  • Dynamically syncing the API Gateway ID in frontend after every redeploy.
  • SMS limitations with AWS SNS in some regions (solved via email fallback).
  • Handling date logic properly in UTC when checking expiry windows.
  • Making Spoonacular API return meaningful recipes based on partial or uncommon ingredients.
  • Ensuring all Lambda functions had the correct permissions through IAM roles.

Accomplishments that we're proud of

  • Fully serverless, scalable backend with clean architecture.
  • Scheduled expiry checks + auto deletion + alerting, all handled seamlessly.
  • Intuitive Streamlit frontend that even non-tech users can operate.
  • Secure handling of secrets and environment configs (hackathon-friendly and GitHub-ready).
  • Real recipe suggestions based on what's available in your fridge.

What we learned

  • Efficient use of AWS services in tandem (Lambda, SNS, EventBridge, API Gateway).
  • Managing state and deploying APIs using Terraform modules and outputs.
  • Creating reusable and testable Lambda code for serverless apps.
  • Managing infrastructure and environment variables securely.
  • Creating responsive and user-friendly interfaces with Streamlit.

What's next for ShelfSense

  • Add barcode scanning for easy item entry (mobile app integration).
  • Machine learning to predict user consumption and suggest purchases.
  • Multi-user support with authentication.
  • Dashboard enhancements with visual analytics (expiry trends, food groups, wastage saved).
  • Integration with shopping APIs to auto-reorder essentials before they run out.

Built With

Share this project:

Updates

Submission history