# m0fxbandreas/rtl-sdr-commander-v5 architecture

> Architecture diagram of the GitHub repository m0fxbandreas/rtl-sdr-commander-v5, 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/m0fxbandreas/rtl-sdr-commander-v5
- Repository: https://github.com/m0fxbandreas/rtl-sdr-commander-v5

## Overview

HamTech RTL Commander is a browser-based console for receiving and listening to RTL-SDR radio signals. The user tunes a frequency and selects a mode in the console; receiver controls and streamed data are handled by the local Python service, which captures USB I/Q and processes it into spectrum data and audio. The console presents spectrum/waterfall displays and plays streamed PCM. Other documented receiver modes and tuning controls live in the console; the DX cluster is an independent, optional HamQTH feature. Some browser-to-service wiring and DSP orchestration are in omitted excerpts, so those links are marked unverified.

Main entry points: [`hamtec_usb_audio.py`](https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/hamtec_usb_audio.py) (WebSocket service), [`console.js`](https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/console.js) (Tuning and controls), [`dsp.py`](https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/dsp.py) (Receiver DSP), [`audio-player.js`](https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/audio-player.js) (PCM audio player)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_console["Radio console"]
  node_console_ui["Console interface<br/>[console.html]"]
  node_console_style["Console styling<br/>[console.css]"]
  node_radio_controls["Tuning and controls<br/>[console.js]"]
  node_spectrum_display["Spectrum and waterfall<br/>[console.js]"]
end

subgraph group_service["Receiver service"]
  node_receiver_service["WebSocket service"]
  node_control_validation["Control validation"]
  node_usb_capture["RTL-SDR capture"]
end

subgraph group_signal["Signal processing"]
  node_dsp_pipeline["Receiver DSP<br/>[dsp.py]"]
  node_notch_filters["Audio notch filters<br/>[audio_filters.py]"]
  node_noise_filters["Noise filters<br/>[noise_filters.py]"]
end

subgraph group_audio["Audio playback and DX"]
  node_audio_player["PCM audio player<br/>[audio-player.js]"]
  node_pcm_worklet["PCM playback worklet<br/>[pcm-worklet.js]"]
  node_dx_cluster["DX cluster feed<br/>[dx_cluster.py]"]
end

node_operator(("Radio operator"))
node_hamqth["HamQTH feed"]

node_operator -->|"tunes and configures"| node_radio_controls
node_console_ui -->|"uses styles"| node_console_style
node_radio_controls -.->|"sends controls"| node_receiver_service
node_receiver_service -->|"validates controls"| node_control_validation
node_receiver_service -->|"starts capture"| node_usb_capture
node_receiver_service -.->|"processes samples"| node_dsp_pipeline
node_dsp_pipeline -->|"uses"| node_notch_filters
node_dsp_pipeline -->|"uses"| node_noise_filters
node_receiver_service -.->|"streams spectrum"| node_spectrum_display
node_receiver_service -.->|"streams PCM"| node_audio_player
node_audio_player -->|"loads and feeds"| node_pcm_worklet
node_operator -->|"enables listening"| node_audio_player
node_receiver_service -->|"installs routes"| node_dx_cluster
node_dx_cluster -->|"fetches spots"| node_hamqth
node_radio_controls -.->|"requests spot overlay"| node_dx_cluster

click node_console_ui "https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/console.html"
click node_console_style "https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/console.css"
click node_radio_controls "https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/console.js"
click node_spectrum_display "https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/console.js"
click node_receiver_service "https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/hamtec_usb_audio.py"
click node_control_validation "https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/hamtec_usb_audio.py"
click node_usb_capture "https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/hamtec_usb_audio.py"
click node_dsp_pipeline "https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/dsp.py"
click node_notch_filters "https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/audio_filters.py"
click node_noise_filters "https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/noise_filters.py"
click node_audio_player "https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/audio-player.js"
click node_pcm_worklet "https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/pcm-worklet.js"
click node_dx_cluster "https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/dx_cluster.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_console_ui,node_console_style,node_radio_controls,node_spectrum_display toneBlue
class node_receiver_service,node_control_validation,node_usb_capture toneAmber
class node_dsp_pipeline,node_notch_filters,node_noise_filters toneMint
class node_audio_player,node_pcm_worklet,node_dx_cluster toneRose
class node_operator,node_hamqth toneIndigo
```

## Components

### Radio console

- [Console interface](https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/console.html): `console.html`
- [Console styling](https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/console.css): `console.css`
- [Tuning and controls](https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/console.js): `console.js`
- [Spectrum and waterfall](https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/console.js): `console.js`

### Receiver service

- [WebSocket service](https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/hamtec_usb_audio.py): `hamtec_usb_audio.py`
- [Control validation](https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/hamtec_usb_audio.py): `hamtec_usb_audio.py`
- [RTL-SDR capture](https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/hamtec_usb_audio.py): `hamtec_usb_audio.py`

### Signal processing

- [Receiver DSP](https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/dsp.py): `dsp.py`
- [Audio notch filters](https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/audio_filters.py): `audio_filters.py`
- [Noise filters](https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/noise_filters.py): `noise_filters.py`

### Audio playback and DX

- [PCM audio player](https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/audio-player.js): `audio-player.js`
- [PCM playback worklet](https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/pcm-worklet.js): `pcm-worklet.js`
- [DX cluster feed](https://github.com/m0fxbandreas/rtl-sdr-commander-v5/blob/main/dx_cluster.py): `dx_cluster.py`

### Other components

- **Radio operator**
- **HamQTH feed**

## Connections

- Radio operator → Tuning and controls: tunes and configures (evidence: `README.md`)
- Console interface → Console styling: uses styles
- Tuning and controls → WebSocket service: sends controls
- WebSocket service → Control validation: validates controls (evidence: `hamtec_usb_audio.py`)
- WebSocket service → RTL-SDR capture: starts capture (evidence: `hamtec_usb_audio.py`)
- WebSocket service → Receiver DSP: processes samples (evidence: `hamtec_usb_audio.py`)
- Receiver DSP → Audio notch filters: uses (evidence: `dsp.py`)
- Receiver DSP → Noise filters: uses (evidence: `dsp.py`)
- WebSocket service → Spectrum and waterfall: streams spectrum
- WebSocket service → PCM audio player: streams PCM
- PCM audio player → PCM playback worklet: loads and feeds (evidence: `audio-player.js`)
- Radio operator → PCM audio player: enables listening
- WebSocket service → DX cluster feed: installs routes (evidence: `hamtec_usb_audio.py`)
- DX cluster feed → HamQTH feed: fetches spots (evidence: `dx_cluster.py`)
- Tuning and controls → DX cluster feed: requests spot overlay
