# cyberjsec47/signal-sentinel architecture

> Architecture diagram of the GitHub repository cyberjsec47/signal-sentinel, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cyberjsec47/signal-sentinel
- Repository: https://github.com/cyberjsec47/signal-sentinel

## Overview

##### Project type and purpose
- This is an embedded machine-learning detection system (“Signal Sentinel”) that passively detects RF-jamming attacks.
- It consists of two main environments:
a. A development/training environment (desktop/server) where you collect data, extract features, and train a classification model.
b. A production/embedded environment (Raspberry Pi + RTL-SDR) that runs the trained model in real time, classifies signals, and raises alerts or triggers mitigation integration.

##### File structure
Top-level files:
- Calculations.py, FeatureReduction.py, Functions.py – modules for signal processing and feature preparation.
- ModelTraining.py – generates/trains the ML model using preprocessed data.
- Main.py – orchestrates end-to-end pipeline in a general (possibly desktop) environment.
- requirements.txt – Python dependencies for development.
RaspberryPi/ directory:
- RaspberryInterface.py – interfaces with GPIO or network for alerts/mitigation.
- Functions.py – likely a subset of processing routines tailored to the Pi.
- requirements.txt – runtime dependencies for the embedded device.

##### README for additional insights
- Purpose: protect IoT or vehicles from RF jamming by detecting anomalous signal patterns.
- Architecture: passive detection only; integrates with other systems to handle mitigation.
- Hardware: Raspberry Pi running Python + RTL-SDR dongle.
- Software stack: Python + ML libraries (e.g., scikit-learn or TensorFlow), SDR libraries (e.g., pyrtlsdr), GPIO/network modules.

## Diagram (Mermaid)

```mermaid
flowchart TB
  subgraph "Development/Training"
    direction TB
    DataStore["Training Data Store"]:::data
    FunctionsShared["Functions.py"]:::software
    Calc["Calculations.py"]:::software
    FR["FeatureReduction.py"]:::software
    ModelTrain["ModelTraining.py"]:::software
    MainDesktop["Main.py (Desktop Pipeline)"]:::software
    DevReq["requirements.txt"]:::config
    ModelArt["Model Artifact (.pkl)"]:::data
  end

  subgraph "Production/Embedded Environment"
    direction TB
    HW["RTL-SDR Dongle"]:::hardware
    PiOS["Raspberry Pi OS"]:::hardware
    PI_Req["RaspberryPi/requirements.txt"]:::config
    PI_Func["RaspberryPi/Functions.py"]:::software
    PI_Calc["Calculations.py"]:::software
    PI_FR["FeatureReduction.py"]:::software
    MainPi["Main.py (Pi Inference)"]:::software
    AlertInt["RaspberryInterface.py"]:::software
    ExtSys["External Systems"]:::external
  end

  DataStore -->|"raw IQ / .csv features"| FunctionsShared
  FunctionsShared -->|"calls transform()"| Calc
  Calc -->|"reduced features"| FR
  FR -->|"training data"| ModelTrain
  ModelTrain -->|".pkl model"| ModelArt
  ModelArt -->|"deployed model"| MainPi

  HW -->|"IQ samples"| PI_Func
  PI_Func -->|"calls transform()"| PI_Calc
  PI_Calc -->|"reduced features"| PI_FR
  PI_FR -->|"features"| MainPi
  MainPi -->|"classification"| AlertInt
  AlertInt -->|"Alert (GPIO/HTTP)"| ExtSys

  click FunctionsShared "https://github.com/cyberjsec47/signal-sentinel/blob/main/Functions.py"
  click Calc "https://github.com/cyberjsec47/signal-sentinel/blob/main/Calculations.py"
  click FR "https://github.com/cyberjsec47/signal-sentinel/blob/main/FeatureReduction.py"
  click ModelTrain "https://github.com/cyberjsec47/signal-sentinel/blob/main/ModelTraining.py"
  click MainDesktop "https://github.com/cyberjsec47/signal-sentinel/blob/main/Main.py"
  click ModelArt "https://github.com/cyberjsec47/signal-sentinel/blob/main/ModelTraining.py"
  click DevReq "https://github.com/cyberjsec47/signal-sentinel/blob/main/requirements.txt"
  click PI_Req "https://github.com/cyberjsec47/signal-sentinel/blob/main/RaspberryPi/requirements.txt"
  click PI_Func "https://github.com/cyberjsec47/signal-sentinel/blob/main/RaspberryPi/Functions.py"
  click AlertInt "https://github.com/cyberjsec47/signal-sentinel/blob/main/RaspberryPi/RaspberryInterface.py"

  classDef software fill:#add8e6,stroke:#000,stroke-width:1px
  classDef hardware fill:#90ee90,stroke:#000,stroke-width:1px
  classDef data fill:#fff88f,stroke:#000,stroke-width:1px
  classDef config fill:#f0e68c,stroke:#000,stroke-width:1px
  classDef external fill:#d3d3d3,stroke:#000,stroke-width:1px
```
