# mad3inheave-n/ias-tsyp14-greenleak architecture

> Architecture diagram of the GitHub repository mad3inheave-n/ias-tsyp14-greenleak, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mad3inheave-n/ias-tsyp14-greenleak
- Repository: https://github.com/mad3inheave-n/ias-tsyp14-greenleak

## Overview

GreenLeak is a small compressed-air leak detection prototype: pressure-drop monitoring prompts a technician to inspect a water-filled tube, where bubbles indicate a leaking zone. The repository documents a dashboard for pressure and zone display, and provides a Python camera detector with Watershed, Hough, and optional YOLO methods. The excerpts show the detector’s local camera/image workflow, but not a connection that sends results to the dashboard; that integration is therefore shown as unverified.

Main entry points: [`camera_bulles.py`](https://github.com/mad3inheave-n/ias-tsyp14-greenleak/blob/main/camera_bulles.py) (Detection runtime), [`dashboard.html`](https://github.com/mad3inheave-n/ias-tsyp14-greenleak/blob/main/dashboard.html) (Pressure and zone view)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Operator dashboard"]
  node_dashboard_ui["Pressure and zone view<br/>[dashboard.html]"]
end

subgraph group_inspection["Zone inspection"]
  node_inspection_tube["Water-filled tube"]
end

subgraph group_detection["Bubble detection"]
  node_camera_input["Camera or media input<br/>[camera_bulles.py]"]
  node_detector_runtime["Detection runtime<br/>[camera_bulles.py]"]
  node_image_preprocessing["Image preprocessing<br/>[camera_bulles.py]"]
  node_watershed_detector["Watershed detector<br/>[camera_bulles.py]"]
  node_hough_detector["Hough detector<br/>[camera_bulles.py]"]
  node_yolo_detector["Optional YOLO detector<br/>[camera_bulles.py]"]
  node_detection_controls["Detection controls<br/>[camera_bulles.py]"]
  node_annotated_output["Annotated display and capture<br/>[camera_bulles.py]"]
end

node_technician(("Technician"))
node_pressure_sensor(("Pressure sensor"))

node_pressure_sensor -->|"shows pressure"| node_dashboard_ui
node_technician -->|"views status"| node_dashboard_ui
node_technician -->|"starts check"| node_inspection_tube
node_inspection_tube -->|"reveals bubbles"| node_camera_input
node_technician -->|"starts detection"| node_detector_runtime
node_detector_runtime -->|"opens source"| node_camera_input
node_detector_runtime -->|"preprocesses frames"| node_image_preprocessing
node_detector_runtime -->|"runs method"| node_watershed_detector
node_detector_runtime -->|"runs method"| node_hough_detector
node_detector_runtime -->|"runs optional method"| node_yolo_detector
node_technician -->|"adjusts settings"| node_detection_controls
node_detector_runtime -->|"displays and saves"| node_annotated_output
node_detector_runtime -.->|"reports leak zone"| node_dashboard_ui

click node_dashboard_ui "https://github.com/mad3inheave-n/ias-tsyp14-greenleak/blob/main/dashboard.html"
click node_camera_input "https://github.com/mad3inheave-n/ias-tsyp14-greenleak/blob/main/camera_bulles.py"
click node_detector_runtime "https://github.com/mad3inheave-n/ias-tsyp14-greenleak/blob/main/camera_bulles.py"
click node_image_preprocessing "https://github.com/mad3inheave-n/ias-tsyp14-greenleak/blob/main/camera_bulles.py"
click node_watershed_detector "https://github.com/mad3inheave-n/ias-tsyp14-greenleak/blob/main/camera_bulles.py"
click node_hough_detector "https://github.com/mad3inheave-n/ias-tsyp14-greenleak/blob/main/camera_bulles.py"
click node_yolo_detector "https://github.com/mad3inheave-n/ias-tsyp14-greenleak/blob/main/camera_bulles.py"
click node_detection_controls "https://github.com/mad3inheave-n/ias-tsyp14-greenleak/blob/main/camera_bulles.py"
click node_annotated_output "https://github.com/mad3inheave-n/ias-tsyp14-greenleak/blob/main/camera_bulles.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_dashboard_ui toneBlue
class node_inspection_tube toneAmber
class node_camera_input,node_detector_runtime,node_image_preprocessing,node_watershed_detector,node_hough_detector,node_yolo_detector,node_detection_controls,node_annotated_output toneMint
class node_technician,node_pressure_sensor toneIndigo
```

## Components

### Operator dashboard

- [Pressure and zone view](https://github.com/mad3inheave-n/ias-tsyp14-greenleak/blob/main/dashboard.html): `dashboard.html`

### Zone inspection

- **Water-filled tube**

### Bubble detection

- [Camera or media input](https://github.com/mad3inheave-n/ias-tsyp14-greenleak/blob/main/camera_bulles.py): `camera_bulles.py`
- [Detection runtime](https://github.com/mad3inheave-n/ias-tsyp14-greenleak/blob/main/camera_bulles.py): `camera_bulles.py`
- [Image preprocessing](https://github.com/mad3inheave-n/ias-tsyp14-greenleak/blob/main/camera_bulles.py): `camera_bulles.py`
- [Watershed detector](https://github.com/mad3inheave-n/ias-tsyp14-greenleak/blob/main/camera_bulles.py): `camera_bulles.py`
- [Hough detector](https://github.com/mad3inheave-n/ias-tsyp14-greenleak/blob/main/camera_bulles.py): `camera_bulles.py`
- [Optional YOLO detector](https://github.com/mad3inheave-n/ias-tsyp14-greenleak/blob/main/camera_bulles.py): `camera_bulles.py`
- [Detection controls](https://github.com/mad3inheave-n/ias-tsyp14-greenleak/blob/main/camera_bulles.py): `camera_bulles.py`
- [Annotated display and capture](https://github.com/mad3inheave-n/ias-tsyp14-greenleak/blob/main/camera_bulles.py): `camera_bulles.py`

### Other components

- **Technician**
- **Pressure sensor**

## Connections

- Pressure sensor → Pressure and zone view: shows pressure (evidence: `README.md`)
- Technician → Pressure and zone view: views status (evidence: `README.md`)
- Technician → Water-filled tube: starts check (evidence: `README.md`)
- Water-filled tube → Camera or media input: reveals bubbles (evidence: `README.md`)
- Technician → Detection runtime: starts detection (evidence: `camera_bulles.py`)
- Detection runtime → Camera or media input: opens source (evidence: `camera_bulles.py`)
- Detection runtime → Image preprocessing: preprocesses frames (evidence: `camera_bulles.py`)
- Detection runtime → Watershed detector: runs method (evidence: `camera_bulles.py`)
- Detection runtime → Hough detector: runs method (evidence: `camera_bulles.py`)
- Detection runtime → Optional YOLO detector: runs optional method (evidence: `camera_bulles.py`)
- Technician → Detection controls: adjusts settings (evidence: `camera_bulles.py`)
- Detection runtime → Annotated display and capture: displays and saves (evidence: `camera_bulles.py`)
- Detection runtime → Pressure and zone view: reports leak zone
