# rohit-jr/arbiter architecture

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

- Interactive diagram: https://gitdiagram.com/rohit-jr/arbiter
- Repository: https://github.com/rohit-jr/arbiter

## Overview

ARBITER simulates quantum digital-signature sessions and attributes forgery, impersonation, replay, or channel manipulation. The main workflow runs from dashboard scenario selection through the API, session simulation, layered verification, and a signed audit record. The API also exposes comparison, security-bound, and PKI-risk capabilities. The graph reflects documented behavior and sampled integration points; unsampled API wiring is represented only where the README or source excerpts support it.

Main entry points: [`src/arbiter/api/app.py`](https://github.com/rohit-jr/arbiter/blob/main/src/arbiter/api/app.py) (FastAPI service), [`frontend/src/App.tsx`](https://github.com/rohit-jr/arbiter/blob/main/frontend/src/App.tsx) (Dashboard app), [`src/arbiter/qds_simulation/protocol.py`](https://github.com/rohit-jr/arbiter/blob/main/src/arbiter/qds_simulation/protocol.py) (QDS session simulator), [`src/arbiter/pipeline.py`](https://github.com/rohit-jr/arbiter/blob/main/src/arbiter/pipeline.py) (Verification orchestrator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Dashboard"]
  node_app_ui["Dashboard app<br/>[App.tsx]"]
  node_session_form["Session form<br/>[SessionForm.tsx]"]
  node_api_client["API client<br/>[api.ts]"]
  node_result_panels["Result panels<br/>[VerdictPanel.tsx]"]
  node_ledger_panel["Ledger panel<br/>[LedgerPanel.tsx]"]
  node_analysis_panels["Analysis panels<br/>[AccuracyPanel.tsx]"]
end

subgraph group_service["API and workflow"]
  node_api["FastAPI service<br/>[app.py]"]
  node_job_runner["Background jobs<br/>[jobs.py]"]
end

subgraph group_analysis["Simulation and analysis"]
  node_session_sim["QDS session simulator<br/>[protocol.py]"]
  node_quantum_model["Quantum model"]
  node_circuit_backend["Aer circuit backend<br/>[circuits.py]"]
  node_noise_model["Trapped-ion noise<br/>[trapped_ion.py]"]
  node_verifier["Verification orchestrator<br/>[pipeline.py]"]
  node_detection["Detection tests"]
  node_security_bounds["QDS security bounds<br/>[security.py]"]
  node_pki_scoring["PKI risk scoring"]
end

subgraph group_state["Audit and persistence"]
  node_ledger[("Signed audit ledger<br/>[ledger.py]")]
  node_key_store["Encrypted key store<br/>[storage.py]"]
  node_api_store[("API state store<br/>[storage.py]")]
end

node_operator(("Operator"))

node_operator -->|"selects scenario"| node_session_form
node_session_form -->|"submits request"| node_app_ui
node_app_ui -->|"calls API"| node_api_client
node_app_ui -->|"renders verdict"| node_result_panels
node_app_ui -->|"shows ledger"| node_ledger_panel
node_app_ui -->|"shows analysis"| node_analysis_panels
node_api_client -->|"HTTP requests"| node_api
node_api -->|"simulates session"| node_session_sim
node_session_sim -->|"samples probabilities"| node_quantum_model
node_session_sim -.->|"runs circuits"| node_circuit_backend
node_api -->|"verifies transcript"| node_verifier
node_verifier -->|"runs layered tests"| node_detection
node_api -.->|"loads preset"| node_noise_model
node_api -->|"serves bounds"| node_security_bounds
node_api -.->|"serves risk scoring"| node_pki_scoring
node_api -->|"dispatches jobs"| node_job_runner
node_api -->|"persists API state"| node_api_store
node_verifier -->|"appends verdict"| node_ledger
node_ledger -.->|"uses encrypted keys"| node_key_store

click node_app_ui "https://github.com/rohit-jr/arbiter/blob/main/frontend/src/App.tsx"
click node_session_form "https://github.com/rohit-jr/arbiter/blob/main/frontend/src/components/SessionForm.tsx"
click node_api_client "https://github.com/rohit-jr/arbiter/blob/main/frontend/src/api.ts"
click node_result_panels "https://github.com/rohit-jr/arbiter/blob/main/frontend/src/components/VerdictPanel.tsx"
click node_ledger_panel "https://github.com/rohit-jr/arbiter/blob/main/frontend/src/components/LedgerPanel.tsx"
click node_analysis_panels "https://github.com/rohit-jr/arbiter/blob/main/frontend/src/components/AccuracyPanel.tsx"
click node_api "https://github.com/rohit-jr/arbiter/blob/main/src/arbiter/api/app.py"
click node_job_runner "https://github.com/rohit-jr/arbiter/blob/main/src/arbiter/api/jobs.py"
click node_session_sim "https://github.com/rohit-jr/arbiter/blob/main/src/arbiter/qds_simulation/protocol.py"
click node_quantum_model "https://github.com/rohit-jr/arbiter/tree/main/src/arbiter/quantum"
click node_circuit_backend "https://github.com/rohit-jr/arbiter/blob/main/src/arbiter/qds_simulation/circuits.py"
click node_noise_model "https://github.com/rohit-jr/arbiter/blob/main/src/arbiter/noise/trapped_ion.py"
click node_verifier "https://github.com/rohit-jr/arbiter/blob/main/src/arbiter/pipeline.py"
click node_detection "https://github.com/rohit-jr/arbiter/tree/main/src/arbiter/detection"
click node_security_bounds "https://github.com/rohit-jr/arbiter/blob/main/src/arbiter/detection/security.py"
click node_pki_scoring "https://github.com/rohit-jr/arbiter/tree/main/src/arbiter/pki_risk_scoring"
click node_ledger "https://github.com/rohit-jr/arbiter/blob/main/src/arbiter/audit_ledger/ledger.py"
click node_key_store "https://github.com/rohit-jr/arbiter/blob/main/src/arbiter/audit_ledger/storage.py"
click node_api_store "https://github.com/rohit-jr/arbiter/blob/main/src/arbiter/storage.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_ui,node_session_form,node_api_client,node_result_panels,node_ledger_panel,node_analysis_panels toneBlue
class node_api,node_job_runner toneAmber
class node_session_sim,node_quantum_model,node_circuit_backend,node_noise_model,node_verifier,node_detection,node_security_bounds,node_pki_scoring toneMint
class node_ledger,node_key_store,node_api_store toneRose
class node_operator toneIndigo
```

## Components

### Dashboard

- [Dashboard app](https://github.com/rohit-jr/arbiter/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Session form](https://github.com/rohit-jr/arbiter/blob/main/frontend/src/components/SessionForm.tsx): `frontend/src/components/SessionForm.tsx`
- [API client](https://github.com/rohit-jr/arbiter/blob/main/frontend/src/api.ts): `frontend/src/api.ts`
- [Result panels](https://github.com/rohit-jr/arbiter/blob/main/frontend/src/components/VerdictPanel.tsx): `frontend/src/components/VerdictPanel.tsx`
- [Ledger panel](https://github.com/rohit-jr/arbiter/blob/main/frontend/src/components/LedgerPanel.tsx): `frontend/src/components/LedgerPanel.tsx`
- [Analysis panels](https://github.com/rohit-jr/arbiter/blob/main/frontend/src/components/AccuracyPanel.tsx): `frontend/src/components/AccuracyPanel.tsx`

### API and workflow

- [FastAPI service](https://github.com/rohit-jr/arbiter/blob/main/src/arbiter/api/app.py): `src/arbiter/api/app.py`
- [Background jobs](https://github.com/rohit-jr/arbiter/blob/main/src/arbiter/api/jobs.py): `src/arbiter/api/jobs.py`

### Simulation and analysis

- [QDS session simulator](https://github.com/rohit-jr/arbiter/blob/main/src/arbiter/qds_simulation/protocol.py): `src/arbiter/qds_simulation/protocol.py`
- [Quantum model](https://github.com/rohit-jr/arbiter/tree/main/src/arbiter/quantum): `src/arbiter/quantum`
- [Aer circuit backend](https://github.com/rohit-jr/arbiter/blob/main/src/arbiter/qds_simulation/circuits.py): `src/arbiter/qds_simulation/circuits.py`
- [Trapped-ion noise](https://github.com/rohit-jr/arbiter/blob/main/src/arbiter/noise/trapped_ion.py): `src/arbiter/noise/trapped_ion.py`
- [Verification orchestrator](https://github.com/rohit-jr/arbiter/blob/main/src/arbiter/pipeline.py): `src/arbiter/pipeline.py`
- [Detection tests](https://github.com/rohit-jr/arbiter/tree/main/src/arbiter/detection): `src/arbiter/detection`
- [QDS security bounds](https://github.com/rohit-jr/arbiter/blob/main/src/arbiter/detection/security.py): `src/arbiter/detection/security.py`
- [PKI risk scoring](https://github.com/rohit-jr/arbiter/tree/main/src/arbiter/pki_risk_scoring): `src/arbiter/pki_risk_scoring`

### Audit and persistence

- [Signed audit ledger](https://github.com/rohit-jr/arbiter/blob/main/src/arbiter/audit_ledger/ledger.py): `src/arbiter/audit_ledger/ledger.py`
- [Encrypted key store](https://github.com/rohit-jr/arbiter/blob/main/src/arbiter/audit_ledger/storage.py): `src/arbiter/audit_ledger/storage.py`
- [API state store](https://github.com/rohit-jr/arbiter/blob/main/src/arbiter/storage.py): `src/arbiter/storage.py`

### Other components

- **Operator**

## Connections

- Operator → Session form: selects scenario
- Session form → Dashboard app: submits request
- Dashboard app → API client: calls API
- Dashboard app → Result panels: renders verdict
- Dashboard app → Ledger panel: shows ledger
- Dashboard app → Analysis panels: shows analysis
- API client → FastAPI service: HTTP requests
- FastAPI service → QDS session simulator: simulates session
- QDS session simulator → Quantum model: samples probabilities
- QDS session simulator → Aer circuit backend: runs circuits
- FastAPI service → Verification orchestrator: verifies transcript
- Verification orchestrator → Detection tests: runs layered tests
- FastAPI service → Trapped-ion noise: loads preset
- FastAPI service → QDS security bounds: serves bounds
- FastAPI service → PKI risk scoring: serves risk scoring
- FastAPI service → Background jobs: dispatches jobs
- FastAPI service → API state store: persists API state
- Verification orchestrator → Signed audit ledger: appends verdict
- Signed audit ledger → Encrypted key store: uses encrypted keys
