Real-time platform connecting restaurants, cafes, and supermarkets with food banks that can use their surplus. Live map, instant claims, Socket.io notifications.
Restaurants, cafes, and supermarkets throw out food that's still fine. Food banks, community fridges, and charities could use it. Wanted a real-time platform to close that gap. Hackathon project.
Team project (hackathon).
Root package.json uses concurrently to run both servers. Backend (server/index.js) is Express + Socket.io on port 3001, JWT auth (7-day tokens) plus bcrypt. Routes: /auth/register|login, /listings (full CRUD plus POST /:id/claim in a transaction so double-claims can't happen), /claims/:id/status, /impact/stats. Real Postgres or an in-memory pg-mem fallback (server/db/index.js adapter auto-detects).
Socket.io events: authenticate from client after login, listing:new broadcast, listing:updated broadcast, listing:claimed sent directly to the donor. Frontend at client/ is React 18 + Vite + Tailwind. Leaflet on OpenStreetMap for the map (no API key needed).
Contexts wired: AuthContext persists JWT to localStorage, SocketContext auto-authenticates, ToastContext for notifications. Donor form uses browser geolocation plus Nominatim reverse geocoding. Vite proxies /api and /socket.io to the backend to avoid CORS.
MVP complete for the hackathon: donor register/login, post listing with geolocation, live map, recipient claim with instant donor notification, live impact counter, donor dashboard. Not built yet: driver coordination, SMS via Twilio, admin verification, photo uploads, in-app messaging.