# dheerparekh86-droid/sih2026 architecture

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

- Interactive diagram: https://gitdiagram.com/dheerparekh86-droid/sih2026
- Repository: https://github.com/dheerparekh86-droid/sih2026

## Overview

This is a Flask hackathon prototype for monitoring NER transport disruptions and coordinating routes, vehicles, incidents, and alerts. The main workflow is a user viewing the dashboard, requesting a risk-aware route, or submitting an incident; the server responds from synthetic in-memory data. Tracking, alert generation, and English/Hindi interface strings are also implemented. The README describes broader goals such as GIS, prediction, photo uploads, and offline sync, but the sampled runtime does not establish those capabilities; template behavior beyond its filenames is not inferred.

Main entry points: [`SIH2026/ner-logistics/app.py`](https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/app.py) (Flask routes), [`SIH2026/ner-logistics/templates/base.html`](https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/templates/base.html) (Shared page shell), [`SIH2026/ner-logistics/mock_data.py`](https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/mock_data.py) (Road network), [`SIH2026/ner-logistics/templates/dashboard.html`](https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/templates/dashboard.html) (Dashboard page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_server["Flask routes<br/>[app.py]"]
  node_dashboard["Dashboard page<br/>[dashboard.html]"]
  node_planner["Route planner page<br/>[route_planner.html]"]
  node_incident_page["Incident page<br/>[incidents.html]"]
  node_tracking_page["Tracking page<br/>[tracking.html]"]
  node_base_template["Shared page shell<br/>[base.html]"]
  node_browser_js["Language switcher<br/>[app.js]"]
end

subgraph group_operations["Logistics operations"]
  node_routing["Risk-aware routing<br/>[app.py]"]
  node_baseline["Shortest-path baseline<br/>[app.py]"]
  node_alert_engine["Alert generation<br/>[app.py]"]
  node_vehicle_tracking["Vehicle tracking API<br/>[app.py]"]
  node_incident_intake["Incident intake<br/>[app.py]"]
end

subgraph group_state["Mock domain state"]
  node_road_data["Road network<br/>[mock_data.py]"]
  node_district_data["District records<br/>[mock_data.py]"]
  node_vehicle_data["Simulated vehicles<br/>[mock_data.py]"]
  node_incident_data["Incident records<br/>[mock_data.py]"]
end

subgraph group_language["Localization"]
  node_strings["Language strings<br/>[mock_data.py]"]
end

node_operator(("Platform user"))

node_operator -->|"requests pages"| node_server
node_server -->|"renders"| node_dashboard
node_server -->|"renders"| node_planner
node_server -->|"renders"| node_incident_page
node_server -->|"renders"| node_tracking_page
node_dashboard -->|"extends"| node_base_template
node_planner -->|"extends"| node_base_template
node_incident_page -->|"extends"| node_base_template
node_tracking_page -->|"extends"| node_base_template
node_server -->|"reads"| node_strings
node_server -->|"reads"| node_district_data
node_server -->|"calls"| node_alert_engine
node_alert_engine -->|"reads"| node_road_data
node_alert_engine -->|"reads"| node_vehicle_data
node_alert_engine -->|"reads"| node_incident_data
node_server -->|"calls"| node_routing
node_server -->|"calls"| node_baseline
node_routing -->|"reads"| node_road_data
node_baseline -->|"reads"| node_road_data
node_server -->|"dispatches"| node_incident_intake
node_incident_intake -->|"reads coordinates"| node_district_data
node_incident_intake -->|"adds report"| node_incident_data
node_server -->|"dispatches"| node_vehicle_tracking
node_vehicle_tracking -->|"updates positions"| node_vehicle_data
node_vehicle_tracking -->|"reads coordinates"| node_district_data
node_vehicle_tracking -->|"calls"| node_alert_engine
node_browser_js -->|"sets language"| node_server
node_operator -->|"selects language"| node_browser_js

click node_server "https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/app.py"
click node_dashboard "https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/templates/dashboard.html"
click node_planner "https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/templates/route_planner.html"
click node_incident_page "https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/templates/incidents.html"
click node_tracking_page "https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/templates/tracking.html"
click node_base_template "https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/templates/base.html"
click node_browser_js "https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/static/js/app.js"
click node_routing "https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/app.py"
click node_baseline "https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/app.py"
click node_alert_engine "https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/app.py"
click node_vehicle_tracking "https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/app.py"
click node_incident_intake "https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/app.py"
click node_road_data "https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/mock_data.py"
click node_district_data "https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/mock_data.py"
click node_vehicle_data "https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/mock_data.py"
click node_incident_data "https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/mock_data.py"
click node_strings "https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/mock_data.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_server,node_dashboard,node_planner,node_incident_page,node_tracking_page,node_base_template,node_browser_js,node_operator toneBlue
class node_routing,node_baseline,node_alert_engine,node_vehicle_tracking,node_incident_intake toneAmber
class node_road_data,node_district_data,node_vehicle_data,node_incident_data toneMint
class node_strings toneRose
```

## Components

### Web interface

- [Flask routes](https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/app.py): `SIH2026/ner-logistics/app.py`
- [Dashboard page](https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/templates/dashboard.html): `SIH2026/ner-logistics/templates/dashboard.html`
- [Route planner page](https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/templates/route_planner.html): `SIH2026/ner-logistics/templates/route_planner.html`
- [Incident page](https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/templates/incidents.html): `SIH2026/ner-logistics/templates/incidents.html`
- [Tracking page](https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/templates/tracking.html): `SIH2026/ner-logistics/templates/tracking.html`
- [Shared page shell](https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/templates/base.html): `SIH2026/ner-logistics/templates/base.html`
- [Language switcher](https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/static/js/app.js): `SIH2026/ner-logistics/static/js/app.js`

### Logistics operations

- [Risk-aware routing](https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/app.py): `SIH2026/ner-logistics/app.py`
- [Shortest-path baseline](https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/app.py): `SIH2026/ner-logistics/app.py`
- [Alert generation](https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/app.py): `SIH2026/ner-logistics/app.py`
- [Vehicle tracking API](https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/app.py): `SIH2026/ner-logistics/app.py`
- [Incident intake](https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/app.py): `SIH2026/ner-logistics/app.py`

### Mock domain state

- [Road network](https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/mock_data.py): `SIH2026/ner-logistics/mock_data.py`
- [District records](https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/mock_data.py): `SIH2026/ner-logistics/mock_data.py`
- [Simulated vehicles](https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/mock_data.py): `SIH2026/ner-logistics/mock_data.py`
- [Incident records](https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/mock_data.py): `SIH2026/ner-logistics/mock_data.py`

### Localization

- [Language strings](https://github.com/dheerparekh86-droid/sih2026/blob/main/SIH2026/ner-logistics/mock_data.py): `SIH2026/ner-logistics/mock_data.py`

### Other components

- **Platform user**

## Connections

- Platform user → Flask routes: requests pages
- Flask routes → Dashboard page: renders
- Flask routes → Route planner page: renders
- Flask routes → Incident page: renders
- Flask routes → Tracking page: renders
- Dashboard page → Shared page shell: extends
- Route planner page → Shared page shell: extends
- Incident page → Shared page shell: extends
- Tracking page → Shared page shell: extends
- Flask routes → Language strings: reads
- Flask routes → District records: reads
- Flask routes → Alert generation: calls
- Alert generation → Road network: reads
- Alert generation → Simulated vehicles: reads
- Alert generation → Incident records: reads
- Flask routes → Risk-aware routing: calls
- Flask routes → Shortest-path baseline: calls
- Risk-aware routing → Road network: reads
- Shortest-path baseline → Road network: reads
- Flask routes → Incident intake: dispatches
- Incident intake → District records: reads coordinates
- Incident intake → Incident records: adds report
- Flask routes → Vehicle tracking API: dispatches
- Vehicle tracking API → Simulated vehicles: updates positions
- Vehicle tracking API → District records: reads coordinates
- Vehicle tracking API → Alert generation: calls
- Language switcher → Flask routes: sets language
- Platform user → Language switcher: selects language
