# jwg12345/captsone architecture

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

- Interactive diagram: https://gitdiagram.com/jwg12345/captsone
- Repository: https://github.com/jwg12345/captsone

## Overview

This repository documents a thermal-imaging computer-cooling project and contains code areas for camera control, AI, fan control, data analysis, telemetry, and web monitoring. The documented workflow detects thermal anomalies, uses threshold-based classification to optimize fan operation, and presents telemetry and alerts to users. Source excerpts were unavailable, so component links below reflect only relationships stated in the top-level README; directory paths identify code areas, not verified implementations.

Main entry points: [`003 Code/YOLO_TRAIN`](https://github.com/jwg12345/captsone/tree/main/003%20Code/YOLO_TRAIN) (Threshold classifier), [`003 Code/sys-temp-to-influxdb`](https://github.com/jwg12345/captsone/tree/main/003%20Code/sys-temp-to-influxdb) (Temperature telemetry), [`003 Code/Data-Analysis`](https://github.com/jwg12345/captsone/tree/main/003%20Code/Data-Analysis) (Image analysis), [`003 Code/FAN_Controller`](https://github.com/jwg12345/captsone/tree/main/003%20Code/FAN_Controller) (PWM fan control)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sensing["Sensing and AI"]
  node_thermal_camera["Thermal camera"]
  node_image_analysis["Image analysis"]
  node_anomaly_detection["YOLO detection"]
  node_threshold_classifier["Threshold classifier"]
end

subgraph group_cooling["Cooling and telemetry"]
  node_fan_controller["PWM fan control"]
  node_telemetry["Temperature telemetry"]
  node_time_series_db[("Time-series DB")]
end

subgraph group_monitoring["Monitoring and integration"]
  node_web_monitor["Web dashboard"]
  node_rest_api["REST API"]
  node_alerts["Threshold alerts"]
end

node_operator(("Operator"))

node_thermal_camera -->|"provides images"| node_image_analysis
node_image_analysis -->|"analyzes images"| node_anomaly_detection
node_anomaly_detection -->|"detects anomalies"| node_threshold_classifier
node_threshold_classifier -->|"guides fan control"| node_fan_controller
node_fan_controller -->|"reports control history"| node_telemetry
node_telemetry -->|"stores time series"| node_time_series_db
node_telemetry -->|"feeds monitoring"| node_web_monitor
node_web_monitor -->|"displays status"| node_operator
node_threshold_classifier -->|"triggers on threshold"| node_alerts
node_alerts -->|"notifies"| node_operator
node_rest_api -->|"integrates data"| node_time_series_db

click node_thermal_camera "https://github.com/jwg12345/captsone/tree/main/003%20Code/lepton_usb_control"
click node_image_analysis "https://github.com/jwg12345/captsone/tree/main/003%20Code/Data-Analysis"
click node_anomaly_detection "https://github.com/jwg12345/captsone/tree/main/003%20Code/YOLO_TRAIN"
click node_threshold_classifier "https://github.com/jwg12345/captsone/tree/main/003%20Code/YOLO_TRAIN"
click node_fan_controller "https://github.com/jwg12345/captsone/tree/main/003%20Code/FAN_Controller"
click node_telemetry "https://github.com/jwg12345/captsone/tree/main/003%20Code/sys-temp-to-influxdb"
click node_web_monitor "https://github.com/jwg12345/captsone/tree/main/003%20Code/SpringBoot_Web_Monitoring"
click node_rest_api "https://github.com/jwg12345/captsone/tree/main/003%20Code/SpringBoot_Web_Monitoring"
click node_alerts "https://github.com/jwg12345/captsone/tree/main/003%20Code/SpringBoot_Web_Monitoring"

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_thermal_camera,node_image_analysis,node_anomaly_detection,node_threshold_classifier toneBlue
class node_fan_controller,node_telemetry,node_time_series_db toneAmber
class node_web_monitor,node_rest_api,node_alerts toneMint
class node_operator toneIndigo
```

## Components

### Sensing and AI

- [Thermal camera](https://github.com/jwg12345/captsone/tree/main/003%20Code/lepton_usb_control): `003 Code/lepton_usb_control`
- [Image analysis](https://github.com/jwg12345/captsone/tree/main/003%20Code/Data-Analysis): `003 Code/Data-Analysis`
- [YOLO detection](https://github.com/jwg12345/captsone/tree/main/003%20Code/YOLO_TRAIN): `003 Code/YOLO_TRAIN`
- [Threshold classifier](https://github.com/jwg12345/captsone/tree/main/003%20Code/YOLO_TRAIN): `003 Code/YOLO_TRAIN`

### Cooling and telemetry

- [PWM fan control](https://github.com/jwg12345/captsone/tree/main/003%20Code/FAN_Controller): `003 Code/FAN_Controller`
- [Temperature telemetry](https://github.com/jwg12345/captsone/tree/main/003%20Code/sys-temp-to-influxdb): `003 Code/sys-temp-to-influxdb`
- **Time-series DB**

### Monitoring and integration

- [Web dashboard](https://github.com/jwg12345/captsone/tree/main/003%20Code/SpringBoot_Web_Monitoring): `003 Code/SpringBoot_Web_Monitoring`
- [REST API](https://github.com/jwg12345/captsone/tree/main/003%20Code/SpringBoot_Web_Monitoring): `003 Code/SpringBoot_Web_Monitoring`
- [Threshold alerts](https://github.com/jwg12345/captsone/tree/main/003%20Code/SpringBoot_Web_Monitoring): `003 Code/SpringBoot_Web_Monitoring`

### Other components

- **Operator**

## Connections

- Thermal camera → Image analysis: provides images (evidence: `README.md`)
- Image analysis → YOLO detection: analyzes images (evidence: `README.md`)
- YOLO detection → Threshold classifier: detects anomalies (evidence: `README.md`)
- Threshold classifier → PWM fan control: guides fan control (evidence: `README.md`)
- PWM fan control → Temperature telemetry: reports control history (evidence: `README.md`)
- Temperature telemetry → Time-series DB: stores time series (evidence: `README.md`)
- Temperature telemetry → Web dashboard: feeds monitoring (evidence: `README.md`)
- Web dashboard → Operator: displays status (evidence: `README.md`)
- Threshold classifier → Threshold alerts: triggers on threshold (evidence: `README.md`)
- Threshold alerts → Operator: notifies (evidence: `README.md`)
- REST API → Time-series DB: integrates data (evidence: `README.md`)
