Inspiration

Indonesia discards 23–48 million tons of food annually, while thousands in local orphanages and social shelters suffer chronic protein deficits and hidden hunger. Existing food rescue platforms rely on flawed "first-come, first-served" mechanics—food goes to whoever clicks fastest, not who needs it most.

NourishCycle was conceived to replace click-speed bias with algorithmic equity: an intelligent Decision Support System (DSS) matching perishable commercial surplus with verified vulnerable communities based on real nutritional deficits, safety windows, and logistics feasibility.

What it does

NourishCycle operates an automated, closed-loop food redistribution pipeline:

  • Nutritional Profiling: Donors (hotels, restaurants, caterers) log surplus food with macro/micronutrient estimates (protein, calories, iron, vitamin C) and strict safe-consumption windows (2–4 hours).
  • Hybrid Entropy-TOPSIS Engine: A mathematical decision engine evaluates eligible recipient institutions across 5 objective criteria:
    1. Nutritional Gap ($C_1$): Protein and caloric deficit against Indonesian AKG (RDA) standards (Permenkes No. 28/2019).
    2. Vulnerability Level ($C_2$): High-risk institutional demographics (children, toddlers, elderly).
    3. Shelf-Life Viability ($C_3$): Recipient capacity to consume before expiration.
    4. Logistical Distance ($C_4$): Haversine travel distance from donor.
    5. Equity Distribution ($C_5$): Time-decay penalty on recent aid to prevent shelter monopolization.
  • Priority Claim & Automated Fallback: Top-ranked shelters receive an exclusive notification and countdown window to accept. Unclaimed donations cascade automatically to Rank #2.
  • Traceable Logistics & Handover: Geospatial Leaflet routing with dynamic QR verification and photo proof of condition upon delivery.
  • ESG & Carbon Accounting: Real-time calculation of rescued food weight, protein delivered, and diverted landfill CO₂e emissions.

How we built it

  • Backend: Python 3.12, FastAPI, SQLModel ORM, Asyncpg.
  • Algorithm Layer: NumPy-vectorized Shannon Entropy (calculating dynamic objective weights from data variance) and TOPSIS (measuring Euclidean proximity to positive-ideal solutions).
  • Frontend: React 19, Vite 6, Tailwind CSS v4, TypeScript, Lucide React, Motion.
  • Database: Supabase PostgreSQL with asynchronous connection pooling and JWT HTTP-only cookie authentication.
  • Geospatial & Real-Time: Leaflet / OpenStreetMap routing engines, Server-Sent Events (SSE), and BroadcastChannel APIs for cross-client synchronisation.

Challenges we ran into

  • Objective Weighting Stability: Normalizing real-world nutritional data matrices for Shannon Entropy without zero-division or log-of-zero artifacts across disparate criteria scales (grams, kilometers, hours).
  • Concurrency in Priority Cascades: Preventing race conditions when priority claim timers expire concurrently with user acceptances across multiple client sessions.
  • Balancing Shelf-Life Against Equity: Constructing utility thresholds where urgent consumption windows override fairness penalties ($C_5$) to prevent edible food from spoiling in transit.

Accomplishments that we're proud of

  • Sub-50ms Vectorized Ranking: Achieving instant multi-criteria ranking runs across dozens of candidate shelters without latency spikes.
  • Audit Transparency: Building an interactive mathematical audit modal allowing donors and auditors to inspect matrix calculations, dynamic weights, and Euclidean distance vectors.
  • Full Operational Prototype: Shipped unified, role-based dashboards (Donor, Recipient, Admin) with end-to-end claim and verification flows.

What we learned

  • Explainable MCDM Beats Black-Box AI: Transparent mathematical optimization (Entropy-TOPSIS) builds far greater trust with institutional donors and NGOs than opaque neural recommenders.
  • Food Rescue is a Time-Decay Problem: Without strict HACCP-compliant expiration windows and proximity penalties, redistributed food risks turning into a safety hazard.
  • Mathematical Fairness Requires Memory: Aid distribution naturally clusters around well-connected institutions unless deliberate historical penalties enforce geographic and social rotation.

What's next for NourishCycle

  • IoT Cold-Chain Telemetry: Integrating low-cost Bluetooth/cellular temperature logging tags for high-risk protein transit.
  • Offline-First PWA: Local SQLite/IndexedDB caching for field volunteers and shelter staff in areas with intermittent connectivity.
  • National AKG Standardization: Expanding demographic intake models beyond regional pilot standards to support multi-provincial nutrition guidelines across Southeast Asia.
  • Automated Tax & Scope-3 Reporting: Generating auditable corporate ESG impact certificates to unlock statutory tax deduction incentives for food donors.

Built With

Share this project:

Updates