# cq-dj0sh/tmv71-remote architecture

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

- Interactive diagram: https://gitdiagram.com/cq-dj0sh/tmv71-remote
- Repository: https://github.com/cq-dj0sh/tmv71-remote

## Overview

TM-V71 Remote is a browser-based control and operating console for a Kenwood TM-V71 radio. The operator uses the SPA to issue controls and memory operations; FastAPI routes requests through the radio service to the serial driver, while status returns live to the browser. Separate capabilities provide WebRTC audio, digital-mode decoding, SDR viewing, callsign recognition, and QSO logging. The graph reflects documented README flows and SOURCE INDEX references; unsampled route details are not inferred beyond those references.

Main entry points: [`backend/app/main.py`](https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/main.py) (REST and WebSocket API), [`backend/app/logbook.py`](https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/logbook.py) (QSO logbook), [`backend/app/tmv71.py`](https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/tmv71.py) (TM-V71 driver), [`backend/app/callsign_asr.py`](https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/callsign_asr.py) (Callsign recognition)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Browser interface"]
  node_frontend["Control SPA<br/>[app.js]"]
  node_api["REST and WebSocket API<br/>[main.py]"]
  node_models["API contracts<br/>[models.py]"]
end

subgraph group_radio["Radio control"]
  node_settings["Runtime settings<br/>[config.py]"]
  node_service["Radio service<br/>[radio_service.py]"]
  node_driver["TM-V71 driver<br/>[tmv71.py]"]
  node_memories["Memory channels<br/>[memory.py]"]
end

subgraph group_audio["Audio and signals"]
  node_audio["WebRTC audio bridge<br/>[webrtc_audio.py]"]
  node_digimodes["CW RTTY POCSAG<br/>[digimodes.py]"]
  node_aprs["APRS decoder<br/>[aprs.py]"]
  node_selcall["Selcall<br/>[selcall.py]"]
  node_sdr["HackRF waterfall<br/>[hackrf_sdr.py]"]
end

subgraph group_operator["Operator tools"]
  node_asr["Callsign recognition<br/>[callsign_asr.py]"]
  node_callsign_list[("Callsign registers<br/>[callsign_list.py]")]
  node_speaker["Speaker profiles<br/>[speaker_id.py]"]
  node_logbook["QSO logbook<br/>[logbook.py]"]
end

node_operator(("Radio operator"))
node_radio_hw["TM-V71 radio"]
node_sound["USB sound interface"]
node_hackrf["HackRF One"]
node_wavelog["Wavelog service"]
node_qrz["QRZ lookup"]

node_operator -->|"uses"| node_frontend
node_frontend -->|"sends requests"| node_api
node_api -->|"uses contracts"| node_models
node_api -->|"delegates radio control"| node_service
node_service -->|"commands"| node_driver
node_driver -->|"serial CAT"| node_radio_hw
node_api -->|"handles memory operations"| node_memories
node_memories -->|"reads and writes channels"| node_driver
node_api -->|"configures runtime"| node_settings
node_api -->|"handles WebRTC signaling"| node_audio
node_audio -->|"captures and plays audio"| node_sound
node_api -->|"routes digital modes"| node_digimodes
node_api -->|"routes APRS"| node_aprs
node_api -->|"routes selcall"| node_selcall
node_api -->|"routes SDR panel"| node_sdr
node_sdr -.->|"reads spectrum"| node_hackrf
node_api -->|"runs callsign recognition"| node_asr
node_asr -.->|"checks callsigns"| node_callsign_list
node_api -->|"manages voice profiles"| node_speaker
node_speaker -->|"uses recognition"| node_asr
node_api -->|"routes QSO logging"| node_logbook
node_logbook -->|"logs contacts"| node_wavelog
node_logbook -->|"looks up callsigns"| node_qrz

click node_frontend "https://github.com/cq-dj0sh/tmv71-remote/blob/main/frontend/app.js"
click node_api "https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/main.py"
click node_models "https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/models.py"
click node_settings "https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/config.py"
click node_service "https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/radio_service.py"
click node_driver "https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/tmv71.py"
click node_memories "https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/memory.py"
click node_audio "https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/webrtc_audio.py"
click node_digimodes "https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/digimodes.py"
click node_aprs "https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/aprs.py"
click node_selcall "https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/selcall.py"
click node_sdr "https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/hackrf_sdr.py"
click node_asr "https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/callsign_asr.py"
click node_callsign_list "https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/callsign_list.py"
click node_speaker "https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/speaker_id.py"
click node_logbook "https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/logbook.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_frontend,node_api,node_models toneBlue
class node_settings,node_service,node_driver,node_memories toneAmber
class node_audio,node_digimodes,node_aprs,node_selcall,node_sdr toneMint
class node_asr,node_callsign_list,node_speaker,node_logbook toneRose
class node_operator,node_radio_hw,node_sound,node_hackrf,node_wavelog,node_qrz toneIndigo
```

## Components

### Browser interface

- [Control SPA](https://github.com/cq-dj0sh/tmv71-remote/blob/main/frontend/app.js): `frontend/app.js`
- [REST and WebSocket API](https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/main.py): `backend/app/main.py`
- [API contracts](https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/models.py): `backend/app/models.py`

### Radio control

- [Runtime settings](https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/config.py): `backend/app/config.py`
- [Radio service](https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/radio_service.py): `backend/app/radio_service.py`
- [TM-V71 driver](https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/tmv71.py): `backend/app/tmv71.py`
- [Memory channels](https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/memory.py): `backend/app/memory.py`

### Audio and signals

- [WebRTC audio bridge](https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/webrtc_audio.py): `backend/app/webrtc_audio.py`
- [CW RTTY POCSAG](https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/digimodes.py): `backend/app/digimodes.py`
- [APRS decoder](https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/aprs.py): `backend/app/aprs.py`
- [Selcall](https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/selcall.py): `backend/app/selcall.py`
- [HackRF waterfall](https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/hackrf_sdr.py): `backend/app/hackrf_sdr.py`

### Operator tools

- [Callsign recognition](https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/callsign_asr.py): `backend/app/callsign_asr.py`
- [Callsign registers](https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/callsign_list.py): `backend/app/callsign_list.py`
- [Speaker profiles](https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/speaker_id.py): `backend/app/speaker_id.py`
- [QSO logbook](https://github.com/cq-dj0sh/tmv71-remote/blob/main/backend/app/logbook.py): `backend/app/logbook.py`

### Other components

- **Radio operator**
- **TM-V71 radio**
- **USB sound interface**
- **HackRF One**
- **Wavelog service**
- **QRZ lookup**

## Connections

- Radio operator → Control SPA: uses (evidence: `README.md`)
- Control SPA → REST and WebSocket API: sends requests (evidence: `README.md`)
- REST and WebSocket API → API contracts: uses contracts (evidence: `backend/app/main.py`)
- REST and WebSocket API → Radio service: delegates radio control (evidence: `backend/app/main.py`)
- Radio service → TM-V71 driver: commands (evidence: `backend/app/radio_service.py`)
- TM-V71 driver → TM-V71 radio: serial CAT (evidence: `README.md`)
- REST and WebSocket API → Memory channels: handles memory operations (evidence: `backend/app/main.py`)
- Memory channels → TM-V71 driver: reads and writes channels (evidence: `backend/app/memory.py`)
- REST and WebSocket API → Runtime settings: configures runtime (evidence: `backend/app/main.py`)
- REST and WebSocket API → WebRTC audio bridge: handles WebRTC signaling (evidence: `README.md`)
- WebRTC audio bridge → USB sound interface: captures and plays audio (evidence: `README.md`)
- REST and WebSocket API → CW RTTY POCSAG: routes digital modes (evidence: `backend/app/main.py`)
- REST and WebSocket API → APRS decoder: routes APRS (evidence: `backend/app/main.py`)
- REST and WebSocket API → Selcall: routes selcall (evidence: `backend/app/main.py`)
- REST and WebSocket API → HackRF waterfall: routes SDR panel (evidence: `backend/app/main.py`)
- HackRF waterfall → HackRF One: reads spectrum
- REST and WebSocket API → Callsign recognition: runs callsign recognition (evidence: `backend/app/main.py`)
- Callsign recognition → Callsign registers: checks callsigns
- REST and WebSocket API → Speaker profiles: manages voice profiles (evidence: `backend/app/main.py`)
- Speaker profiles → Callsign recognition: uses recognition (evidence: `backend/app/speaker_id.py`)
- REST and WebSocket API → QSO logbook: routes QSO logging (evidence: `backend/app/main.py`)
- QSO logbook → Wavelog service: logs contacts (evidence: `README.md`)
- QSO logbook → QRZ lookup: looks up callsigns (evidence: `README.md`)
