Fresh Meals with Less Waste

A full-stack web application that helps households use food before it expires. Users add each item with its expiry date and see a colour-coded dashboard of what to use first. They mark items as used or wasted, receive an optional 7:00 AM email before food expires and review a monthly summary of what was used and wasted.

View on GitHub
Food Waste Reducer dashboard on desktop
Monthly summary on mobile

Problem

Food at home is often forgotten until it has already expired. Expiry dates are checked too late, and households have no clear record of how much food they throw away each month.

  • Food is forgotten at the back of the fridge or pantry.
  • Expiry dates are checked only after the food has spoiled.
  • There is no record of how much food is wasted.

Solution

Food Waste Reducer keeps a list of the food in a home kitchen with its expiry date. It shows what to use first, sends an optional morning email before food expires and reports what was used or wasted each month.

  1. 1Track every item with its expiry date.
  2. 2See what to use first, colour-coded by urgency.
  3. 3Receive one email when food is about to expire.
  4. 4Review used and wasted food month by month.

App Tour

The main screens of the web app. Every screen is designed for both desktop and mobile.

Sign in on desktop
Sign in on mobile
Dashboard on desktop
Dashboard on mobile
Item list on desktop
Item list on mobile
Add item form on desktop
Add item form on mobile
Monthly summary on desktop
Monthly summary on mobile
Settings on desktop
Settings on mobile

Features

A focused set of features that follows each item from the day it is bought to the day it is used or thrown away.

  • Accounts

    Register and sign in with email and password. Each user sees only their own items.

  • Item tracking

    Add, edit and delete items with category, quantity, unit and expiry date.

  • Use-soon dashboard

    Items marked Expired Urgent Soon or Fresh, with the next seven days first.

  • Used or wasted

    Close an item as used or wasted in one tap.

  • Email reminder

    An optional 7:00 AM email for items that expire within two days. Each item is listed once.

  • Monthly summary

    Used and wasted counts, waste rate and a breakdown by category for any month.

Architecture

A three-tier web application. A React single-page app calls a Spring Boot REST API over HTTPS with a JWT token. The API stores data in PostgreSQL and sends reminder emails through Brevo. A GitHub Actions schedule triggers the daily reminder.

Data Flow

Three flows show how data moves through the system: adding an item, the daily reminder and the monthly summary.

Add an item

  1. The form validates the input in the browser.
  2. POST /api/items is sent with the JWT token.
  3. The API validates the item and saves it in PostgreSQL.
  4. The response includes the expiry status and days left.
  5. The dashboard and item list refresh.

Daily reminder

  1. GitHub Actions runs at 07:00 Sri Lanka time.
  2. POST /api/internal/reminders/run is sent with a secret header.
  3. The API finds users with reminders on who have not been emailed today.
  4. Items that expire within two days and were not listed before are collected.
  5. One email per user is sent through Brevo. The items are marked as sent.

Monthly summary

  1. An item is marked used or wasted. The closing time is saved.
  2. The summary page requests GET /api/summary?month=YYYY-MM.
  3. The API counts closed items by category within the Sri Lanka month.
  4. The page shows the counts, the waste rate and category bars.

Tech Stack

Open-source tools with free hosting tiers.

Frontend
ReactTypeScriptViteReact RouterTanStack QueryReact Hook FormZodTailwind CSS
Backend
Java 17Spring Boot 4Spring WebSpring Security (JWT)Spring Data JPABean ValidationFlywayActuatorMaven
Database
PostgreSQL
Email
Brevo
Testing
JUnit 5MockitoAssertJTestcontainersVitestReact Testing Library
DevOps
GitGitHubDockerDocker ComposeGitHub Actions
Hosting
VercelRenderNeonGitHub Pages