-
-
The kitchen enters the code to close the rescue. A wrong code is rejected.
-
MealRelay turns a forwarded "we have leftover food" message into a tracked rescue, verified with a receipt code.
-
At pickup, the volunteer gets a 4-digit receipt code and a QR to show at drop-off.
-
Claiming is explicit and conflict-safe. Once a kitchen claims a batch, it leaves everyone else's board.
-
Landing page: the batches closing soonest are shown live. No sign-up, just pick a demo role.
-
Rescue board: every batch is a ticket sorted by closing time. The pickup window drains in real time and turns red in the final hour.
-
Donors list surplus in about a minute, with a 5-point self-declaration (labelled as a declaration, not a safety certification).
-
Fully responsive: the rescue board and batch detail at phone width (390 px).
-
Impact ledger: counts verified handoffs only. Meals are clearly labelled as an estimate. All data is fictional demo data.
-
Verified: the batch is stamped Rescued, with a full chain of custody showing who did what and when.
Inspiration
In India, surplus food usually gets rescued through a forwarded message: "Food for 80 left over at the hall, anyone who can collect?" Then nothing is tracked. Nobody knows who has already claimed it, how long the food is safe to collect, or whether it ever reached a kitchen. Some batches get two cars; others get none and are thrown away.
The scale makes this worth solving. UNEP's Food Waste Index 2024 estimates that 1.05 billion tonnes of food were wasted globally in 2022, almost a fifth of all food available to consumers. FSSAI already recognises surplus-food recovery through the Indian Food Sharing Alliance and its 2019 Recovery and Distribution of Surplus Foods Regulations. The networks exist. What's missing is fast, accountable coordination in the few hours before food spoils.
What it does
MealRelay turns surplus food into a tracked rescue with a deadline:
- A donor lists a batch (caterer, hostel, event venue): food, portions, diet, preparation time, pickup deadline and neighbourhood. Before publishing, they complete a 5-item self-declaration checklist and preview the listing.
- Rescue organisations see a live board sorted by what expires first. Each batch is a "ticket" whose pickup window drains in real time and turns red in the last hour. Claiming a batch removes it for everyone else, so no two organisations drive to the same pickup.
- A volunteer accepts the pickup and confirms collection. They then receive a 4-digit receipt code and QR.
- At drop-off the kitchen enters the code. Only then is the rescue marked complete. A wrong code is rejected.
- The impact ledger counts verified handoffs only. Pending, expired or cancelled batches never count.
Every batch keeps a history of who did what and when. Judges can try it without signing up: pick a demo role, open a second tab as another role, and watch the status update live. Reset demo starts over.
How we built it
- React 19 + TypeScript + Vite, styled with Tailwind CSS v4 using a custom design system. The palette takes turmeric yellow for urgency, chili red for critical and leaf green for completed, and the ticket design comes from kitchen order slips.
- All business rules live in one set of pure functions (
claim,acceptTask,confirmPickup,markHandedOver,verifyHandoff). Each one rejects an invalid step with a readable error, and the UI only calls these. Covered by Vitest unit tests. - localStorage with cross-tab sync as the demo data store, so the whole flow runs without accounts or a server.
- React Router, Lucide icons and qrcode.react, deployed on Vercel.
- Built with the help of Claude (Anthropic) via Claude Code for planning, code generation and testing. I reviewed and can explain all of it.
Challenges we ran into
- Preventing double claims. Two organisations clicking "Claim" at once is the core failure of chat-based rescue. Every action re-reads the latest saved state before writing, so a second claim, even from another browser tab, is rejected with "claimed this batch first".
- Being honest about food safety. It was tempting to show a "safe" badge. We deliberately didn't: the checklist is labelled as the donor's own declaration, and the receiving organisation always makes the final assessment.
- Making urgency readable at a glance. A timestamp isn't urgent; a shrinking bar is. Getting the countdown, colours and sort order to point to the next action took several iterations.
- Mobile layout. The impact page overflowed at 320px because grid columns wouldn't shrink below their content. We tested every route at 320, 375, 390, 430 and 768px until nothing overflowed.
Accomplishments that we're proud of
- A complete flow from listing to verified handoff that judges can run in about two minutes, with no login.
- Steps that can't be skipped: you can't hand over food that was never collected, or complete a rescue without the right code.
- An impact number we can defend, because it only counts verified rescues.
- Accessibility basics built in: labelled forms, visible keyboard focus, a skip link, native modal dialogs, and reduced-motion support.
What we learned
- How surplus food is actually recovered in India, through FSSAI's IFSA network and the 2019 surplus-food regulations, and why the people involved are the hard part.
- Designing around states and transitions first made the UI much simpler: each screen just asks "what can this person do next?"
- Small details like a 4-digit code or an honest empty state build more trust than extra features.
What's next for MealRelay
- A shared database (e.g. Postgres) with server-side checks, so donors, kitchens and volunteers on different devices see the same board.
- Verified organisations, starting from FSSAI's public list of food-donation agencies.
- WhatsApp/SMS alerts when a nearby batch is about to expire.
- A map with approximate locations (never exact addresses) and volunteer routing.
- Marathi and Hindi interfaces, and a pilot with a Pune community kitchen.
Built With
- claude
- claude-code
- css3
- github
- google-fonts
- html5
- javascript
- localstorage
- lucide
- qrcode.react
- react
- react-router
- tailwindcss
- typescript
- vercel
- vite
- vitest