Inspiration
Every night, bakeries, cafés and delis throw out perfectly good food at closing time. That's lost revenue for small businesses and needless waste, while students nearby are looking for cheap meals. We wanted to make rescuing that food as easy as snapping a photo.
What it does
Last Call is a two-sided marketplace for surplus food:
- Sellers photograph their leftovers. AI identifies and counts the items, writes the listing, and proposes a discount based on how close the store is to closing.
- Buyers get a real-time alert when a nearby deal matches their preferences (diet, budget, distance), reserve it with a 10-minute hold, and pay in-app.
- Stores get paid out instantly on Solana, with a real devnet transaction and explorer link seconds after payment.
- At pickup, the seller scans the buyer's QR code, and an impact dashboard logs meals saved, dollars recovered and CO₂ avoided. Each store gets a shareable impact card.
How we built it
- Gemini API: vision detects and counts the food in the seller's photo; a JSON-mode prompt writes the title, description, allergen tags and a proposed discount.
- Server-clamped pricing: the AI proposes and the server decides. Discount bands tighten as closing approaches, so a bad generation can never list food for $0, and the seller can edit everything.
- Solana (devnet): a background worker sends each store's payout (minus a 5% platform fee) as a real on-chain transfer and shows the explorer link to the seller.
- Visa checkout flow: reserve, a 10-minute hold, card checkout with idempotent payments, and protection against overselling the last box.
- Real time: Server-Sent Events push new-deal alerts, paid orders and payout confirmations to each phone instantly.
- Stack: Node.js, Express and SQLite on the backend; a mobile-first PWA in vanilla JS (camera capture, installable, notifications).
- Every sponsor sits behind an adapter with a live and a mock implementation, so the demo keeps working even if a sandbox goes down.
Challenges we ran into
- Keeping AI pricing safe: we had to constrain the model's output and validate it on the server.
- Concurrency: two buyers grabbing the last box at the same time, which we solved with transactional holds that release automatically when they expire.
- Wiring many sponsor APIs in 24 hours, which led to the live-plus-mock adapter pattern with automatic fallback and a
/healthpage showing what's live.
Accomplishments that we're proud of
- The full loop works end to end: photo → AI listing → live alert → reserve → pay → instant Solana payout → QR pickup → impact dashboard.
- Real on-chain payouts that land within seconds.
- A polished, mobile-first design and an automated end-to-end test of the whole flow.
What we learned
How to get reliable structured output from LLMs, how to design reservation state machines that can't oversell, and how fast settlement on Solana can change cash flow for small businesses.
What's next for Last Call
- Text-message alerts with "reply RESERVE" (Photon) and remembered buyer preferences (Backboard). The integration code is already written.
- Production Visa payments, USDC payouts, and onboarding real Seattle stores near UW.
- Business model: a 5% fee per order, with the shareable impact cards driving new users for free.
Built With
- css3
- express.js
- gemini-api
- javascript
- node.js
- pwa
- solana
- sqlite
- visa
Log in or sign up for Devpost to join the conversation.