# harshitdhonde/evaladapt architecture

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

- Interactive diagram: https://gitdiagram.com/harshitdhonde/evaladapt
- Repository: https://github.com/harshitdhonde/evaladapt

## Overview

EVALADAPT is a dashboard and analysis service for evaluating a cool-roof intervention using synthetic Pune demonstration data or an uploaded CSV. The main workflow is upload, clean and validate observations, compute impact/temporal/equity/spatial results, diagnose zone-level patterns, make a rule-based recommendation, and persist results for dashboard views. The frontend exposes overview, intervention, evaluation, equity, diagnosis, and report pages. Several subsystem connections are supported by the SOURCE INDEX rather than inspected implementation; unsampled detail is omitted where it does not establish a relationship.

Main entry points: [`backend/service.py`](https://github.com/harshitdhonde/evaladapt/blob/main/backend/service.py) (Pipeline service), [`frontend/src/App.jsx`](https://github.com/harshitdhonde/evaladapt/blob/main/frontend/src/App.jsx) (App routing), [`backend/evaluation/pipeline.py`](https://github.com/harshitdhonde/evaladapt/blob/main/backend/evaluation/pipeline.py) (Evaluation orchestrator), [`frontend/src/services/api.js`](https://github.com/harshitdhonde/evaladapt/blob/main/frontend/src/services/api.js) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Dashboard"]
  node_app["App routing<br/>[App.jsx]"]
  node_overview["Overview<br/>[Overview.jsx]"]
  node_interventions["Interventions<br/>[Interventions.jsx]"]
  node_evaluation_page["Evaluation view<br/>[Evaluation.jsx]"]
  node_equity_page["Impact equity<br/>[ImpactEquity.jsx]"]
  node_diagnosis_page["Diagnosis view<br/>[Diagnosis.jsx]"]
  node_reports["Reports<br/>[Reports.jsx]"]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_api["API and workflow"]
  node_routes["API routes<br/>[routes.py]"]
  node_service["Pipeline service<br/>[service.py]"]
end

subgraph group_analysis["Evaluation and decisions"]
  node_preprocess["Data cleaning<br/>[preprocessing.py]"]
  node_evaluation["Evaluation orchestrator<br/>[pipeline.py]"]
  node_impact["Impact analysis<br/>[impact.py]"]
  node_temporal["Temporal analysis<br/>[temporal.py]"]
  node_equity["Equity analysis<br/>[equity.py]"]
  node_spatial["Spatial analysis<br/>[spatial.py]"]
  node_diagnosis["Zone diagnosis<br/>[diagnosis.py]"]
  node_anomaly["Anomaly detection<br/>[anomaly.py]"]
  node_drivers["Driver analysis<br/>[drivers.py]"]
  node_decision["Decision engine<br/>[engine.py]"]
end

subgraph group_storage["Data and persistence"]
  node_generator["Synthetic data<br/>[generate_data.py]"]
  node_database[("SQLite persistence<br/>[db.py]")]
  node_schema["Database schema<br/>[models.py]"]
  node_config["Runtime configuration<br/>[config.py]"]
end

node_user(("Analyst"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_overview
node_app -->|"routes to"| node_interventions
node_app -->|"routes to"| node_evaluation_page
node_app -->|"routes to"| node_equity_page
node_app -->|"routes to"| node_diagnosis_page
node_app -->|"routes to"| node_reports
node_overview -->|"requests data"| node_api_client
node_interventions -->|"requests data"| node_api_client
node_evaluation_page -->|"requests data"| node_api_client
node_equity_page -->|"requests data"| node_api_client
node_diagnosis_page -->|"requests data"| node_api_client
node_reports -->|"requests data"| node_api_client
node_api_client -->|"calls endpoints"| node_routes
node_routes -->|"starts pipeline"| node_service
node_service -->|"cleans data"| node_preprocess
node_service -->|"runs evaluation"| node_evaluation
node_service -->|"runs diagnosis"| node_diagnosis
node_service -->|"makes decision"| node_decision
node_service -->|"saves results"| node_database
node_evaluation -->|"runs analysis"| node_impact
node_evaluation -->|"runs analysis"| node_temporal
node_evaluation -->|"runs analysis"| node_equity
node_evaluation -->|"runs analysis"| node_spatial
node_diagnosis -->|"detects anomalies"| node_anomaly
node_diagnosis -->|"finds drivers"| node_drivers
node_decision -->|"uses results"| node_evaluation
node_decision -->|"uses findings"| node_diagnosis
node_database -->|"initializes schema"| node_schema
node_routes -->|"loads results"| node_database
node_service -->|"generates fallback"| node_generator
node_service -->|"reads settings"| node_config
node_evaluation -->|"reads settings"| node_config
node_database -->|"reads settings"| node_config

click node_app "https://github.com/harshitdhonde/evaladapt/blob/main/frontend/src/App.jsx"
click node_overview "https://github.com/harshitdhonde/evaladapt/blob/main/frontend/src/pages/Overview.jsx"
click node_interventions "https://github.com/harshitdhonde/evaladapt/blob/main/frontend/src/pages/Interventions.jsx"
click node_evaluation_page "https://github.com/harshitdhonde/evaladapt/blob/main/frontend/src/pages/Evaluation.jsx"
click node_equity_page "https://github.com/harshitdhonde/evaladapt/blob/main/frontend/src/pages/ImpactEquity.jsx"
click node_diagnosis_page "https://github.com/harshitdhonde/evaladapt/blob/main/frontend/src/pages/Diagnosis.jsx"
click node_reports "https://github.com/harshitdhonde/evaladapt/blob/main/frontend/src/pages/Reports.jsx"
click node_api_client "https://github.com/harshitdhonde/evaladapt/blob/main/frontend/src/services/api.js"
click node_routes "https://github.com/harshitdhonde/evaladapt/blob/main/backend/api/routes.py"
click node_service "https://github.com/harshitdhonde/evaladapt/blob/main/backend/service.py"
click node_preprocess "https://github.com/harshitdhonde/evaladapt/blob/main/backend/evaluation/preprocessing.py"
click node_evaluation "https://github.com/harshitdhonde/evaladapt/blob/main/backend/evaluation/pipeline.py"
click node_impact "https://github.com/harshitdhonde/evaladapt/blob/main/backend/evaluation/impact.py"
click node_temporal "https://github.com/harshitdhonde/evaladapt/blob/main/backend/evaluation/temporal.py"
click node_equity "https://github.com/harshitdhonde/evaladapt/blob/main/backend/evaluation/equity.py"
click node_spatial "https://github.com/harshitdhonde/evaladapt/blob/main/backend/evaluation/spatial.py"
click node_diagnosis "https://github.com/harshitdhonde/evaladapt/blob/main/backend/ai/diagnosis.py"
click node_anomaly "https://github.com/harshitdhonde/evaladapt/blob/main/backend/ai/anomaly.py"
click node_drivers "https://github.com/harshitdhonde/evaladapt/blob/main/backend/ai/drivers.py"
click node_decision "https://github.com/harshitdhonde/evaladapt/blob/main/backend/decision/engine.py"
click node_generator "https://github.com/harshitdhonde/evaladapt/blob/main/backend/generate_data.py"
click node_database "https://github.com/harshitdhonde/evaladapt/blob/main/backend/database/db.py"
click node_schema "https://github.com/harshitdhonde/evaladapt/blob/main/backend/database/models.py"
click node_config "https://github.com/harshitdhonde/evaladapt/blob/main/backend/config.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_overview,node_interventions,node_evaluation_page,node_equity_page,node_diagnosis_page,node_reports,node_api_client toneBlue
class node_routes,node_service toneAmber
class node_preprocess,node_evaluation,node_impact,node_temporal,node_equity,node_spatial,node_diagnosis,node_anomaly,node_drivers,node_decision toneMint
class node_generator,node_database,node_schema,node_config toneRose
class node_user toneIndigo
```

## Components

### Dashboard

- [App routing](https://github.com/harshitdhonde/evaladapt/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Overview](https://github.com/harshitdhonde/evaladapt/blob/main/frontend/src/pages/Overview.jsx): `frontend/src/pages/Overview.jsx`
- [Interventions](https://github.com/harshitdhonde/evaladapt/blob/main/frontend/src/pages/Interventions.jsx): `frontend/src/pages/Interventions.jsx`
- [Evaluation view](https://github.com/harshitdhonde/evaladapt/blob/main/frontend/src/pages/Evaluation.jsx): `frontend/src/pages/Evaluation.jsx`
- [Impact equity](https://github.com/harshitdhonde/evaladapt/blob/main/frontend/src/pages/ImpactEquity.jsx): `frontend/src/pages/ImpactEquity.jsx`
- [Diagnosis view](https://github.com/harshitdhonde/evaladapt/blob/main/frontend/src/pages/Diagnosis.jsx): `frontend/src/pages/Diagnosis.jsx`
- [Reports](https://github.com/harshitdhonde/evaladapt/blob/main/frontend/src/pages/Reports.jsx): `frontend/src/pages/Reports.jsx`
- [API client](https://github.com/harshitdhonde/evaladapt/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### API and workflow

- [API routes](https://github.com/harshitdhonde/evaladapt/blob/main/backend/api/routes.py): `backend/api/routes.py`
- [Pipeline service](https://github.com/harshitdhonde/evaladapt/blob/main/backend/service.py): `backend/service.py`

### Evaluation and decisions

- [Data cleaning](https://github.com/harshitdhonde/evaladapt/blob/main/backend/evaluation/preprocessing.py): `backend/evaluation/preprocessing.py`
- [Evaluation orchestrator](https://github.com/harshitdhonde/evaladapt/blob/main/backend/evaluation/pipeline.py): `backend/evaluation/pipeline.py`
- [Impact analysis](https://github.com/harshitdhonde/evaladapt/blob/main/backend/evaluation/impact.py): `backend/evaluation/impact.py`
- [Temporal analysis](https://github.com/harshitdhonde/evaladapt/blob/main/backend/evaluation/temporal.py): `backend/evaluation/temporal.py`
- [Equity analysis](https://github.com/harshitdhonde/evaladapt/blob/main/backend/evaluation/equity.py): `backend/evaluation/equity.py`
- [Spatial analysis](https://github.com/harshitdhonde/evaladapt/blob/main/backend/evaluation/spatial.py): `backend/evaluation/spatial.py`
- [Zone diagnosis](https://github.com/harshitdhonde/evaladapt/blob/main/backend/ai/diagnosis.py): `backend/ai/diagnosis.py`
- [Anomaly detection](https://github.com/harshitdhonde/evaladapt/blob/main/backend/ai/anomaly.py): `backend/ai/anomaly.py`
- [Driver analysis](https://github.com/harshitdhonde/evaladapt/blob/main/backend/ai/drivers.py): `backend/ai/drivers.py`
- [Decision engine](https://github.com/harshitdhonde/evaladapt/blob/main/backend/decision/engine.py): `backend/decision/engine.py`

### Data and persistence

- [Synthetic data](https://github.com/harshitdhonde/evaladapt/blob/main/backend/generate_data.py): `backend/generate_data.py`
- [SQLite persistence](https://github.com/harshitdhonde/evaladapt/blob/main/backend/database/db.py): `backend/database/db.py`
- [Database schema](https://github.com/harshitdhonde/evaladapt/blob/main/backend/database/models.py): `backend/database/models.py`
- [Runtime configuration](https://github.com/harshitdhonde/evaladapt/blob/main/backend/config.py): `backend/config.py`

### Other components

- **Analyst**

## Connections

- Analyst → App routing: uses
- App routing → Overview: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Interventions: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Evaluation view: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Impact equity: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Diagnosis view: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Reports: routes to (evidence: `frontend/src/App.jsx`)
- Overview → API client: requests data (evidence: `frontend/src/pages/Overview.jsx`)
- Interventions → API client: requests data (evidence: `frontend/src/pages/Interventions.jsx`)
- Evaluation view → API client: requests data (evidence: `frontend/src/pages/Evaluation.jsx`)
- Impact equity → API client: requests data (evidence: `frontend/src/pages/ImpactEquity.jsx`)
- Diagnosis view → API client: requests data (evidence: `frontend/src/pages/Diagnosis.jsx`)
- Reports → API client: requests data (evidence: `frontend/src/pages/Reports.jsx`)
- API client → API routes: calls endpoints (evidence: `frontend/src/services/api.js`)
- API routes → Pipeline service: starts pipeline (evidence: `backend/api/routes.py`)
- Pipeline service → Data cleaning: cleans data (evidence: `backend/service.py`)
- Pipeline service → Evaluation orchestrator: runs evaluation (evidence: `backend/service.py`)
- Pipeline service → Zone diagnosis: runs diagnosis (evidence: `backend/service.py`)
- Pipeline service → Decision engine: makes decision (evidence: `backend/service.py`)
- Pipeline service → SQLite persistence: saves results (evidence: `backend/service.py`)
- Evaluation orchestrator → Impact analysis: runs analysis (evidence: `backend/evaluation/pipeline.py`)
- Evaluation orchestrator → Temporal analysis: runs analysis (evidence: `backend/evaluation/pipeline.py`)
- Evaluation orchestrator → Equity analysis: runs analysis (evidence: `backend/evaluation/pipeline.py`)
- Evaluation orchestrator → Spatial analysis: runs analysis (evidence: `backend/evaluation/pipeline.py`)
- Zone diagnosis → Anomaly detection: detects anomalies (evidence: `backend/ai/diagnosis.py`)
- Zone diagnosis → Driver analysis: finds drivers (evidence: `backend/ai/diagnosis.py`)
- Decision engine → Evaluation orchestrator: uses results (evidence: `backend/decision/engine.py`)
- Decision engine → Zone diagnosis: uses findings (evidence: `backend/decision/engine.py`)
- SQLite persistence → Database schema: initializes schema (evidence: `backend/database/db.py`)
- API routes → SQLite persistence: loads results (evidence: `backend/api/routes.py`)
- Pipeline service → Synthetic data: generates fallback (evidence: `backend/service.py`)
- Pipeline service → Runtime configuration: reads settings (evidence: `backend/service.py`)
- Evaluation orchestrator → Runtime configuration: reads settings (evidence: `backend/evaluation/pipeline.py`)
- SQLite persistence → Runtime configuration: reads settings (evidence: `backend/database/db.py`)
