# conorander/smart-clothesline architecture

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

- Interactive diagram: https://gitdiagram.com/conorander/smart-clothesline
- Repository: https://github.com/conorander/smart-clothesline

## Overview

This repository implements a rain-likelihood predictor for a smart clothesline: it combines broad weather-station observations with fine local-sensor readings, stores fused inference in Firebase, and presents the readings and status in a dashboard. Separate broad and fine model tracks also preprocess historical CSV data and train neural-network checkpoints. The runtime links are visible in pipeline.py and gui.py; training links are supported by the excerpts and SOURCE INDEX. No README was provided, so undocumented capabilities and wiring are not inferred.

Main entry points: [`pipeline.py`](https://github.com/conorander/smart-clothesline/blob/master/pipeline.py) (Inference pipeline), [`broad/train.py`](https://github.com/conorander/smart-clothesline/blob/master/broad/train.py) (Broad training), [`fine/train.py`](https://github.com/conorander/smart-clothesline/blob/master/fine/train.py) (Fine training), [`gui.py`](https://github.com/conorander/smart-clothesline/blob/master/gui.py) (Clothesline dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Prediction runtime"]
  node_pipeline["Inference pipeline<br/>[pipeline.py]"]
  node_broad_prep_runtime["Station features<br/>[pipeline.py]"]
end

subgraph group_models["Model tracks"]
  node_broad_model["Broad predictor<br/>[model.py]"]
  node_fine_model["Fine predictor<br/>[model.py]"]
  node_broad_checkpoint["Broad checkpoint<br/>[broad_model.pth]"]
  node_fine_checkpoint["Fine checkpoint<br/>[fine_model.pth]"]
  node_broad_preprocess["Station CSV prep<br/>[preprocess.py]"]
  node_fine_preprocess["Sensor CSV prep<br/>[preprocess.py]"]
end

subgraph group_training["Model training"]
  node_broad_train["Broad training<br/>[train.py]"]
  node_fine_train["Fine training<br/>[train.py]"]
  node_broad_plot["Broad training plots<br/>[PlotLogAccuracy.py]"]
  node_fine_plot["Fine training plots<br/>[PlotLogAccuracy.py]"]
end

subgraph group_dashboard["Dashboard"]
  node_dashboard["Clothesline dashboard<br/>[gui.py]"]
  node_styling["Dashboard styling<br/>[styling.py]"]
end

node_operator(("Scheduler or operator"))
node_weather_api{{"Met Éireann API"}}
node_firebase[("Firebase Realtime DB")]

node_operator -->|"runs"| node_pipeline
node_pipeline -->|"fetches observations"| node_weather_api
node_pipeline -->|"reads and writes"| node_firebase
node_pipeline -->|"builds features"| node_broad_prep_runtime
node_pipeline -->|"predicts"| node_broad_model
node_pipeline -->|"predicts"| node_fine_model
node_pipeline -->|"loads weights"| node_broad_checkpoint
node_pipeline -->|"loads weights"| node_fine_checkpoint
node_dashboard -->|"reads readings"| node_firebase
node_dashboard -->|"uses styles"| node_styling
node_broad_train -->|"preprocesses CSV"| node_broad_preprocess
node_broad_train -->|"updates plots"| node_broad_plot
node_broad_train -->|"creates network"| node_broad_model
node_broad_train -->|"saves weights"| node_broad_checkpoint
node_fine_train -->|"preprocesses CSV"| node_fine_preprocess
node_fine_train -->|"updates plots"| node_fine_plot
node_fine_train -->|"creates network"| node_fine_model
node_fine_train -->|"saves weights"| node_fine_checkpoint

click node_pipeline "https://github.com/conorander/smart-clothesline/blob/master/pipeline.py"
click node_broad_prep_runtime "https://github.com/conorander/smart-clothesline/blob/master/pipeline.py"
click node_broad_model "https://github.com/conorander/smart-clothesline/blob/master/broad/model.py"
click node_fine_model "https://github.com/conorander/smart-clothesline/blob/master/fine/model.py"
click node_broad_checkpoint "https://github.com/conorander/smart-clothesline/blob/master/broad/broad_model.pth"
click node_fine_checkpoint "https://github.com/conorander/smart-clothesline/blob/master/fine/fine_model.pth"
click node_broad_preprocess "https://github.com/conorander/smart-clothesline/blob/master/broad/preprocess.py"
click node_fine_preprocess "https://github.com/conorander/smart-clothesline/blob/master/fine/preprocess.py"
click node_broad_train "https://github.com/conorander/smart-clothesline/blob/master/broad/train.py"
click node_fine_train "https://github.com/conorander/smart-clothesline/blob/master/fine/train.py"
click node_broad_plot "https://github.com/conorander/smart-clothesline/blob/master/broad/PlotLogAccuracy.py"
click node_fine_plot "https://github.com/conorander/smart-clothesline/blob/master/fine/PlotLogAccuracy.py"
click node_dashboard "https://github.com/conorander/smart-clothesline/blob/master/gui.py"
click node_styling "https://github.com/conorander/smart-clothesline/blob/master/styling.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_pipeline,node_broad_prep_runtime toneBlue
class node_broad_model,node_fine_model,node_broad_checkpoint,node_fine_checkpoint,node_broad_preprocess,node_fine_preprocess,node_firebase toneAmber
class node_broad_train,node_fine_train,node_broad_plot,node_fine_plot,node_weather_api toneMint
class node_dashboard,node_styling,node_operator toneRose
```

## Components

### Prediction runtime

- [Inference pipeline](https://github.com/conorander/smart-clothesline/blob/master/pipeline.py): `pipeline.py`
- [Station features](https://github.com/conorander/smart-clothesline/blob/master/pipeline.py): `pipeline.py`

### Model tracks

- [Broad predictor](https://github.com/conorander/smart-clothesline/blob/master/broad/model.py): `broad/model.py`
- [Fine predictor](https://github.com/conorander/smart-clothesline/blob/master/fine/model.py): `fine/model.py`
- [Broad checkpoint](https://github.com/conorander/smart-clothesline/blob/master/broad/broad_model.pth): `broad/broad_model.pth`
- [Fine checkpoint](https://github.com/conorander/smart-clothesline/blob/master/fine/fine_model.pth): `fine/fine_model.pth`
- [Station CSV prep](https://github.com/conorander/smart-clothesline/blob/master/broad/preprocess.py): `broad/preprocess.py`
- [Sensor CSV prep](https://github.com/conorander/smart-clothesline/blob/master/fine/preprocess.py): `fine/preprocess.py`

### Model training

- [Broad training](https://github.com/conorander/smart-clothesline/blob/master/broad/train.py): `broad/train.py`
- [Fine training](https://github.com/conorander/smart-clothesline/blob/master/fine/train.py): `fine/train.py`
- [Broad training plots](https://github.com/conorander/smart-clothesline/blob/master/broad/PlotLogAccuracy.py): `broad/PlotLogAccuracy.py`
- [Fine training plots](https://github.com/conorander/smart-clothesline/blob/master/fine/PlotLogAccuracy.py): `fine/PlotLogAccuracy.py`

### Dashboard

- [Clothesline dashboard](https://github.com/conorander/smart-clothesline/blob/master/gui.py): `gui.py`
- [Dashboard styling](https://github.com/conorander/smart-clothesline/blob/master/styling.py): `styling.py`

### Other components

- **Scheduler or operator**
- **Met Éireann API**
- **Firebase Realtime DB**

## Connections

- Scheduler or operator → Inference pipeline: runs (evidence: `pipeline.py`)
- Inference pipeline → Met Éireann API: fetches observations (evidence: `pipeline.py`)
- Inference pipeline → Firebase Realtime DB: reads and writes (evidence: `pipeline.py`)
- Inference pipeline → Station features: builds features (evidence: `pipeline.py`)
- Inference pipeline → Broad predictor: predicts (evidence: `pipeline.py`)
- Inference pipeline → Fine predictor: predicts (evidence: `pipeline.py`)
- Inference pipeline → Broad checkpoint: loads weights (evidence: `pipeline.py`)
- Inference pipeline → Fine checkpoint: loads weights (evidence: `pipeline.py`)
- Clothesline dashboard → Firebase Realtime DB: reads readings (evidence: `gui.py`)
- Clothesline dashboard → Dashboard styling: uses styles (evidence: `gui.py`)
- Broad training → Station CSV prep: preprocesses CSV (evidence: `broad/train.py`)
- Broad training → Broad training plots: updates plots (evidence: `broad/train.py`)
- Broad training → Broad predictor: creates network (evidence: `broad/train.py`)
- Broad training → Broad checkpoint: saves weights (evidence: `broad/train.py`)
- Fine training → Sensor CSV prep: preprocesses CSV (evidence: `fine/train.py`)
- Fine training → Fine training plots: updates plots (evidence: `fine/train.py`)
- Fine training → Fine predictor: creates network (evidence: `fine/train.py`)
- Fine training → Fine checkpoint: saves weights (evidence: `fine/train.py`)
