# reza91ag/msuodiagnostics-openai-automated architecture

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

- Interactive diagram: https://gitdiagram.com/reza91ag/msuodiagnostics-openai-automated
- Repository: https://github.com/reza91ag/msuodiagnostics-openai-automated

## Overview

MSUO Live Execution Observatory is a local dashboard for comparing completed EntryFlow and OptiSpec WatchDog request lifecycles. Users configure log sources and filters, then inspect latency, divergence, startup and persistence information; exports provide PDF, LaTeX, and CSV outputs. The server owns log parsing, measurement computation, configuration and HTTP handling. A separate publisher can publish a PDF snapshot. The server excerpt is partial, so internal routing beyond the indexed export imports is not expanded.

Main entry points: [`server.py`](https://github.com/reza91ag/msuodiagnostics-openai-automated/blob/main/server.py) (HTTP server and API), [`snapshot/publish.py`](https://github.com/reza91ag/msuodiagnostics-openai-automated/blob/main/snapshot/publish.py) (Snapshot publisher), [`web/index.html`](https://github.com/reza91ag/msuodiagnostics-openai-automated/blob/main/web/index.html) (Web dashboard), [`latex_export.py`](https://github.com/reza91ag/msuodiagnostics-openai-automated/blob/main/latex_export.py) (LaTeX export)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Dashboard"]
  node_browser["Web dashboard<br/>[index.html]"]
  node_http["HTTP server and API<br/>[server.py]"]
  node_source_config["Source configuration<br/>[server.py]"]
end

subgraph group_measurement["Measurement"]
  node_log_parser["Lifecycle log parser<br/>[server.py]"]
  node_measurement_engine["Metrics and filtering<br/>[server.py]"]
end

subgraph group_exports["Exports"]
  node_latex["LaTeX export<br/>[latex_export.py]"]
  node_pdf["PDF export<br/>[pdf_export.py]"]
  node_csv["CSV export<br/>[server.py]"]
end

subgraph group_snapshot["Snapshot Publishing"]
  node_snapshot_publisher["Snapshot publisher<br/>[publish.py]"]
  node_snapshot_viewer["Static snapshot viewer<br/>[index.html]"]
end

node_user(("Dashboard user"))
node_github(("GitHub repository"))

node_user -->|"configures and views"| node_browser
node_browser -->|"uses dashboard"| node_http
node_http -->|"updates settings"| node_source_config
node_http -->|"serves measurements"| node_measurement_engine
node_measurement_engine -.->|"measures lifecycles"| node_log_parser
node_http -->|"exports LaTeX"| node_latex
node_http -->|"exports PDF"| node_pdf
node_http -->|"exports CSV"| node_csv
node_snapshot_publisher -->|"fetches data and PDF"| node_http
node_snapshot_publisher -->|"publishes viewer"| node_snapshot_viewer
node_snapshot_publisher -->|"commits snapshot"| node_github

click node_browser "https://github.com/reza91ag/msuodiagnostics-openai-automated/blob/main/web/index.html"
click node_http "https://github.com/reza91ag/msuodiagnostics-openai-automated/blob/main/server.py"
click node_source_config "https://github.com/reza91ag/msuodiagnostics-openai-automated/blob/main/server.py"
click node_log_parser "https://github.com/reza91ag/msuodiagnostics-openai-automated/blob/main/server.py"
click node_measurement_engine "https://github.com/reza91ag/msuodiagnostics-openai-automated/blob/main/server.py"
click node_latex "https://github.com/reza91ag/msuodiagnostics-openai-automated/blob/main/latex_export.py"
click node_pdf "https://github.com/reza91ag/msuodiagnostics-openai-automated/blob/main/pdf_export.py"
click node_csv "https://github.com/reza91ag/msuodiagnostics-openai-automated/blob/main/server.py"
click node_snapshot_publisher "https://github.com/reza91ag/msuodiagnostics-openai-automated/blob/main/snapshot/publish.py"
click node_snapshot_viewer "https://github.com/reza91ag/msuodiagnostics-openai-automated/blob/main/snapshot/index.html"

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_browser,node_http,node_source_config,node_user toneBlue
class node_log_parser,node_measurement_engine toneAmber
class node_latex,node_pdf,node_csv toneMint
class node_snapshot_publisher,node_snapshot_viewer toneRose
class node_github toneIndigo
```

## Components

### Dashboard

- [Web dashboard](https://github.com/reza91ag/msuodiagnostics-openai-automated/blob/main/web/index.html): `web/index.html`
- [HTTP server and API](https://github.com/reza91ag/msuodiagnostics-openai-automated/blob/main/server.py): `server.py`
- [Source configuration](https://github.com/reza91ag/msuodiagnostics-openai-automated/blob/main/server.py): `server.py`

### Measurement

- [Lifecycle log parser](https://github.com/reza91ag/msuodiagnostics-openai-automated/blob/main/server.py): `server.py`
- [Metrics and filtering](https://github.com/reza91ag/msuodiagnostics-openai-automated/blob/main/server.py): `server.py`

### Exports

- [LaTeX export](https://github.com/reza91ag/msuodiagnostics-openai-automated/blob/main/latex_export.py): `latex_export.py`
- [PDF export](https://github.com/reza91ag/msuodiagnostics-openai-automated/blob/main/pdf_export.py): `pdf_export.py`
- [CSV export](https://github.com/reza91ag/msuodiagnostics-openai-automated/blob/main/server.py): `server.py`

### Snapshot Publishing

- [Snapshot publisher](https://github.com/reza91ag/msuodiagnostics-openai-automated/blob/main/snapshot/publish.py): `snapshot/publish.py`
- [Static snapshot viewer](https://github.com/reza91ag/msuodiagnostics-openai-automated/blob/main/snapshot/index.html): `snapshot/index.html`

### Other components

- **Dashboard user**
- **GitHub repository**

## Connections

- Dashboard user → Web dashboard: configures and views (evidence: `README.md`)
- Web dashboard → HTTP server and API: uses dashboard (evidence: `README.md`)
- HTTP server and API → Source configuration: updates settings (evidence: `server.py`)
- HTTP server and API → Metrics and filtering: serves measurements (evidence: `README.md`)
- Metrics and filtering → Lifecycle log parser: measures lifecycles (evidence: `server.py`)
- HTTP server and API → LaTeX export: exports LaTeX (evidence: `server.py`)
- HTTP server and API → PDF export: exports PDF (evidence: `server.py`)
- HTTP server and API → CSV export: exports CSV (evidence: `README.md`)
- Snapshot publisher → HTTP server and API: fetches data and PDF (evidence: `snapshot/publish.py`)
- Snapshot publisher → Static snapshot viewer: publishes viewer (evidence: `snapshot/publish.py`)
- Snapshot publisher → GitHub repository: commits snapshot (evidence: `snapshot/publish.py`)
