Inspiration

Food-rescue coordinators often receive surplus offers as hurried lists of quantities, use-by times, storage conditions, and incomplete labels. Speed matters, but a fast match can still fail if a receiving site lacks cold storage, capacity is overstated, or allergen evidence is missing. I wanted to make the refusal path as visible and useful as the successful allocation.

What it does

ShelfLife Relay turns a surplus manifest into an inspectable pickup draft. Its constraint-based decision agent parses the manifest, checks shelf life against pickup windows, verifies cold-chain support and allergen-label completeness, and matches only against declared recipient capacity.

In the synthetic demo, it evaluates four lots containing 92 units. It safely allocates 80 eligible units across two fictional recipient sites without exceeding either site's 40-unit capacity. It holds 12 soup trays because their allergen label is incomplete. The interface exposes each stage in a relay trace, explains every decision in an evidence ledger, and exports a local JSON review packet.

How we built it

The responsive interface uses React, TypeScript, and Vite. A deterministic TypeScript constraint engine sorts eligible lots by use-by time, filters recipients by storage compatibility, and divides quantities without exceeding verified capacity. Vitest covers capacity splitting and the three refusal conditions: incomplete allergen evidence, an expired pickup window, and unavailable cold-chain support. Playwright was used to exercise the desktop and mobile flows.

This prototype uses a transparent symbolic-AI approach rather than a trained machine-learning model or remote language-model API. That choice makes the demo reproducible, keeps its data in the browser, and prevents generated safety facts from entering the allocation path.

Challenges we ran into

The core challenge was balancing urgency with refusal. A useful allocation tool must do more than find a mathematically valid split: it needs to preserve shelf-life, storage, labeling, and capacity evidence, and it must stop when that evidence is insufficient. Designing the evidence ledger alongside the allocation logic kept those constraints visible instead of hiding them behind a recommendation.

Accomplishments that we're proud of

  • A working local prototype with editable quantities and responsive layouts.
  • Capacity-safe allocation of exactly 80 eligible units across two 40-unit recipient limits.
  • A visible hold for the 12-unit lot with incomplete allergen evidence.
  • Four passing domain tests, a passing production build, and a local review-packet export.
  • A clear safety boundary: all lots and recipient sites are fictional, and the app sends nothing externally.

What we learned

Explainability is not an extra dashboard for a high-stakes workflow; it is part of the product. Showing the evidence, the hold reason, and the remaining capacity makes a conservative decision easier to review and correct. Deterministic reasoning is also a useful baseline before introducing probabilistic parsing or recommendations.

Who it is for

Food-rescue coordinators, community pantry operations teams, shelter logistics staff, and volunteers reviewing surplus offers.

What's next for ShelfLife Relay

The next step would be an optional language-model parser for messy donor messages, while keeping the deterministic constraint tools and human review gate authoritative. A real pilot would also need verified recipient profiles, audited time and temperature data, privacy controls, accessibility testing, and explicit coordinator sign-off before any dispatch.

The current demo establishes technical feasibility only; it does not claim measured real-world impact.

Built With

  • architecture
  • constraint-based
  • local-first
  • playwright
  • react
  • reasoning
  • typescript
  • vite
  • vitest
Share this project:

Updates