# roaimkhan/qiskit_hackathon architecture

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

- Interactive diagram: https://gitdiagram.com/roaimkhan/qiskit_hackathon
- Repository: https://github.com/roaimkhan/qiskit_hackathon

## Overview

This is a simulated feeder load-shedding dashboard backed by a FastAPI dispatch service. The user views transformer topology, sets a shedding target, chooses a solver, and receives transformer states and optimization metrics; the dashboard also exposes an emergency simulated feeder trip. The backend offers QAOA, classical MILP, and exact branch-and-bound dispatch. The README describes broader interactive and diagnostic ambitions, but sampled UI excerpts do not establish all of those features as implemented. Some UI-to-API wiring is therefore shown as unverified.

Main entry points: [`endpoints.py`](https://github.com/roaimkhan/qiskit_hackathon/blob/main/endpoints.py) (HTTP dispatch API), [`QUANTAGRID/src/App.jsx`](https://github.com/roaimkhan/qiskit_hackathon/blob/main/QUANTAGRID/src/App.jsx) (Dispatch dashboard), [`QUANTAGRID/src/main.jsx`](https://github.com/roaimkhan/qiskit_hackathon/blob/main/QUANTAGRID/src/main.jsx) (React entry), [`quantum_solver.py`](https://github.com/roaimkhan/qiskit_hackathon/blob/main/quantum_solver.py) (QAOA dispatch)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Dispatch dashboard"]
  node_dashboard["Dispatch dashboard<br/>[App.jsx]"]
  node_react_entry["React entry<br/>[main.jsx]"]
end

subgraph group_service["Dispatch API"]
  node_api["HTTP dispatch API<br/>[endpoints.py]"]
end

subgraph group_solvers["Optimization engines"]
  node_qaoa["QAOA dispatch<br/>[quantum_solver.py]"]
  node_milp["MILP dispatch"]
  node_exact["Exact dispatch<br/>[exact_algorithm.py]"]
end

subgraph group_feeder["Feeder model"]
  node_topology["Feeder topology<br/>[main.py]"]
end

node_operator(("Grid operator"))

node_operator -->|"uses"| node_dashboard
node_react_entry -->|"renders"| node_dashboard
node_dashboard -.->|"requests dispatch"| node_api
node_api -->|"invokes"| node_qaoa
node_api -->|"invokes"| node_milp
node_api -->|"invokes"| node_exact
node_api -->|"loads topology"| node_topology
node_api -.->|"returns states"| node_dashboard

click node_dashboard "https://github.com/roaimkhan/qiskit_hackathon/blob/main/QUANTAGRID/src/App.jsx"
click node_react_entry "https://github.com/roaimkhan/qiskit_hackathon/blob/main/QUANTAGRID/src/main.jsx"
click node_api "https://github.com/roaimkhan/qiskit_hackathon/blob/main/endpoints.py"
click node_qaoa "https://github.com/roaimkhan/qiskit_hackathon/blob/main/quantum_solver.py"
click node_milp "https://github.com/roaimkhan/qiskit_hackathon/blob/main/classical_solver.py"
click node_exact "https://github.com/roaimkhan/qiskit_hackathon/blob/main/exact_algorithm.py"
click node_topology "https://github.com/roaimkhan/qiskit_hackathon/blob/main/main.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_dashboard,node_react_entry toneBlue
class node_api toneAmber
class node_qaoa,node_milp,node_exact toneMint
class node_topology toneRose
class node_operator toneIndigo
```

## Components

### Dispatch dashboard

- [Dispatch dashboard](https://github.com/roaimkhan/qiskit_hackathon/blob/main/QUANTAGRID/src/App.jsx): `QUANTAGRID/src/App.jsx`
- [React entry](https://github.com/roaimkhan/qiskit_hackathon/blob/main/QUANTAGRID/src/main.jsx): `QUANTAGRID/src/main.jsx`

### Dispatch API

- [HTTP dispatch API](https://github.com/roaimkhan/qiskit_hackathon/blob/main/endpoints.py): `endpoints.py`

### Optimization engines

- [QAOA dispatch](https://github.com/roaimkhan/qiskit_hackathon/blob/main/quantum_solver.py): `quantum_solver.py`
- [MILP dispatch](https://github.com/roaimkhan/qiskit_hackathon/blob/main/classical_solver.py): `classical_solver.py`
- [Exact dispatch](https://github.com/roaimkhan/qiskit_hackathon/blob/main/exact_algorithm.py): `exact_algorithm.py`

### Feeder model

- [Feeder topology](https://github.com/roaimkhan/qiskit_hackathon/blob/main/main.py): `main.py`

### Other components

- **Grid operator**

## Connections

- Grid operator → Dispatch dashboard: uses (evidence: `QUANTAGRID/src/App.jsx`)
- React entry → Dispatch dashboard: renders (evidence: `QUANTAGRID/src/main.jsx`)
- Dispatch dashboard → HTTP dispatch API: requests dispatch
- HTTP dispatch API → QAOA dispatch: invokes (evidence: `endpoints.py`)
- HTTP dispatch API → MILP dispatch: invokes (evidence: `endpoints.py`)
- HTTP dispatch API → Exact dispatch: invokes (evidence: `endpoints.py`)
- HTTP dispatch API → Feeder topology: loads topology (evidence: `endpoints.py`)
- HTTP dispatch API → Dispatch dashboard: returns states
