# abbegubbegum/gtpxe architecture

> Architecture diagram of the GitHub repository abbegubbegum/gtpxe, 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/abbegubbegum/gtpxe
- Repository: https://github.com/abbegubbegum/gtpxe

## Overview

Alpine PXE Diagnostic Tool boots a RAM-based Alpine environment and runs hardware checks, with results shown locally and logged. The documented boot path uses a PXE server and architecture-specific overlays; diagnostics include storage, memory/CPU, USB, serial, display, input, audio, battery, and temperature checks. The sampled sources confirm SMART/NVMe storage logic and the server’s per-MAC boot-stage endpoint. Other diagnostic implementations are represented at their existing directory paths because their source was not sampled.

Main entry points: [`client/startup/run_diagnostic.start`](https://github.com/abbegubbegum/gtpxe/blob/main/client/startup/run_diagnostic.start) (Diagnostic Startup), [`server/package/srv/python/pxe_http.py`](https://github.com/abbegubbegum/gtpxe/blob/main/server/package/srv/python/pxe_http.py) (HTTP Boot Service), [`client/python/usb_test.py`](https://github.com/abbegubbegum/gtpxe/blob/main/client/python/usb_test.py) (USB Port Test), [`server/ipxe_scripts/boot.ipxe`](https://github.com/abbegubbegum/gtpxe/blob/main/server/ipxe_scripts/boot.ipxe) (iPXE Script)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_boot["PXE Boot"]
  node_ipxe["iPXE Script<br/>[boot.ipxe]"]
  node_overlays["Alpine Overlays"]
end

subgraph group_server["Server Services"]
  node_dhcp["DHCP Service"]
  node_tftp["TFTP Boot Files"]
  node_http["HTTP Boot Service<br/>[pxe_http.py]"]
  node_bootstate[("Per-MAC Boot State<br/>[pxe_http.py]")]
  node_bootassets["HTTP Boot Assets"]
end

subgraph group_runtime["Diagnostic Runtime"]
  node_startup["Diagnostic Startup"]
end

subgraph group_checks["Hardware Checks"]
  node_memory["CPU &amp; Memory"]
  node_storage["Storage Health<br/>[disk_health.py]"]
  node_usb["USB Port Test<br/>[usb_test.py]"]
  node_serial["Serial Port Test<br/>[serial_test.sh]"]
  node_display["Display Test"]
  node_input["Keyboard &amp; Touch"]
  node_audio["Audio Test"]
  node_monitor["System Monitoring"]
end

subgraph group_results["Reports"]
  node_report["Diagnostic Reports"]
end

node_operator(("PXE Operator"))
node_firmware(("PXE Client"))
node_hardware(("Test Hardware"))

node_operator -->|"configures server"| node_dhcp
node_firmware -->|"requests boot"| node_dhcp
node_firmware -->|"loads boot files"| node_tftp
node_tftp -->|"provides script"| node_ipxe
node_firmware -->|"runs script"| node_ipxe
node_ipxe -.->|"requests boot stage"| node_http
node_http -->|"reads and updates"| node_bootstate
node_http -->|"returns boot target"| node_firmware
node_firmware -->|"downloads boot files"| node_bootassets
node_bootassets -->|"includes overlay"| node_overlays
node_firmware -->|"boots into"| node_startup
node_startup -->|"runs first"| node_memory
node_startup -->|"runs next"| node_storage
node_startup -->|"runs next"| node_usb
node_startup -->|"checks status"| node_monitor
node_startup -->|"runs tests"| node_serial
node_startup -->|"launches test"| node_input
node_startup -->|"launches test"| node_display
node_startup -->|"runs test"| node_audio
node_memory -->|"tests"| node_hardware
node_storage -->|"scans drives"| node_hardware
node_usb -->|"tests fixture"| node_hardware
node_serial -->|"tests ports"| node_hardware
node_input -->|"captures input"| node_hardware
node_display -->|"renders patterns"| node_hardware
node_audio -->|"plays tone"| node_hardware
node_monitor -->|"reads sensors"| node_hardware
node_startup -->|"displays and logs"| node_report
node_usb -->|"writes JSON"| node_report

click node_dhcp "https://github.com/abbegubbegum/gtpxe/tree/main/server/package/conf/armbian"
click node_tftp "https://github.com/abbegubbegum/gtpxe/tree/main/server/package/srv/tftp"
click node_ipxe "https://github.com/abbegubbegum/gtpxe/blob/main/server/ipxe_scripts/boot.ipxe"
click node_http "https://github.com/abbegubbegum/gtpxe/blob/main/server/package/srv/python/pxe_http.py"
click node_bootstate "https://github.com/abbegubbegum/gtpxe/blob/main/server/package/srv/python/pxe_http.py"
click node_bootassets "https://github.com/abbegubbegum/gtpxe/tree/main/server/package/srv/http"
click node_overlays "https://github.com/abbegubbegum/gtpxe/tree/main/client/overlays"
click node_startup "https://github.com/abbegubbegum/gtpxe/blob/main/client/startup/run_diagnostic.start"
click node_memory "https://github.com/abbegubbegum/gtpxe/tree/main/client"
click node_storage "https://github.com/abbegubbegum/gtpxe/blob/main/client/python/disk_health.py"
click node_usb "https://github.com/abbegubbegum/gtpxe/blob/main/client/python/usb_test.py"
click node_serial "https://github.com/abbegubbegum/gtpxe/blob/main/client/scripts/serial_test.sh"
click node_display "https://github.com/abbegubbegum/gtpxe/tree/main/client"
click node_input "https://github.com/abbegubbegum/gtpxe/tree/main/client"
click node_audio "https://github.com/abbegubbegum/gtpxe/tree/main/client"
click node_monitor "https://github.com/abbegubbegum/gtpxe/tree/main/client"
click node_report "https://github.com/abbegubbegum/gtpxe/blob/main/client/startup/run_diagnostic.start"

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_ipxe,node_overlays,node_firmware toneBlue
class node_dhcp,node_tftp,node_http,node_bootstate,node_bootassets toneAmber
class node_startup toneMint
class node_memory,node_storage,node_usb,node_serial,node_display,node_input,node_audio,node_monitor toneRose
class node_report,node_operator,node_hardware toneIndigo
```

## Components

### PXE Boot

- [iPXE Script](https://github.com/abbegubbegum/gtpxe/blob/main/server/ipxe_scripts/boot.ipxe): `server/ipxe_scripts/boot.ipxe`
- [Alpine Overlays](https://github.com/abbegubbegum/gtpxe/tree/main/client/overlays): `client/overlays`

### Server Services

- [DHCP Service](https://github.com/abbegubbegum/gtpxe/tree/main/server/package/conf/armbian): `server/package/conf/armbian`
- [TFTP Boot Files](https://github.com/abbegubbegum/gtpxe/tree/main/server/package/srv/tftp): `server/package/srv/tftp`
- [HTTP Boot Service](https://github.com/abbegubbegum/gtpxe/blob/main/server/package/srv/python/pxe_http.py): `server/package/srv/python/pxe_http.py`
- [Per-MAC Boot State](https://github.com/abbegubbegum/gtpxe/blob/main/server/package/srv/python/pxe_http.py): `server/package/srv/python/pxe_http.py`
- [HTTP Boot Assets](https://github.com/abbegubbegum/gtpxe/tree/main/server/package/srv/http): `server/package/srv/http`

### Diagnostic Runtime

- [Diagnostic Startup](https://github.com/abbegubbegum/gtpxe/blob/main/client/startup/run_diagnostic.start): `client/startup/run_diagnostic.start`

### Hardware Checks

- [CPU & Memory](https://github.com/abbegubbegum/gtpxe/tree/main/client): `client`
- [Storage Health](https://github.com/abbegubbegum/gtpxe/blob/main/client/python/disk_health.py): `client/python/disk_health.py`
- [USB Port Test](https://github.com/abbegubbegum/gtpxe/blob/main/client/python/usb_test.py): `client/python/usb_test.py`
- [Serial Port Test](https://github.com/abbegubbegum/gtpxe/blob/main/client/scripts/serial_test.sh): `client/scripts/serial_test.sh`
- [Display Test](https://github.com/abbegubbegum/gtpxe/tree/main/client): `client`
- [Keyboard & Touch](https://github.com/abbegubbegum/gtpxe/tree/main/client): `client`
- [Audio Test](https://github.com/abbegubbegum/gtpxe/tree/main/client): `client`
- [System Monitoring](https://github.com/abbegubbegum/gtpxe/tree/main/client): `client`

### Reports

- [Diagnostic Reports](https://github.com/abbegubbegum/gtpxe/blob/main/client/startup/run_diagnostic.start): `client/startup/run_diagnostic.start`

### Other components

- **PXE Operator**
- **PXE Client**
- **Test Hardware**

## Connections

- PXE Operator → DHCP Service: configures server (evidence: `README.md`)
- PXE Client → DHCP Service: requests boot (evidence: `README.md`)
- PXE Client → TFTP Boot Files: loads boot files (evidence: `README.md`)
- TFTP Boot Files → iPXE Script: provides script (evidence: `README.md`)
- PXE Client → iPXE Script: runs script (evidence: `README.md`)
- iPXE Script → HTTP Boot Service: requests boot stage
- HTTP Boot Service → Per-MAC Boot State: reads and updates (evidence: `server/package/srv/python/pxe_http.py`)
- HTTP Boot Service → PXE Client: returns boot target (evidence: `server/package/srv/python/pxe_http.py`)
- PXE Client → HTTP Boot Assets: downloads boot files (evidence: `README.md`)
- HTTP Boot Assets → Alpine Overlays: includes overlay (evidence: `README.md`)
- PXE Client → Diagnostic Startup: boots into (evidence: `README.md`)
- Diagnostic Startup → CPU & Memory: runs first (evidence: `README.md`)
- Diagnostic Startup → Storage Health: runs next (evidence: `README.md`)
- Diagnostic Startup → USB Port Test: runs next (evidence: `README.md`)
- Diagnostic Startup → System Monitoring: checks status (evidence: `README.md`)
- Diagnostic Startup → Serial Port Test: runs tests (evidence: `README.md`)
- Diagnostic Startup → Keyboard & Touch: launches test (evidence: `README.md`)
- Diagnostic Startup → Display Test: launches test (evidence: `README.md`)
- Diagnostic Startup → Audio Test: runs test (evidence: `README.md`)
- CPU & Memory → Test Hardware: tests (evidence: `README.md`)
- Storage Health → Test Hardware: scans drives (evidence: `client/python/disk_health.py`)
- USB Port Test → Test Hardware: tests fixture (evidence: `README.md`)
- Serial Port Test → Test Hardware: tests ports (evidence: `README.md`)
- Keyboard & Touch → Test Hardware: captures input (evidence: `README.md`)
- Display Test → Test Hardware: renders patterns (evidence: `README.md`)
- Audio Test → Test Hardware: plays tone (evidence: `README.md`)
- System Monitoring → Test Hardware: reads sensors (evidence: `README.md`)
- Diagnostic Startup → Diagnostic Reports: displays and logs (evidence: `README.md`)
- USB Port Test → Diagnostic Reports: writes JSON (evidence: `README.md`)
