Ping surplus. Rescue meals.
MealPing is an AI-assisted food-rescue network for Food Partners, NGOs and network operators. A restaurant can photograph or type a surplus-food description; AI structures it; a person confirms it; AI can prepare a human-reviewable pickup handoff brief; deterministic rules rank eligible nearby NGOs; and both organizations track pickup and delivery.
This repository is an Angular 21 + PrimeNG 21 hackathon MVP. It starts in demo mode with synthetic Mumbai–Thane data and no paid services.
npm install
npm startOpen http://localhost:4200. Useful demo routes:
/partner/dashboard— Food Partner workspace/partner/donations/new— typed description → AI extraction → confirmation → publish/ngo/dashboard— ranked rescue opportunities/ngo/opportunities/MP-24071— acceptance flow/ngo/rescues/MP-24071— pickup OTP and delivery flow/admin/dashboard— live network operations
Every workspace route is login-protected. Use the role-specific login tabs with:
| Workspace | Password | |
|---|---|---|
| Food Partner | partner@mealping.demo |
mealping123 |
| NGO | ngo@mealping.demo |
mealping123 |
| Admin | admin@mealping.demo |
mealping123 |
Each account can open only its own workspace. The registration form also creates a reusable local account in demo mode. When Supabase is configured and demoMode is disabled, login and registration use Supabase Auth instead.
The hosted Supabase demo includes three intentionally fake, ready-to-test accounts. They are for product review only — do not use them with real people, food, or personal information.
| Workspace | Password | What a reviewer can check | |
|---|---|---|---|
| Food Partner | partner.demo@mealping.test |
Demo@MealPing26 |
Verified restaurant workspace and surplus-food posting |
| NGO | ngo.demo@mealping.test |
Demo@MealPing26 |
Verified NGO workspace, opportunities and rescue workflow |
| Network Admin | admin.demo@mealping.test |
Demo@MealPing26 |
Organization review and network operations |
The partner and NGO profiles use fictional Thane data and are already verified so reviewers can reach the main product flows immediately. The seed steps are retained in supabase/hackathon-demo-accounts.sql for a fresh Supabase project.
- Premium responsive public site, authentication and registration screens
- Role-specific desktop sidebar and mobile bottom navigation
- Login guards, role authorization, persisted sessions and logout
- Partner dashboards, multi-step donation flow, details, history, outlets and profile
- NGO opportunities, transparent matching reasons, acceptance, pickup and delivery
- Admin network health, organizations, donations, matches, exceptions and rule settings
- PWA manifest/service-worker configuration
- Supabase schema with Row Level Security policies
- Secure Supabase Edge Function for Gemini extraction and NGO-ready handoff briefs
- Demo services that make the full product story usable before backend setup
-
In the Supabase SQL editor, run
supabase/schema.sql, then runsupabase/launch-readiness-migration.sql, then runsupabase/organization-resubmission-migration.sql. These add recorded admin reviews, read-state for notifications, missed-pickup handling, organization profile editing, and suspended-account resubmission. -
The included environment files already point to the MealPing Supabase project. For a different project, change only the URL and anon key in both
src/environments/environment.tsandsrc/environments/environment.prod.ts. Production builds automatically useenvironment.prod.ts. -
Keep the Gemini key server-side and deploy the AI function:
supabase secrets set GEMINI_API_KEY=your_gemini_key GEMINI_MODEL=gemini-3.5-flash supabase functions deploy extract-donationAI is an assistive shortcut, never a requirement: people can continue with the manual form whenever Gemini is busy or unavailable. The handoff brief summarizes confirmed pickup facts, flags missing operational information, and drafts a coordination message. It never certifies food safety, approves an organization, or chooses the receiving NGO.
The
extract-donationdeployment must be refreshed after pulling code changes; it handles both form extraction and the AI handoff brief. The product labels this helper as a pilot and keeps the manual workflow available at every point. -
Schedule deadline housekeeping so expired posts are closed even when nobody has the website open. No Edge Function deployment is needed for this option:
- In Supabase, open Integrations → Cron (or Cron → Jobs).
- Choose Create job, name it
expire-donations-every-5-minutes, and set the schedule to*/5 * * * *. - Choose Database function, then select
refresh_expired_donationsand save.
The included
expire-donationsEdge Function is only an optional alternative for an external scheduler; you can ignore it for now. -
GPS pins are optional. When a user allows location access, MealPing stores only the coordinates for distance matching; the user still enters and confirms their address, city, state and pincode.
The Supabase anon key is intended for browser use when Row Level Security is enabled. Never put the Supabase service-role key or Gemini key in Angular environment files.
AI only extracts fields and identifies missing details. It never declares food safe and does not choose the receiving NGO. Matching should remain deterministic and auditable:
- Filter by verified status, service radius, food policy, capacity and pickup window.
- Rank eligible NGOs by configurable distance, timing, reliability and fairness weights.
- Alert in ranked waves and record every outcome.
Before a real pilot, complete legal review, food-safety policy, organization verification, consent and incident-response procedures.