# b0z0dcl0wn/signalsweep architecture

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

## Overview

SignalSweep is a headless counter-surveillance scanner with an optional web/Android control app. Its main workflow is to scan nearby BLE and Wi-Fi traffic, identify threats, alert locally, and optionally show live findings or record evidence through the app. Distinct capabilities include Remote ID decoding, configurable signatures and attack detection, tracker hunting, site-survey capture, and persistent logs. The sampled code confirms boot and mode startup, hardware alerts, and app interactions; some feature-level wiring is not shown, so uncertain links are omitted.

Main entry points: [`firmware/src/mode_watchers_watch.cpp`](https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/mode_watchers_watch.cpp) (Signal detection), [`firmware/src/main.cpp`](https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/main.cpp) (Firmware boot), [`app/public/app.js`](https://github.com/b0z0dcl0wn/signalsweep/blob/main/app/public/app.js) (Live app), [`firmware/src/hardware_manager.cpp`](https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/hardware_manager.cpp) (Sound and lights)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Control app"]
  node_appui["Live app<br/>[app.js]"]
end

subgraph group_runtime["Firmware runtime"]
  node_firmware["Firmware boot<br/>[main.cpp]"]
  node_mode["Mode manager<br/>[mode_manager.cpp]"]
  node_transport["BLE and USB protocol<br/>[ble_serial.cpp]"]
  node_hardware["Sound and lights"]
end

subgraph group_detection["Detection capabilities"]
  node_watcher["Signal detection"]
  node_attack["Attack detection<br/>[attack_detectors.h]"]
  node_axon["Agency signatures<br/>[axon_checks.h]"]
  node_remoteid["Remote ID decode<br/>[opendroneid.c]"]
  node_wifiid["Wi-Fi Remote ID<br/>[odid_wifi.c]"]
end

subgraph group_records["Logs and capture"]
  node_capture["Site survey capture<br/>[mode_capture.cpp]"]
  node_alertlog[("Alert history<br/>[alert_log.cpp]")]
  node_sdstore[("SD card files<br/>[sd_store.cpp]")]
  node_crash[("Crash reports<br/>[crash_report.cpp]")]
end

node_operator(("Operator"))
node_nearby(("Nearby signals"))

node_operator -->|"controls"| node_appui
node_nearby -->|"emits signals"| node_watcher
node_firmware -->|"initializes"| node_crash
node_firmware -->|"initializes"| node_hardware
node_firmware -->|"initializes"| node_alertlog
node_firmware -->|"probes card"| node_sdstore
node_mode -->|"sets mode"| node_hardware
node_mode -->|"starts detector"| node_watcher
node_appui -->|"sends commands"| node_transport
node_transport -->|"sends live data"| node_appui
node_watcher -.->|"alerts locally"| node_hardware
node_watcher -.->|"records alerts"| node_alertlog
node_watcher -.->|"checks attacks"| node_attack
node_watcher -.->|"checks signatures"| node_axon
node_watcher -.->|"decodes drone ID"| node_remoteid
node_watcher -.->|"decodes Wi-Fi ID"| node_wifiid
node_appui -.->|"requests survey"| node_capture
node_capture -.->|"stores captures"| node_sdstore

click node_appui "https://github.com/b0z0dcl0wn/signalsweep/blob/main/app/public/app.js"
click node_firmware "https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/main.cpp"
click node_mode "https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/mode_manager.cpp"
click node_transport "https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/ble_serial.cpp"
click node_hardware "https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/hardware_manager.cpp"
click node_watcher "https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/mode_watchers_watch.cpp"
click node_attack "https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/attack_detectors.h"
click node_axon "https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/axon_checks.h"
click node_remoteid "https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/opendroneid.c"
click node_wifiid "https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/odid_wifi.c"
click node_capture "https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/mode_capture.cpp"
click node_alertlog "https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/alert_log.cpp"
click node_sdstore "https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/sd_store.cpp"
click node_crash "https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/crash_report.cpp"

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_appui toneBlue
class node_firmware,node_mode,node_transport,node_hardware toneAmber
class node_watcher,node_attack,node_axon,node_remoteid,node_wifiid toneMint
class node_capture,node_alertlog,node_sdstore,node_crash toneRose
class node_operator,node_nearby toneIndigo
```

## Components

### Control app

- [Live app](https://github.com/b0z0dcl0wn/signalsweep/blob/main/app/public/app.js): `app/public/app.js`

### Firmware runtime

- [Firmware boot](https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/main.cpp): `firmware/src/main.cpp`
- [Mode manager](https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/mode_manager.cpp): `firmware/src/mode_manager.cpp`
- [BLE and USB protocol](https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/ble_serial.cpp): `firmware/src/ble_serial.cpp`
- [Sound and lights](https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/hardware_manager.cpp): `firmware/src/hardware_manager.cpp`

### Detection capabilities

- [Signal detection](https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/mode_watchers_watch.cpp): `firmware/src/mode_watchers_watch.cpp`
- [Attack detection](https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/attack_detectors.h): `firmware/src/attack_detectors.h`
- [Agency signatures](https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/axon_checks.h): `firmware/src/axon_checks.h`
- [Remote ID decode](https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/opendroneid.c): `firmware/src/opendroneid.c`
- [Wi-Fi Remote ID](https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/odid_wifi.c): `firmware/src/odid_wifi.c`

### Logs and capture

- [Site survey capture](https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/mode_capture.cpp): `firmware/src/mode_capture.cpp`
- [Alert history](https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/alert_log.cpp): `firmware/src/alert_log.cpp`
- [SD card files](https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/sd_store.cpp): `firmware/src/sd_store.cpp`
- [Crash reports](https://github.com/b0z0dcl0wn/signalsweep/blob/main/firmware/src/crash_report.cpp): `firmware/src/crash_report.cpp`

### Other components

- **Operator**
- **Nearby signals**

## Connections

- Operator → Live app: controls (evidence: `README.md`)
- Nearby signals → Signal detection: emits signals (evidence: `README.md`)
- Firmware boot → Crash reports: initializes (evidence: `firmware/src/main.cpp`)
- Firmware boot → Sound and lights: initializes (evidence: `firmware/src/main.cpp`)
- Firmware boot → Alert history: initializes (evidence: `firmware/src/main.cpp`)
- Firmware boot → SD card files: probes card (evidence: `firmware/src/main.cpp`)
- Mode manager → Sound and lights: sets mode (evidence: `firmware/src/mode_manager.cpp`)
- Mode manager → Signal detection: starts detector (evidence: `firmware/src/mode_manager.cpp`)
- Live app → BLE and USB protocol: sends commands (evidence: `README.md`)
- BLE and USB protocol → Live app: sends live data (evidence: `README.md`)
- Signal detection → Sound and lights: alerts locally
- Signal detection → Alert history: records alerts
- Signal detection → Attack detection: checks attacks (evidence: `firmware/src/mode_watchers_watch.cpp`)
- Signal detection → Agency signatures: checks signatures (evidence: `firmware/src/mode_watchers_watch.cpp`)
- Signal detection → Remote ID decode: decodes drone ID
- Signal detection → Wi-Fi Remote ID: decodes Wi-Fi ID
- Live app → Site survey capture: requests survey
- Site survey capture → SD card files: stores captures
