# agg-kantas/pico-wifi architecture

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

- Interactive diagram: https://gitdiagram.com/agg-kantas/pico-wifi
- Repository: https://github.com/agg-kantas/pico-wifi

## Overview

Pico WiFi Manager monitors a Pico's WiFi connection and sends connection metadata and periodic RSSI readings to a host over TCP. The host accepts JSON reports, appends them to a JSONL log, and a separate plotting script visualizes RSSI over time. The graph follows the client-to-host workflow and preserves the separate visualization stage. The README also mentions boot and systemd startup; those deployment details are excluded. The excerpts show the runtime calls; the plotting script's log read is documented in its source, though the README refers to a differently named script.

Main entry points: [`main.py`](https://github.com/agg-kantas/pico-wifi/blob/main/main.py) (WiFi monitor), [`daemon/receiver.py`](https://github.com/agg-kantas/pico-wifi/blob/main/daemon/receiver.py) (TCP receiver), [`wificonfig-example.py`](https://github.com/agg-kantas/pico-wifi/blob/main/wificonfig-example.py) (WiFi settings), [`daemon/rssi_graph.py`](https://github.com/agg-kantas/pico-wifi/blob/main/daemon/rssi_graph.py) (RSSI plotter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_device["Pico WiFi client"]
  node_wifi["WiFi monitor<br/>[main.py]"]
  node_config["WiFi settings"]
end

subgraph group_host["Host data service"]
  node_receiver["TCP receiver<br/>[receiver.py]"]
  node_log[("JSONL log")]
end

subgraph group_viz["RSSI visualization"]
  node_plot["RSSI plotter<br/>[rssi_graph.py]"]
end

node_pico(("Pico device"))

node_pico -->|"runs"| node_wifi
node_config -->|"configures"| node_wifi
node_wifi -->|"sends JSON"| node_receiver
node_receiver -->|"appends reports"| node_log
node_plot -->|"reads RSSI"| node_log

click node_wifi "https://github.com/agg-kantas/pico-wifi/blob/main/main.py"
click node_config "https://github.com/agg-kantas/pico-wifi/blob/main/wificonfig-example.py"
click node_receiver "https://github.com/agg-kantas/pico-wifi/blob/main/daemon/receiver.py"
click node_plot "https://github.com/agg-kantas/pico-wifi/blob/main/daemon/rssi_graph.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_wifi,node_config toneBlue
class node_receiver,node_log toneAmber
class node_plot toneMint
class node_pico toneIndigo
```

## Components

### Pico WiFi client

- [WiFi monitor](https://github.com/agg-kantas/pico-wifi/blob/main/main.py): `main.py`
- [WiFi settings](https://github.com/agg-kantas/pico-wifi/blob/main/wificonfig-example.py): `wificonfig-example.py`

### Host data service

- [TCP receiver](https://github.com/agg-kantas/pico-wifi/blob/main/daemon/receiver.py): `daemon/receiver.py`
- **JSONL log**

### RSSI visualization

- [RSSI plotter](https://github.com/agg-kantas/pico-wifi/blob/main/daemon/rssi_graph.py): `daemon/rssi_graph.py`

### Other components

- **Pico device**

## Connections

- Pico device → WiFi monitor: runs (evidence: `README.md`)
- WiFi settings → WiFi monitor: configures (evidence: `main.py`)
- WiFi monitor → TCP receiver: sends JSON (evidence: `main.py`)
- TCP receiver → JSONL log: appends reports (evidence: `daemon/receiver.py`)
- RSSI plotter → JSONL log: reads RSSI (evidence: `daemon/rssi_graph.py`)
