# jsb8200/gdp-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/jsb8200/gdp-dashboard
- Repository: https://github.com/jsb8200/gdp-dashboard

## Overview

This is a Streamlit dashboard for analyzing dealer positioning from uploaded options and dark-pool CSVs. The main workflow is upload or use the bundled sample, normalize the data, calculate positioning and levels, then inspect visual summaries or download a report. The analytics module also supports flow intelligence, scenario/0DTE analysis, and multi-day validation. Feature-level analytics are grouped by responsibility; the excerpts do not show every call among those calculations.

Main entry points: [`streamlit_app.py`](https://github.com/jsb8200/gdp-dashboard/blob/main/streamlit_app.py) (Dashboard workflow), [`dealer_gex/parsing.py`](https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/parsing.py) (CSV normalization), [`dealer_gex/analytics.py`](https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/analytics.py) (Dealer analytics), [`dealer_gex/report.py`](https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/report.py) (Downloadable report)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Data ingestion"]
  node_parser["CSV normalization<br/>[parsing.py]"]
  node_canonical["Normalized chain<br/>[parsing.py]"]
  node_dark["Dark-pool prints<br/>[parsing.py]"]
end

subgraph group_analysis["Positioning analysis"]
  node_engine["Dealer analytics<br/>[analytics.py]"]
  node_regime["Gamma regime<br/>[analytics.py]"]
  node_levels["Positioning levels<br/>[analytics.py]"]
  node_confluence["Confluence ranking<br/>[analytics.py]"]
  node_lean["Directional lean<br/>[analytics.py]"]
  node_darklevels["Dark-pool overlay<br/>[analytics.py]"]
  node_scenario["Scenario and 0DTE<br/>[analytics.py]"]
end

subgraph group_history["History and flow"]
  node_flow["Order-flow intelligence<br/>[analytics.py]"]
  node_conviction["Conviction analysis<br/>[analytics.py]"]
  node_history["Multi-day validation<br/>[analytics.py]"]
end

subgraph group_presentation["Dashboard and output"]
  node_app["Dashboard workflow<br/>[streamlit_app.py]"]
  node_charts["Charts and tables<br/>[streamlit_app.py]"]
  node_report["Downloadable report<br/>[report.py]"]
end

node_user(("Analyst"))
node_csv["CSV data"]

node_user -->|"uses"| node_app
node_csv -->|"uploads"| node_app
node_app -->|"parses files"| node_parser
node_parser -->|"normalizes to"| node_canonical
node_app -->|"combines chains"| node_canonical
node_app -->|"loads overlay"| node_dark
node_app -->|"analyzes book"| node_engine
node_engine -->|"uses parsing types"| node_parser
node_app -->|"shows verdict"| node_regime
node_app -->|"computes levels"| node_levels
node_app -->|"ranks levels"| node_confluence
node_app -->|"shows lean"| node_lean
node_app -->|"adds overlay"| node_darklevels
node_app -->|"analyzes flow"| node_flow
node_app -->|"filters prints"| node_conviction
node_app -->|"validates days"| node_history
node_app -->|"simulates scenarios"| node_scenario
node_app -->|"renders analysis"| node_charts
node_app -->|"builds download"| node_report
node_report -->|"uses analysis results"| node_engine

click node_app "https://github.com/jsb8200/gdp-dashboard/blob/main/streamlit_app.py"
click node_parser "https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/parsing.py"
click node_canonical "https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/parsing.py"
click node_dark "https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/parsing.py"
click node_engine "https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/analytics.py"
click node_regime "https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/analytics.py"
click node_levels "https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/analytics.py"
click node_confluence "https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/analytics.py"
click node_lean "https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/analytics.py"
click node_darklevels "https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/analytics.py"
click node_flow "https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/analytics.py"
click node_conviction "https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/analytics.py"
click node_history "https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/analytics.py"
click node_scenario "https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/analytics.py"
click node_charts "https://github.com/jsb8200/gdp-dashboard/blob/main/streamlit_app.py"
click node_report "https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/report.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_parser,node_canonical,node_dark toneBlue
class node_engine,node_regime,node_levels,node_confluence,node_lean,node_darklevels,node_scenario toneAmber
class node_flow,node_conviction,node_history toneMint
class node_app,node_charts,node_report toneRose
class node_user,node_csv toneIndigo
```

## Components

### Data ingestion

- [CSV normalization](https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/parsing.py): `dealer_gex/parsing.py`
- [Normalized chain](https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/parsing.py): `dealer_gex/parsing.py`
- [Dark-pool prints](https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/parsing.py): `dealer_gex/parsing.py`

### Positioning analysis

- [Dealer analytics](https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/analytics.py): `dealer_gex/analytics.py`
- [Gamma regime](https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/analytics.py): `dealer_gex/analytics.py`
- [Positioning levels](https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/analytics.py): `dealer_gex/analytics.py`
- [Confluence ranking](https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/analytics.py): `dealer_gex/analytics.py`
- [Directional lean](https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/analytics.py): `dealer_gex/analytics.py`
- [Dark-pool overlay](https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/analytics.py): `dealer_gex/analytics.py`
- [Scenario and 0DTE](https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/analytics.py): `dealer_gex/analytics.py`

### History and flow

- [Order-flow intelligence](https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/analytics.py): `dealer_gex/analytics.py`
- [Conviction analysis](https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/analytics.py): `dealer_gex/analytics.py`
- [Multi-day validation](https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/analytics.py): `dealer_gex/analytics.py`

### Dashboard and output

- [Dashboard workflow](https://github.com/jsb8200/gdp-dashboard/blob/main/streamlit_app.py): `streamlit_app.py`
- [Charts and tables](https://github.com/jsb8200/gdp-dashboard/blob/main/streamlit_app.py): `streamlit_app.py`
- [Downloadable report](https://github.com/jsb8200/gdp-dashboard/blob/main/dealer_gex/report.py): `dealer_gex/report.py`

### Other components

- **Analyst**
- **CSV data**

## Connections

- Analyst → Dashboard workflow: uses (evidence: `README.md`)
- CSV data → Dashboard workflow: uploads (evidence: `README.md`)
- Dashboard workflow → CSV normalization: parses files (evidence: `streamlit_app.py`)
- CSV normalization → Normalized chain: normalizes to (evidence: `dealer_gex/parsing.py`)
- Dashboard workflow → Normalized chain: combines chains (evidence: `streamlit_app.py`)
- Dashboard workflow → Dark-pool prints: loads overlay (evidence: `streamlit_app.py`)
- Dashboard workflow → Dealer analytics: analyzes book (evidence: `streamlit_app.py`)
- Dealer analytics → CSV normalization: uses parsing types (evidence: `dealer_gex/analytics.py`)
- Dashboard workflow → Gamma regime: shows verdict (evidence: `README.md`)
- Dashboard workflow → Positioning levels: computes levels (evidence: `streamlit_app.py`)
- Dashboard workflow → Confluence ranking: ranks levels (evidence: `streamlit_app.py`)
- Dashboard workflow → Directional lean: shows lean (evidence: `streamlit_app.py`)
- Dashboard workflow → Dark-pool overlay: adds overlay (evidence: `streamlit_app.py`)
- Dashboard workflow → Order-flow intelligence: analyzes flow (evidence: `README.md`)
- Dashboard workflow → Conviction analysis: filters prints (evidence: `README.md`)
- Dashboard workflow → Multi-day validation: validates days (evidence: `streamlit_app.py`)
- Dashboard workflow → Scenario and 0DTE: simulates scenarios (evidence: `README.md`)
- Dashboard workflow → Charts and tables: renders analysis (evidence: `streamlit_app.py`)
- Dashboard workflow → Downloadable report: builds download (evidence: `streamlit_app.py`)
- Downloadable report → Dealer analytics: uses analysis results (evidence: `dealer_gex/report.py`)
