# tejas07102005/anvation-hackothon architecture

> Architecture diagram of the GitHub repository tejas07102005/anvation-hackothon, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tejas07102005/anvation-hackothon
- Repository: https://github.com/tejas07102005/anvation-hackothon

## Overview

EcoCity AI is a municipal waste-management command center: operators review city status and alerts, inspect zones and service performance, and use forecasts or the EcoAgent to guide collection and routing actions. The React interface presents operational screens and can use the FastAPI service through a centralized REST client; the backend exposes domain APIs backed by risk, forecast, route-optimization, and segregation logic. The graph includes the README’s major product capabilities. Several backend route implementations and screens were not excerpted, so their internal behavior is not inferred.

Main entry points: [`src/App.jsx`](https://github.com/tejas07102005/anvation-hackothon/blob/main/src/App.jsx) (Command center app), [`backend/main.py`](https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/main.py) (FastAPI application), [`backend/api/agent.py`](https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/api/agent.py) (Agent API), [`src/services/api.js`](https://github.com/tejas07102005/anvation-hackothon/blob/main/src/services/api.js) (REST API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Operations Interface"]
  node_app["Command center app<br/>[App.jsx]"]
  node_map["City waste map<br/>[CityWasteMap.jsx]"]
  node_eco_agent["EcoAgent drawer<br/>[EcoAgentDrawer.jsx]"]
end

subgraph group_domain_screens["Waste Operations"]
  node_command_screen["Command center"]
  node_waste_zones["Waste zones"]
  node_history_screen["Historical analytics"]
  node_landfill_screen["Landfill intelligence"]
  node_collection_screen["Collection reliability"]
  node_segregation_screen["Source segregation"]
  node_route_screen["Route optimization"]
  node_data_ai_screen["Data and AI"]
end

subgraph group_frontend_intelligence["Frontend Intelligence"]
  node_mock_data["Operational mock data<br/>[mockData.js]"]
  node_api_client["REST API client<br/>[api.js]"]
  node_ai_engine["AI intelligence engine"]
  node_route_engine_ui["Route optimization engine"]
  node_agent_tools["EcoAgent tools<br/>[ecoAgentTools.js]"]
end

subgraph group_backend_api["Backend APIs"]
  node_fastapi["FastAPI application<br/>[main.py]"]
  node_agent_api["Agent API<br/>[agent.py]"]
  node_dashboard_api["Dashboard API<br/>[dashboard.py]"]
  node_zones_api["Zones API<br/>[zones.py]"]
  node_vehicles_api["Vehicles API<br/>[vehicles.py]"]
  node_forecast_api["Forecast API<br/>[forecast.py]"]
  node_landfill_api["Landfill API<br/>[landfill.py]"]
  node_collection_api["Collection API<br/>[collection.py]"]
  node_segregation_api["Segregation API<br/>[segregation.py]"]
end

subgraph group_backend_engines["Backend Engines"]
  node_risk_engine["Risk engine<br/>[risk_engine.py]"]
  node_forecast_engine["Forecast engine<br/>[forecast_engine.py]"]
  node_route_engine["Route optimizer<br/>[route_optimizer.py]"]
  node_segregation_engine["Segregation analysis<br/>[segregation.py]"]
end

node_operator(("Municipal operator"))
node_external_api(("FastAPI service"))

node_operator -->|"uses"| node_app
node_app -->|"shows"| node_command_screen
node_app -->|"shows"| node_waste_zones
node_app -->|"shows"| node_history_screen
node_app -->|"shows"| node_landfill_screen
node_app -->|"shows"| node_collection_screen
node_app -->|"shows"| node_segregation_screen
node_app -->|"shows"| node_route_screen
node_app -->|"shows"| node_data_ai_screen
node_app -->|"opens"| node_eco_agent
node_command_screen -->|"renders"| node_map
node_app -->|"fetches data"| node_api_client
node_app -->|"simulates sensors"| node_ai_engine
node_data_ai_screen -->|"parses history"| node_ai_engine
node_route_screen -->|"optimizes routes"| node_route_engine_ui
node_eco_agent -->|"runs tools"| node_agent_tools
node_eco_agent -->|"queries agent"| node_api_client
node_collection_screen -->|"fetches service data"| node_api_client
node_segregation_screen -->|"fetches service data"| node_api_client
node_landfill_screen -->|"reads metrics"| node_mock_data
node_waste_zones -->|"reads zone data"| node_mock_data
node_api_client -->|"sends REST requests"| node_external_api
node_fastapi -->|"registers"| node_agent_api
node_fastapi -->|"registers"| node_dashboard_api
node_fastapi -->|"registers"| node_zones_api
node_fastapi -->|"registers"| node_vehicles_api
node_fastapi -->|"registers"| node_forecast_api
node_fastapi -->|"registers"| node_landfill_api
node_fastapi -->|"registers"| node_collection_api
node_fastapi -->|"registers"| node_segregation_api
node_agent_api -->|"uses"| node_risk_engine
node_agent_api -->|"uses"| node_forecast_engine
node_agent_api -->|"uses"| node_route_engine
node_agent_api -->|"uses"| node_segregation_engine
node_zones_api -->|"uses"| node_risk_engine
node_forecast_api -->|"uses"| node_forecast_engine
node_forecast_api -->|"uses"| node_risk_engine
node_landfill_api -->|"uses"| node_forecast_engine
node_vehicles_api -->|"uses"| node_route_engine
node_segregation_api -->|"uses"| node_segregation_engine

click node_app "https://github.com/tejas07102005/anvation-hackothon/blob/main/src/App.jsx"
click node_command_screen "https://github.com/tejas07102005/anvation-hackothon/blob/main/src/screens/CommandCenterScreen.jsx"
click node_waste_zones "https://github.com/tejas07102005/anvation-hackothon/blob/main/src/screens/WasteZonesScreen.jsx"
click node_history_screen "https://github.com/tejas07102005/anvation-hackothon/blob/main/src/screens/HistoricalAnalyticsScreen.jsx"
click node_landfill_screen "https://github.com/tejas07102005/anvation-hackothon/blob/main/src/screens/LandfillIntelligenceScreen.jsx"
click node_collection_screen "https://github.com/tejas07102005/anvation-hackothon/blob/main/src/screens/CollectionReliabilityScreen.jsx"
click node_segregation_screen "https://github.com/tejas07102005/anvation-hackothon/blob/main/src/screens/SourceSegregationScreen.jsx"
click node_route_screen "https://github.com/tejas07102005/anvation-hackothon/blob/main/src/screens/RouteOptimizationScreen.jsx"
click node_data_ai_screen "https://github.com/tejas07102005/anvation-hackothon/blob/main/src/screens/DataAndAIScreen.jsx"
click node_map "https://github.com/tejas07102005/anvation-hackothon/blob/main/src/components/CityWasteMap.jsx"
click node_eco_agent "https://github.com/tejas07102005/anvation-hackothon/blob/main/src/components/EcoAgentDrawer.jsx"
click node_mock_data "https://github.com/tejas07102005/anvation-hackothon/blob/main/src/data/mockData.js"
click node_api_client "https://github.com/tejas07102005/anvation-hackothon/blob/main/src/services/api.js"
click node_ai_engine "https://github.com/tejas07102005/anvation-hackothon/blob/main/src/services/aiIntelligenceEngine.js"
click node_route_engine_ui "https://github.com/tejas07102005/anvation-hackothon/blob/main/src/services/routeOptimizationEngine.js"
click node_agent_tools "https://github.com/tejas07102005/anvation-hackothon/blob/main/src/services/ecoAgentTools.js"
click node_fastapi "https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/main.py"
click node_agent_api "https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/api/agent.py"
click node_dashboard_api "https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/api/dashboard.py"
click node_zones_api "https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/api/zones.py"
click node_vehicles_api "https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/api/vehicles.py"
click node_forecast_api "https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/api/forecast.py"
click node_landfill_api "https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/api/landfill.py"
click node_collection_api "https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/api/collection.py"
click node_segregation_api "https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/api/segregation.py"
click node_risk_engine "https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/services/risk_engine.py"
click node_forecast_engine "https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/services/forecast_engine.py"
click node_route_engine "https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/services/route_optimizer.py"
click node_segregation_engine "https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/services/segregation.py"

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_app,node_map,node_eco_agent toneBlue
class node_command_screen,node_waste_zones,node_history_screen,node_landfill_screen,node_collection_screen,node_segregation_screen,node_route_screen,node_data_ai_screen toneAmber
class node_mock_data,node_api_client,node_ai_engine,node_route_engine_ui,node_agent_tools,node_external_api toneMint
class node_fastapi,node_agent_api,node_dashboard_api,node_zones_api,node_vehicles_api,node_forecast_api,node_landfill_api,node_collection_api,node_segregation_api toneRose
class node_risk_engine,node_forecast_engine,node_route_engine,node_segregation_engine,node_operator toneIndigo
```

## Components

### Operations Interface

- [Command center app](https://github.com/tejas07102005/anvation-hackothon/blob/main/src/App.jsx): `src/App.jsx`
- [City waste map](https://github.com/tejas07102005/anvation-hackothon/blob/main/src/components/CityWasteMap.jsx): `src/components/CityWasteMap.jsx`
- [EcoAgent drawer](https://github.com/tejas07102005/anvation-hackothon/blob/main/src/components/EcoAgentDrawer.jsx): `src/components/EcoAgentDrawer.jsx`

### Waste Operations

- [Command center](https://github.com/tejas07102005/anvation-hackothon/blob/main/src/screens/CommandCenterScreen.jsx): `src/screens/CommandCenterScreen.jsx`
- [Waste zones](https://github.com/tejas07102005/anvation-hackothon/blob/main/src/screens/WasteZonesScreen.jsx): `src/screens/WasteZonesScreen.jsx`
- [Historical analytics](https://github.com/tejas07102005/anvation-hackothon/blob/main/src/screens/HistoricalAnalyticsScreen.jsx): `src/screens/HistoricalAnalyticsScreen.jsx`
- [Landfill intelligence](https://github.com/tejas07102005/anvation-hackothon/blob/main/src/screens/LandfillIntelligenceScreen.jsx): `src/screens/LandfillIntelligenceScreen.jsx`
- [Collection reliability](https://github.com/tejas07102005/anvation-hackothon/blob/main/src/screens/CollectionReliabilityScreen.jsx): `src/screens/CollectionReliabilityScreen.jsx`
- [Source segregation](https://github.com/tejas07102005/anvation-hackothon/blob/main/src/screens/SourceSegregationScreen.jsx): `src/screens/SourceSegregationScreen.jsx`
- [Route optimization](https://github.com/tejas07102005/anvation-hackothon/blob/main/src/screens/RouteOptimizationScreen.jsx): `src/screens/RouteOptimizationScreen.jsx`
- [Data and AI](https://github.com/tejas07102005/anvation-hackothon/blob/main/src/screens/DataAndAIScreen.jsx): `src/screens/DataAndAIScreen.jsx`

### Frontend Intelligence

- [Operational mock data](https://github.com/tejas07102005/anvation-hackothon/blob/main/src/data/mockData.js): `src/data/mockData.js`
- [REST API client](https://github.com/tejas07102005/anvation-hackothon/blob/main/src/services/api.js): `src/services/api.js`
- [AI intelligence engine](https://github.com/tejas07102005/anvation-hackothon/blob/main/src/services/aiIntelligenceEngine.js): `src/services/aiIntelligenceEngine.js`
- [Route optimization engine](https://github.com/tejas07102005/anvation-hackothon/blob/main/src/services/routeOptimizationEngine.js): `src/services/routeOptimizationEngine.js`
- [EcoAgent tools](https://github.com/tejas07102005/anvation-hackothon/blob/main/src/services/ecoAgentTools.js): `src/services/ecoAgentTools.js`

### Backend APIs

- [FastAPI application](https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/main.py): `backend/main.py`
- [Agent API](https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/api/agent.py): `backend/api/agent.py`
- [Dashboard API](https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/api/dashboard.py): `backend/api/dashboard.py`
- [Zones API](https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/api/zones.py): `backend/api/zones.py`
- [Vehicles API](https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/api/vehicles.py): `backend/api/vehicles.py`
- [Forecast API](https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/api/forecast.py): `backend/api/forecast.py`
- [Landfill API](https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/api/landfill.py): `backend/api/landfill.py`
- [Collection API](https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/api/collection.py): `backend/api/collection.py`
- [Segregation API](https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/api/segregation.py): `backend/api/segregation.py`

### Backend Engines

- [Risk engine](https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/services/risk_engine.py): `backend/services/risk_engine.py`
- [Forecast engine](https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/services/forecast_engine.py): `backend/services/forecast_engine.py`
- [Route optimizer](https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/services/route_optimizer.py): `backend/services/route_optimizer.py`
- [Segregation analysis](https://github.com/tejas07102005/anvation-hackothon/blob/main/backend/services/segregation.py): `backend/services/segregation.py`

### Other components

- **Municipal operator**
- **FastAPI service**

## Connections

- Municipal operator → Command center app: uses (evidence: `README.md`)
- Command center app → Command center: shows (evidence: `src/App.jsx`)
- Command center app → Waste zones: shows (evidence: `src/App.jsx`)
- Command center app → Historical analytics: shows (evidence: `src/App.jsx`)
- Command center app → Landfill intelligence: shows (evidence: `src/App.jsx`)
- Command center app → Collection reliability: shows (evidence: `src/App.jsx`)
- Command center app → Source segregation: shows (evidence: `src/App.jsx`)
- Command center app → Route optimization: shows (evidence: `src/App.jsx`)
- Command center app → Data and AI: shows (evidence: `src/App.jsx`)
- Command center app → EcoAgent drawer: opens (evidence: `src/App.jsx`)
- Command center → City waste map: renders (evidence: `src/screens/CommandCenterScreen.jsx`)
- Command center app → REST API client: fetches data (evidence: `src/App.jsx`)
- Command center app → AI intelligence engine: simulates sensors (evidence: `src/App.jsx`)
- Data and AI → AI intelligence engine: parses history (evidence: `src/screens/DataAndAIScreen.jsx`)
- Route optimization → Route optimization engine: optimizes routes (evidence: `src/screens/RouteOptimizationScreen.jsx`)
- EcoAgent drawer → EcoAgent tools: runs tools (evidence: `src/components/EcoAgentDrawer.jsx`)
- EcoAgent drawer → REST API client: queries agent (evidence: `src/components/EcoAgentDrawer.jsx`)
- Collection reliability → REST API client: fetches service data (evidence: `src/screens/CollectionReliabilityScreen.jsx`)
- Source segregation → REST API client: fetches service data (evidence: `src/screens/SourceSegregationScreen.jsx`)
- Landfill intelligence → Operational mock data: reads metrics (evidence: `src/screens/LandfillIntelligenceScreen.jsx`)
- Waste zones → Operational mock data: reads zone data (evidence: `src/data/mockData.js`)
- REST API client → FastAPI service: sends REST requests (evidence: `src/services/api.js`)
- FastAPI application → Agent API: registers (evidence: `backend/main.py`)
- FastAPI application → Dashboard API: registers (evidence: `backend/main.py`)
- FastAPI application → Zones API: registers (evidence: `backend/main.py`)
- FastAPI application → Vehicles API: registers (evidence: `backend/main.py`)
- FastAPI application → Forecast API: registers (evidence: `backend/main.py`)
- FastAPI application → Landfill API: registers (evidence: `backend/main.py`)
- FastAPI application → Collection API: registers (evidence: `backend/main.py`)
- FastAPI application → Segregation API: registers (evidence: `backend/main.py`)
- Agent API → Risk engine: uses (evidence: `backend/api/agent.py`)
- Agent API → Forecast engine: uses (evidence: `backend/api/agent.py`)
- Agent API → Route optimizer: uses (evidence: `backend/api/agent.py`)
- Agent API → Segregation analysis: uses (evidence: `backend/api/agent.py`)
- Zones API → Risk engine: uses (evidence: `backend/api/zones.py`)
- Forecast API → Forecast engine: uses (evidence: `backend/api/forecast.py`)
- Forecast API → Risk engine: uses (evidence: `backend/api/forecast.py`)
- Landfill API → Forecast engine: uses (evidence: `backend/api/landfill.py`)
- Vehicles API → Route optimizer: uses (evidence: `backend/api/vehicles.py`)
- Segregation API → Segregation analysis: uses (evidence: `backend/api/segregation.py`)
