Inspiration
We noticed a big gap on campus — dining halls often throw away extra food while some students and nearby shelters need it. The main problem isn’t that people don’t want to share; it’s that there’s no quick way to connect them before the food goes bad. We wanted to build an easy tool that helps people share food within minutes.
What it does
FoodConnectSU connects dining halls, students, and local NGOs in real time.
Dining admins post surplus with a photo, quantity, location, and expiry.
An on-device model suggests the food type and basic nutrition so posts are fast and consistent.
Students within ~2 km get notified and see a live feed with countdown timers.
Pickup is verified with a QR code so items aren’t double-claimed.
If food is still available after a set window, NGOs get alerted to collect in bulk.
A simple dashboard tracks posts, pickups, and estimated waste diverted.
How we built it
Frontend: React + Vite + Tailwind for fast UI; QR scanning via a lightweight component; countdown timers and optimistic updates.
Auth & Roles: Firebase Authentication (Google Sign-In). Roles stored in Firestore and enforced with security rules.
Data & Storage: Firestore for posts and users, Cloud Storage for images, composite indexes for feed queries, server timestamps for consistency.
Notifications & Geo: Firebase Cloud Messaging with a service worker; Geofire to run radius queries; Google Maps for location pickers.
AI layer: TensorFlow.js in the browser to classify the uploaded photo; a small nutrient lookup table maps classes to calories/macros.
Automation: Cloud Functions change status on expiry, trigger NGO alerts at +30 min, and prevent duplicate pickups.
Deployment: Firebase Hosting with HTTPS; CI script for lint/build/deploy.
Challenges we ran into
Browser push + permissions: Getting FCM working reliably on desktop and mobile, handling blocked notifications gracefully.
Geo queries at scale: Tuning Geofire and indexes to keep radius queries fast without overfetching.
Model noise: Classifying mixed dishes or low-light photos; added a “confirm/edit” step to keep humans in control.
Security rules: Enforcing “only admins can create posts,” “only claimer can complete pickup,” and safe reads for location data.
QR scanning variance: Different camera resolutions and autofocus speeds; added manual code entry fallback.
Time windows: Handling expiry and NGO triggers correctly across user time zones.
Accomplishments that we're proud of
A full end-to-end flow in one place: post -> notify -> claim -> QR -> verify -> analytics.
On-device AI that feels instant and private; no server round-trip for classification.
Clear separation of roles with tested Firestore rules.
A UI that a dining manager can use one-handed at closing time.
What we learned
Ship the smallest loop that proves value. Real-time plus verification beats “perfect” models.
Push and geo are product decisions as much as tech: permission prompts and defaults matter.
Client-side ML works well for assistive tasks when you keep humans in the loop.
Good rules and indexes save you from backend surprises later.
What's next for FoodConectSU - Campus to Community
Stronger AI: Fine-tune on local cafeteria images; add allergen tags and confidence scores.
Food safety: Track hold times and simple temperature checks; add warnings when windows are tight.
NGO workflow: Scheduling, multi-stop routing, and bulk pickup receipts.
Rewards & impact: Points for students, monthly diversion reports for dining and sustainability offices.
Accessibility & scale: PWA offline support, screen-reader flows, multi-campus onboarding, and rate-limit/abuse protections.
Policy & privacy: Data retention controls, clearer location consent, and opt-in anonymized metrics for impact reporting.
Built With
- chart.js
- cloud-functions
- fcm)
- firebase-(auth
- firestore
- geofire
- github
- google-maps
- hosting
- javascript
- qrcode.react
- react
- storage
- tailwindcss
- tensorflow.js
Log in or sign up for Devpost to join the conversation.