# thedavinder01/secure-radio-frequency-monitoring-system architecture

> Architecture diagram of the GitHub repository thedavinder01/secure-radio-frequency-monitoring-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/thedavinder01/secure-radio-frequency-monitoring-system
- Repository: https://github.com/thedavinder01/secure-radio-frequency-monitoring-system

## Overview

This is ESP32 firmware for a secure RF monitoring device. Its principal workflow is fingerprint-gated access, followed by periodic Wi-Fi/BLE monitoring and LoRa reception, with status shown on the OLED and events logged to SD; authenticated users can transmit over LoRa or NRF24. The README describes the monitoring and alerting goal, but the excerpt does not establish automatic anomaly detection or alert rules. The single source file combines orchestration and device features, so relationships are shown only where the excerpt supports them.

Main entry points: [`RF .c`](https://github.com/thedavinder01/secure-radio-frequency-monitoring-system/blob/main/RF%20.c) (Firmware Loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Access and Control"]
  node_firmware["Firmware Loop<br/>[RF .c]"]
  node_fingerprint["Fingerprint Access<br/>[RF .c]"]
end

subgraph group_monitor["Spectrum Monitoring"]
  node_wifi["Wi-Fi Scan<br/>[RF .c]"]
  node_ble["BLE Monitor<br/>[RF .c]"]
end

subgraph group_radio["Radio Communication"]
  node_lora_rx["LoRa Receive<br/>[RF .c]"]
  node_lora_tx["LoRa Transmit<br/>[RF .c]"]
  node_nrf_tx["NRF24 Transmit<br/>[RF .c]"]
end

subgraph group_interfaces["Device Interfaces"]
  node_display["OLED Status<br/>[RF .c]"]
  node_logging["SD Event Log<br/>[RF .c]"]
  node_rtc["Clock<br/>[RF .c]"]
end

node_user(("Operator"))
node_oled_device["OLED"]
node_sd_card[("SD Card")]
node_rtc_device["RTC"]
node_finger_sensor["Fingerprint Sensor"]
node_wifi_environment["Wi-Fi Environment"]
node_ble_environment["BLE Environment"]
node_lora_peer["LoRa Peer"]
node_nrf_peer["NRF24 Peer"]

node_user -.->|"operates"| node_firmware
node_firmware -->|"checks access"| node_fingerprint
node_fingerprint -->|"reads prints"| node_finger_sensor
node_firmware -->|"runs scans"| node_wifi
node_wifi -->|"scans networks"| node_wifi_environment
node_firmware -->|"runs monitor"| node_ble
node_ble -.->|"monitors"| node_ble_environment
node_firmware -->|"checks packets"| node_lora_rx
node_lora_rx -->|"receives packets"| node_lora_peer
node_firmware -.->|"invokes send"| node_lora_tx
node_lora_tx -->|"sends packets"| node_lora_peer
node_firmware -.->|"invokes send"| node_nrf_tx
node_nrf_tx -->|"writes radio"| node_nrf_peer
node_firmware -->|"updates status"| node_display
node_display -->|"renders"| node_oled_device
node_firmware -->|"logs events"| node_logging
node_logging -->|"writes records"| node_sd_card
node_firmware -->|"reads time"| node_rtc
node_rtc -->|"gets clock"| node_rtc_device

click node_firmware "https://github.com/thedavinder01/secure-radio-frequency-monitoring-system/blob/main/RF%20.c"
click node_fingerprint "https://github.com/thedavinder01/secure-radio-frequency-monitoring-system/blob/main/RF%20.c"
click node_wifi "https://github.com/thedavinder01/secure-radio-frequency-monitoring-system/blob/main/RF%20.c"
click node_ble "https://github.com/thedavinder01/secure-radio-frequency-monitoring-system/blob/main/RF%20.c"
click node_lora_rx "https://github.com/thedavinder01/secure-radio-frequency-monitoring-system/blob/main/RF%20.c"
click node_lora_tx "https://github.com/thedavinder01/secure-radio-frequency-monitoring-system/blob/main/RF%20.c"
click node_nrf_tx "https://github.com/thedavinder01/secure-radio-frequency-monitoring-system/blob/main/RF%20.c"
click node_display "https://github.com/thedavinder01/secure-radio-frequency-monitoring-system/blob/main/RF%20.c"
click node_logging "https://github.com/thedavinder01/secure-radio-frequency-monitoring-system/blob/main/RF%20.c"
click node_rtc "https://github.com/thedavinder01/secure-radio-frequency-monitoring-system/blob/main/RF%20.c"

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_firmware,node_fingerprint toneBlue
class node_wifi,node_ble,node_sd_card toneAmber
class node_lora_rx,node_lora_tx,node_nrf_tx toneMint
class node_display,node_logging,node_rtc toneRose
class node_user,node_oled_device,node_rtc_device,node_finger_sensor,node_wifi_environment,node_ble_environment,node_lora_peer,node_nrf_peer toneIndigo
```

## Components

### Access and Control

- [Firmware Loop](https://github.com/thedavinder01/secure-radio-frequency-monitoring-system/blob/main/RF%20.c): `RF .c`
- [Fingerprint Access](https://github.com/thedavinder01/secure-radio-frequency-monitoring-system/blob/main/RF%20.c): `RF .c`

### Spectrum Monitoring

- [Wi-Fi Scan](https://github.com/thedavinder01/secure-radio-frequency-monitoring-system/blob/main/RF%20.c): `RF .c`
- [BLE Monitor](https://github.com/thedavinder01/secure-radio-frequency-monitoring-system/blob/main/RF%20.c): `RF .c`

### Radio Communication

- [LoRa Receive](https://github.com/thedavinder01/secure-radio-frequency-monitoring-system/blob/main/RF%20.c): `RF .c`
- [LoRa Transmit](https://github.com/thedavinder01/secure-radio-frequency-monitoring-system/blob/main/RF%20.c): `RF .c`
- [NRF24 Transmit](https://github.com/thedavinder01/secure-radio-frequency-monitoring-system/blob/main/RF%20.c): `RF .c`

### Device Interfaces

- [OLED Status](https://github.com/thedavinder01/secure-radio-frequency-monitoring-system/blob/main/RF%20.c): `RF .c`
- [SD Event Log](https://github.com/thedavinder01/secure-radio-frequency-monitoring-system/blob/main/RF%20.c): `RF .c`
- [Clock](https://github.com/thedavinder01/secure-radio-frequency-monitoring-system/blob/main/RF%20.c): `RF .c`

### Other components

- **Operator**
- **OLED**
- **SD Card**
- **RTC**
- **Fingerprint Sensor**
- **Wi-Fi Environment**
- **BLE Environment**
- **LoRa Peer**
- **NRF24 Peer**

## Connections

- Operator → Firmware Loop: operates (evidence: `README.md`)
- Firmware Loop → Fingerprint Access: checks access (evidence: `RF .c`)
- Fingerprint Access → Fingerprint Sensor: reads prints (evidence: `RF .c`)
- Firmware Loop → Wi-Fi Scan: runs scans (evidence: `RF .c`)
- Wi-Fi Scan → Wi-Fi Environment: scans networks (evidence: `RF .c`)
- Firmware Loop → BLE Monitor: runs monitor (evidence: `RF .c`)
- BLE Monitor → BLE Environment: monitors (evidence: `RF .c`)
- Firmware Loop → LoRa Receive: checks packets (evidence: `RF .c`)
- LoRa Receive → LoRa Peer: receives packets (evidence: `RF .c`)
- Firmware Loop → LoRa Transmit: invokes send (evidence: `RF .c`)
- LoRa Transmit → LoRa Peer: sends packets (evidence: `RF .c`)
- Firmware Loop → NRF24 Transmit: invokes send (evidence: `RF .c`)
- NRF24 Transmit → NRF24 Peer: writes radio (evidence: `RF .c`)
- Firmware Loop → OLED Status: updates status (evidence: `RF .c`)
- OLED Status → OLED: renders (evidence: `RF .c`)
- Firmware Loop → SD Event Log: logs events (evidence: `RF .c`)
- SD Event Log → SD Card: writes records (evidence: `RF .c`)
- Firmware Loop → Clock: reads time (evidence: `RF .c`)
- Clock → RTC: gets clock (evidence: `RF .c`)
