# mahammedsathyala/smartfood-rescue-ai_sih_2026 architecture

> Architecture diagram of the GitHub repository mahammedsathyala/smartfood-rescue-ai_sih_2026, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mahammedsathyala/smartfood-rescue-ai_sih_2026
- Repository: https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026

## Overview

SmartFood Rescue AI is a software-first food-surplus decision-support platform. Its main workflow forecasts kitchen demand, registers and audits leftover batches, simulates storage telemetry and assesses quality risk, requires human review, matches eligible food with NGO partners, plans delivery, and measures impact. The graph also includes dataset governance, reporting, and browser-local persistence. Workflow stages and capabilities are documented in the README; sampled source confirms the app shell’s state handling and some storage operations, but not the wiring of every page, so uncertain calls are omitted.

Main entry points: [`src/App.tsx`](https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/App.tsx) (Application Shell), [`src/pages/FoodBatchesPage.tsx`](https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/pages/FoodBatchesPage.tsx) (Batch Registry), [`src/pages/RoutePlanningPage.tsx`](https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/pages/RoutePlanningPage.tsx) (Route Planning), [`src/pages/NgoMatchingPage.tsx`](https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/pages/NgoMatchingPage.tsx) (NGO Matching)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_operations["Kitchen Operations"]
  node_forecast["Demand Forecasting"]
  node_batches["Batch Registry"]
  node_iot["Virtual Telemetry"]
  node_quality["Quality Gate"]
end

subgraph group_rescue["Rescue &amp; Delivery"]
  node_matching["NGO Matching"]
  node_routes["Route Planning"]
  node_map["Route Map<br/>[GoogleRouteMap.tsx]"]
end

subgraph group_insight["Impact &amp; Governance"]
  node_sustainability["Sustainability Metrics"]
  node_reports["Operational Reports<br/>[ReportsPage.tsx]"]
  node_datasets["Dataset Governance"]
end

subgraph group_platform["Application Platform"]
  node_app["Application Shell<br/>[App.tsx]"]
  node_dashboard["Operations Dashboard<br/>[DashboardPage.tsx]"]
  node_settings["Facility Settings<br/>[SettingsPage.tsx]"]
  node_storage[("Local State Storage<br/>[storage.ts]")]
  node_mockdata["Pilot Sample Data<br/>[mockData.ts]"]
end

node_kitchen(("Kitchen Staff"))
node_ngo(("NGO Partner"))

node_kitchen -->|"uses"| node_app
node_ngo -->|"uses"| node_app
node_app -->|"renders"| node_dashboard
node_app -->|"renders"| node_forecast
node_app -->|"renders"| node_batches
node_app -->|"renders"| node_iot
node_app -->|"renders"| node_quality
node_app -->|"renders"| node_matching
node_app -->|"renders"| node_routes
node_app -->|"renders"| node_sustainability
node_app -->|"renders"| node_reports
node_app -->|"renders"| node_datasets
node_app -->|"renders"| node_settings
node_forecast -->|"guides preparation"| node_batches
node_batches -->|"tracks surplus"| node_iot
node_iot -->|"provides telemetry"| node_quality
node_quality -->|"clears for review"| node_matching
node_ngo -->|"responds to offers"| node_matching
node_matching -->|"plans accepted donations"| node_routes
node_routes -->|"shows route"| node_map
node_batches -->|"informs impact"| node_sustainability
node_routes -->|"informs reporting"| node_reports
node_app -->|"loads and saves state"| node_storage
node_storage -->|"seeds initial state"| node_mockdata

click node_app "https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/App.tsx"
click node_dashboard "https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/pages/DashboardPage.tsx"
click node_forecast "https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/pages/DemandForecastPage.tsx"
click node_batches "https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/pages/FoodBatchesPage.tsx"
click node_iot "https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/pages/IoTSimulatorPage.tsx"
click node_quality "https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/pages/QualityCheckPage.tsx"
click node_matching "https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/pages/NgoMatchingPage.tsx"
click node_routes "https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/pages/RoutePlanningPage.tsx"
click node_map "https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/components/GoogleRouteMap.tsx"
click node_sustainability "https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/pages/SustainabilityPage.tsx"
click node_reports "https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/pages/ReportsPage.tsx"
click node_datasets "https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/pages/DatasetManagementPage.tsx"
click node_settings "https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/pages/SettingsPage.tsx"
click node_storage "https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/services/storage.ts"
click node_mockdata "https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/services/mockData.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_forecast,node_batches,node_iot,node_quality toneBlue
class node_matching,node_routes,node_map toneAmber
class node_sustainability,node_reports,node_datasets toneMint
class node_app,node_dashboard,node_settings,node_storage,node_mockdata toneRose
class node_kitchen,node_ngo toneIndigo
```

## Components

### Kitchen Operations

- [Demand Forecasting](https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/pages/DemandForecastPage.tsx): `src/pages/DemandForecastPage.tsx`
- [Batch Registry](https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/pages/FoodBatchesPage.tsx): `src/pages/FoodBatchesPage.tsx`
- [Virtual Telemetry](https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/pages/IoTSimulatorPage.tsx): `src/pages/IoTSimulatorPage.tsx`
- [Quality Gate](https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/pages/QualityCheckPage.tsx): `src/pages/QualityCheckPage.tsx`

### Rescue & Delivery

- [NGO Matching](https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/pages/NgoMatchingPage.tsx): `src/pages/NgoMatchingPage.tsx`
- [Route Planning](https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/pages/RoutePlanningPage.tsx): `src/pages/RoutePlanningPage.tsx`
- [Route Map](https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/components/GoogleRouteMap.tsx): `src/components/GoogleRouteMap.tsx`

### Impact & Governance

- [Sustainability Metrics](https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/pages/SustainabilityPage.tsx): `src/pages/SustainabilityPage.tsx`
- [Operational Reports](https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/pages/ReportsPage.tsx): `src/pages/ReportsPage.tsx`
- [Dataset Governance](https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/pages/DatasetManagementPage.tsx): `src/pages/DatasetManagementPage.tsx`

### Application Platform

- [Application Shell](https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/App.tsx): `src/App.tsx`
- [Operations Dashboard](https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/pages/DashboardPage.tsx): `src/pages/DashboardPage.tsx`
- [Facility Settings](https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/pages/SettingsPage.tsx): `src/pages/SettingsPage.tsx`
- [Local State Storage](https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/services/storage.ts): `src/services/storage.ts`
- [Pilot Sample Data](https://github.com/mahammedsathyala/smartfood-rescue-ai_sih_2026/blob/main/src/services/mockData.ts): `src/services/mockData.ts`

### Other components

- **Kitchen Staff**
- **NGO Partner**

## Connections

- Kitchen Staff → Application Shell: uses
- NGO Partner → Application Shell: uses
- Application Shell → Operations Dashboard: renders
- Application Shell → Demand Forecasting: renders
- Application Shell → Batch Registry: renders
- Application Shell → Virtual Telemetry: renders
- Application Shell → Quality Gate: renders
- Application Shell → NGO Matching: renders
- Application Shell → Route Planning: renders
- Application Shell → Sustainability Metrics: renders
- Application Shell → Operational Reports: renders
- Application Shell → Dataset Governance: renders
- Application Shell → Facility Settings: renders
- Demand Forecasting → Batch Registry: guides preparation
- Batch Registry → Virtual Telemetry: tracks surplus
- Virtual Telemetry → Quality Gate: provides telemetry
- Quality Gate → NGO Matching: clears for review
- NGO Partner → NGO Matching: responds to offers
- NGO Matching → Route Planning: plans accepted donations
- Route Planning → Route Map: shows route
- Batch Registry → Sustainability Metrics: informs impact
- Route Planning → Operational Reports: informs reporting
- Application Shell → Local State Storage: loads and saves state
- Local State Storage → Pilot Sample Data: seeds initial state
