# sakshamgupta2008/team-ares architecture

> Architecture diagram of the GitHub repository sakshamgupta2008/team-ares, 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/sakshamgupta2008/team-ares
- Repository: https://github.com/sakshamgupta2008/team-ares

## Overview

PreventiQ is a preventive-health decision-support dashboard: decision-makers explore district/state screening gaps and risk, compare locations, inspect disease trends, and try resource-deployment scenarios. The backend calculates risk and serves geographic and disease data; the Python service loads health data, trains and caches predictions, and exposes ML summaries. The dashboard also offers an Anthropic-powered district chat. README capabilities such as expected-care modeling and multi-month trend filtering are documented, but their implementations are not established by the sampled source. UI-to-backend wiring beyond the documented application workflow is not shown in the excerpts.

Main entry points: [`Backend/server.js`](https://github.com/sakshamgupta2008/team-ares/blob/main/Backend/server.js) (HTTP API), [`frontend/src/Dashboard.jsx`](https://github.com/sakshamgupta2008/team-ares/blob/main/frontend/src/Dashboard.jsx) (Dashboard shell), [`frontend/src/services/aiService.js`](https://github.com/sakshamgupta2008/team-ares/blob/main/frontend/src/services/aiService.js) (Chat reasoning), [`frontend/src/components/AIChatPanel.jsx`](https://github.com/sakshamgupta2008/team-ares/blob/main/frontend/src/components/AIChatPanel.jsx) (AI chat panel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Decision Dashboard"]
  node_dashboard_app["Dashboard shell<br/>[Dashboard.jsx]"]
  node_comparison["District comparison<br/>[CityComparison.jsx]"]
  node_chat_ui["AI chat panel<br/>[AIChatPanel.jsx]"]
  node_chat_service["Chat reasoning<br/>[aiService.js]"]
end

subgraph group_api["Risk Data API"]
  node_backend["HTTP API<br/>[server.js]"]
  node_risk["Risk scoring<br/>[risk.js]"]
  node_coverage_data["District coverage data<br/>[data.js]"]
  node_disease_data["Disease histories"]
  node_state_data["India state data<br/>[indiaStateData.js]"]
end

subgraph group_analytics["Predictive Analytics"]
  node_ml_service["ML service<br/>[ml_service.py]"]
  node_health_dataset["Health dataset"]
end

subgraph group_planning["Intervention Planning"]
  node_simulator_ui["Deployment simulator"]
  node_scenario_data["Scenario simulation<br/>[simulationData.js]"]
end

node_officials(("Health decision-makers"))
node_anthropic["Anthropic API"]

node_officials -->|"use dashboard"| node_dashboard_app
node_dashboard_app -->|"open comparison"| node_comparison
node_dashboard_app -->|"open simulator"| node_simulator_ui
node_dashboard_app -->|"open chat"| node_chat_ui
node_backend -->|"reads coverage"| node_coverage_data
node_backend -->|"reads histories"| node_disease_data
node_backend -->|"reads state data"| node_state_data
node_backend -->|"calculates risk"| node_risk
node_backend -.->|"requests ML data"| node_ml_service
node_health_dataset -->|"loads dataset"| node_ml_service
node_simulator_ui -->|"runs scenario"| node_scenario_data
node_chat_ui -->|"requests reasoning"| node_chat_service
node_chat_service -.->|"sends chat context"| node_anthropic
node_anthropic -.->|"returns response"| node_chat_service

click node_dashboard_app "https://github.com/sakshamgupta2008/team-ares/blob/main/frontend/src/Dashboard.jsx"
click node_comparison "https://github.com/sakshamgupta2008/team-ares/blob/main/frontend/src/components/CityComparison.jsx"
click node_simulator_ui "https://github.com/sakshamgupta2008/team-ares/blob/main/frontend/src/components/InterventionSimulator.jsx"
click node_chat_ui "https://github.com/sakshamgupta2008/team-ares/blob/main/frontend/src/components/AIChatPanel.jsx"
click node_backend "https://github.com/sakshamgupta2008/team-ares/blob/main/Backend/server.js"
click node_risk "https://github.com/sakshamgupta2008/team-ares/blob/main/Backend/risk.js"
click node_coverage_data "https://github.com/sakshamgupta2008/team-ares/blob/main/Backend/data.js"
click node_disease_data "https://github.com/sakshamgupta2008/team-ares/blob/main/Backend/districtDiseaseData.js"
click node_state_data "https://github.com/sakshamgupta2008/team-ares/blob/main/Backend/indiaStateData.js"
click node_ml_service "https://github.com/sakshamgupta2008/team-ares/blob/main/ML/ml_service.py"
click node_health_dataset "https://github.com/sakshamgupta2008/team-ares/blob/main/final_health_data.xlsx"
click node_chat_service "https://github.com/sakshamgupta2008/team-ares/blob/main/frontend/src/services/aiService.js"
click node_scenario_data "https://github.com/sakshamgupta2008/team-ares/blob/main/frontend/src/utils/simulationData.js"

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_dashboard_app,node_comparison,node_chat_ui,node_chat_service toneBlue
class node_backend,node_risk,node_coverage_data,node_disease_data,node_state_data toneAmber
class node_ml_service,node_health_dataset,node_anthropic toneMint
class node_simulator_ui,node_scenario_data toneRose
class node_officials toneIndigo
```

## Components

### Decision Dashboard

- [Dashboard shell](https://github.com/sakshamgupta2008/team-ares/blob/main/frontend/src/Dashboard.jsx): `frontend/src/Dashboard.jsx`
- [District comparison](https://github.com/sakshamgupta2008/team-ares/blob/main/frontend/src/components/CityComparison.jsx): `frontend/src/components/CityComparison.jsx`
- [AI chat panel](https://github.com/sakshamgupta2008/team-ares/blob/main/frontend/src/components/AIChatPanel.jsx): `frontend/src/components/AIChatPanel.jsx`
- [Chat reasoning](https://github.com/sakshamgupta2008/team-ares/blob/main/frontend/src/services/aiService.js): `frontend/src/services/aiService.js`

### Risk Data API

- [HTTP API](https://github.com/sakshamgupta2008/team-ares/blob/main/Backend/server.js): `Backend/server.js`
- [Risk scoring](https://github.com/sakshamgupta2008/team-ares/blob/main/Backend/risk.js): `Backend/risk.js`
- [District coverage data](https://github.com/sakshamgupta2008/team-ares/blob/main/Backend/data.js): `Backend/data.js`
- [Disease histories](https://github.com/sakshamgupta2008/team-ares/blob/main/Backend/districtDiseaseData.js): `Backend/districtDiseaseData.js`
- [India state data](https://github.com/sakshamgupta2008/team-ares/blob/main/Backend/indiaStateData.js): `Backend/indiaStateData.js`

### Predictive Analytics

- [ML service](https://github.com/sakshamgupta2008/team-ares/blob/main/ML/ml_service.py): `ML/ml_service.py`
- [Health dataset](https://github.com/sakshamgupta2008/team-ares/blob/main/final_health_data.xlsx): `final_health_data.xlsx`

### Intervention Planning

- [Deployment simulator](https://github.com/sakshamgupta2008/team-ares/blob/main/frontend/src/components/InterventionSimulator.jsx): `frontend/src/components/InterventionSimulator.jsx`
- [Scenario simulation](https://github.com/sakshamgupta2008/team-ares/blob/main/frontend/src/utils/simulationData.js): `frontend/src/utils/simulationData.js`

### Other components

- **Health decision-makers**
- **Anthropic API**

## Connections

- Health decision-makers → Dashboard shell: use dashboard
- Dashboard shell → District comparison: open comparison
- Dashboard shell → Deployment simulator: open simulator
- Dashboard shell → AI chat panel: open chat
- HTTP API → District coverage data: reads coverage
- HTTP API → Disease histories: reads histories
- HTTP API → India state data: reads state data
- HTTP API → Risk scoring: calculates risk
- HTTP API → ML service: requests ML data
- Health dataset → ML service: loads dataset
- Deployment simulator → Scenario simulation: runs scenario
- AI chat panel → Chat reasoning: requests reasoning
- Chat reasoning → Anthropic API: sends chat context
- Anthropic API → Chat reasoning: returns response
