How nikhil-4404/surplus2serve works
Surplus2Serve is a community food-redistribution web app: restaurants submit time-limited surplus offers, then volunteers browse and claim offers for pickup. The main browser workflow uses the localStorage store in app.js to persist alerts and statistics and render dashboard, activity, partner, and impact views. Firebase and Google Sheets are documented alternatives, not shown wired into the main app. The Sheets script includes backend alert, claim, reporting, and notification logic; email and WhatsApp delivery are optional. Some UI and integration details are unsampled, so uncertain connections are omitted.
Main entry points: app.js Web App · google-sheets-integration.js Alert & Claim Logic · firebase-setup.js Firebase Store
Components 15
Redistribution Workflow
- Alert Dashboard
surplus2serve/app.js - Claim Flow
surplus2serve/app.js - Impact Views
surplus2serve/app.js - Activity & Partners
surplus2serve/app.js
Browser Application
- Web App
surplus2serve/app.js
Data Stores
- Local Store
surplus2serve/app.js - Browser Storage
Optional Integrations
- Firebase Store
surplus2serve/firebase-setup.js - Firebase Database
- Sheets Web API
surplus2serve/google-sheets-integration.js - Alert & Claim Logic
surplus2serve/google-sheets-integration.js - Sheets Data
- Email & WhatsApp
Other components
- Restaurant
- Volunteer
Connections 16
- Restaurant → Web App: submits offer
- Volunteer → Web App: browses and claims
- Web App → Local Store: handles alert actions
- Web App → Alert Dashboard: renders alerts
- Web App → Claim Flow: handles claims
- Web App → Impact Views: renders impact
- Web App → Activity & Partners: renders activity
- Alert Dashboard → Local Store: reads alerts
- Claim Flow → Local Store: claims alert
- Impact Views → Local Store: reads statistics
- Activity & Partners → Local Store: reads alerts
- Local Store → Browser Storage: reads and writes
- Firebase Store → Firebase Database: reads and writes
- Sheets Web API → Alert & Claim Logic: dispatches actions
- Alert & Claim Logic → Sheets Data: reads and writes
- Alert & Claim Logic → Email & WhatsApp: sends alerts