# devansh-567/sih-2026 architecture

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

- Interactive diagram: https://gitdiagram.com/devansh-567/sih-2026
- Repository: https://github.com/devansh-567/sih-2026

## Overview

RF Signal Analysis Platform is a local-first RF recording analysis backend with a React analyst GUI. The main workflow uploads IQ/WAV or SigMF recordings, ingests samples and metadata, runs staged DSP/ML analysis through demodulation, FEC/interleaving and bitstream hypotheses, then presents evidence-backed results. Analysts can also inspect waterfalls, batch and compare history, give feedback, and export reports. The README documents these capabilities; some subsystem links below rely on its statements or the SOURCE INDEX because their implementations were not excerpted.

Main entry points: [`rfplatform/pipeline/stages.py`](https://github.com/devansh-567/sih-2026/blob/main/rfplatform/pipeline/stages.py) (Analysis orchestration), [`rfplatform/api/main.py`](https://github.com/devansh-567/sih-2026/blob/main/rfplatform/api/main.py) (HTTP API), [`frontend/src/App.tsx`](https://github.com/devansh-567/sih-2026/blob/main/frontend/src/App.tsx) (Analysis workspace), [`rfplatform/models/schema.py`](https://github.com/devansh-567/sih-2026/blob/main/rfplatform/models/schema.py) (Evidence schema)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Analyst GUI"]
  node_app["Analysis workspace<br/>[App.tsx]"]
  node_client["API client<br/>[api.ts]"]
  node_findings["Evidence findings"]
  node_demodui["Demod and FEC views<br/>[DemodPanel.tsx]"]
end

subgraph group_api["API and records"]
  node_api_main["HTTP API<br/>[main.py]"]
  node_storage[("Analysis history<br/>[db.py]")]
  node_compare["History comparison<br/>[compare.py]"]
end

subgraph group_analysis["Signal analysis"]
  node_ingest["Recording ingestion<br/>[formats.py]"]
  node_pipeline["Analysis orchestration<br/>[stages.py]"]
  node_estimators["DSP estimation<br/>[estimators.py]"]
  node_classifier["Modulation classifier<br/>[classifier.py]"]
  node_demod["Signal demodulation<br/>[demodulate.py]"]
  node_fec["FEC decoding<br/>[convolutional.py]"]
  node_reedsolomon["Reed-Solomon<br/>[reed_solomon.py]"]
  node_interleave["De-interleaving<br/>[interleavers.py]"]
  node_bitstream["Bitstream framing<br/>[bitstream.py]"]
  node_fusion["Confidence fusion<br/>[fusion.py]"]
  node_schema["Evidence schema<br/>[schema.py]"]
end

subgraph group_ml["ML and synthesis"]
  node_ml_inference["ML inference<br/>[inference.py]"]
  node_ml_model["CNN model<br/>[model.py]"]
  node_synth["Synthetic signals<br/>[generator.py]"]
end

subgraph group_output["Results and exports"]
  node_report["Report export<br/>[generator.py]"]
end

node_analyst(("Analyst"))

node_analyst -->|"uses"| node_app
node_app -->|"requests"| node_client
node_client -.->|"calls API"| node_api_main
node_api_main -->|"loads recordings"| node_ingest
node_api_main -->|"runs analysis"| node_pipeline
node_pipeline -->|"extracts features"| node_estimators
node_pipeline -->|"classifies modulation"| node_classifier
node_pipeline -->|"demodulates"| node_demod
node_pipeline -->|"tests convolutional codes"| node_fec
node_pipeline -->|"tests RS codes"| node_reedsolomon
node_pipeline -->|"tests interleavers"| node_interleave
node_pipeline -->|"analyzes framing"| node_bitstream
node_pipeline -->|"requests inference"| node_ml_inference
node_pipeline -->|"combines evidence"| node_fusion
node_ml_inference -->|"runs model"| node_ml_model
node_ml_inference -->|"returns parameters"| node_schema
node_fusion -->|"uses evidence types"| node_schema
node_pipeline -->|"builds results"| node_schema
node_api_main -->|"persists analyses"| node_storage
node_api_main -->|"exports results"| node_report
node_api_main -->|"compares history"| node_compare
node_storage -.->|"provides stored analyses"| node_compare
node_synth -.->|"supplies training signals"| node_ml_model
node_app -->|"renders"| node_findings
node_app -->|"renders"| node_demodui
node_findings -.->|"displays parameters"| node_schema
node_client -->|"requests export"| node_report

click node_app "https://github.com/devansh-567/sih-2026/blob/main/frontend/src/App.tsx"
click node_client "https://github.com/devansh-567/sih-2026/blob/main/frontend/src/lib/api.ts"
click node_findings "https://github.com/devansh-567/sih-2026/blob/main/frontend/src/components/AutomaticAnalysisPanel.tsx"
click node_demodui "https://github.com/devansh-567/sih-2026/blob/main/frontend/src/components/DemodPanel.tsx"
click node_api_main "https://github.com/devansh-567/sih-2026/blob/main/rfplatform/api/main.py"
click node_ingest "https://github.com/devansh-567/sih-2026/blob/main/rfplatform/io/formats.py"
click node_pipeline "https://github.com/devansh-567/sih-2026/blob/main/rfplatform/pipeline/stages.py"
click node_estimators "https://github.com/devansh-567/sih-2026/blob/main/rfplatform/dsp/estimators.py"
click node_classifier "https://github.com/devansh-567/sih-2026/blob/main/rfplatform/dsp/classifier.py"
click node_demod "https://github.com/devansh-567/sih-2026/blob/main/rfplatform/dsp/demodulate.py"
click node_fec "https://github.com/devansh-567/sih-2026/blob/main/rfplatform/fec/convolutional.py"
click node_reedsolomon "https://github.com/devansh-567/sih-2026/blob/main/rfplatform/fec/reed_solomon.py"
click node_interleave "https://github.com/devansh-567/sih-2026/blob/main/rfplatform/interleave/interleavers.py"
click node_bitstream "https://github.com/devansh-567/sih-2026/blob/main/rfplatform/pipeline/bitstream.py"
click node_fusion "https://github.com/devansh-567/sih-2026/blob/main/rfplatform/pipeline/fusion.py"
click node_schema "https://github.com/devansh-567/sih-2026/blob/main/rfplatform/models/schema.py"
click node_ml_inference "https://github.com/devansh-567/sih-2026/blob/main/rfplatform/ml/inference.py"
click node_ml_model "https://github.com/devansh-567/sih-2026/blob/main/rfplatform/ml/model.py"
click node_synth "https://github.com/devansh-567/sih-2026/blob/main/rfplatform/synth/generator.py"
click node_storage "https://github.com/devansh-567/sih-2026/blob/main/rfplatform/storage/db.py"
click node_compare "https://github.com/devansh-567/sih-2026/blob/main/rfplatform/pipeline/compare.py"
click node_report "https://github.com/devansh-567/sih-2026/blob/main/rfplatform/report/generator.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_app,node_client,node_findings,node_demodui toneBlue
class node_api_main,node_storage,node_compare toneAmber
class node_ingest,node_pipeline,node_estimators,node_classifier,node_demod,node_fec,node_reedsolomon,node_interleave,node_bitstream,node_fusion,node_schema toneMint
class node_ml_inference,node_ml_model,node_synth toneRose
class node_report,node_analyst toneIndigo
```

## Components

### Analyst GUI

- [Analysis workspace](https://github.com/devansh-567/sih-2026/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [API client](https://github.com/devansh-567/sih-2026/blob/main/frontend/src/lib/api.ts): `frontend/src/lib/api.ts`
- [Evidence findings](https://github.com/devansh-567/sih-2026/blob/main/frontend/src/components/AutomaticAnalysisPanel.tsx): `frontend/src/components/AutomaticAnalysisPanel.tsx`
- [Demod and FEC views](https://github.com/devansh-567/sih-2026/blob/main/frontend/src/components/DemodPanel.tsx): `frontend/src/components/DemodPanel.tsx`

### API and records

- [HTTP API](https://github.com/devansh-567/sih-2026/blob/main/rfplatform/api/main.py): `rfplatform/api/main.py`
- [Analysis history](https://github.com/devansh-567/sih-2026/blob/main/rfplatform/storage/db.py): `rfplatform/storage/db.py`
- [History comparison](https://github.com/devansh-567/sih-2026/blob/main/rfplatform/pipeline/compare.py): `rfplatform/pipeline/compare.py`

### Signal analysis

- [Recording ingestion](https://github.com/devansh-567/sih-2026/blob/main/rfplatform/io/formats.py): `rfplatform/io/formats.py`
- [Analysis orchestration](https://github.com/devansh-567/sih-2026/blob/main/rfplatform/pipeline/stages.py): `rfplatform/pipeline/stages.py`
- [DSP estimation](https://github.com/devansh-567/sih-2026/blob/main/rfplatform/dsp/estimators.py): `rfplatform/dsp/estimators.py`
- [Modulation classifier](https://github.com/devansh-567/sih-2026/blob/main/rfplatform/dsp/classifier.py): `rfplatform/dsp/classifier.py`
- [Signal demodulation](https://github.com/devansh-567/sih-2026/blob/main/rfplatform/dsp/demodulate.py): `rfplatform/dsp/demodulate.py`
- [FEC decoding](https://github.com/devansh-567/sih-2026/blob/main/rfplatform/fec/convolutional.py): `rfplatform/fec/convolutional.py`
- [Reed-Solomon](https://github.com/devansh-567/sih-2026/blob/main/rfplatform/fec/reed_solomon.py): `rfplatform/fec/reed_solomon.py`
- [De-interleaving](https://github.com/devansh-567/sih-2026/blob/main/rfplatform/interleave/interleavers.py): `rfplatform/interleave/interleavers.py`
- [Bitstream framing](https://github.com/devansh-567/sih-2026/blob/main/rfplatform/pipeline/bitstream.py): `rfplatform/pipeline/bitstream.py`
- [Confidence fusion](https://github.com/devansh-567/sih-2026/blob/main/rfplatform/pipeline/fusion.py): `rfplatform/pipeline/fusion.py`
- [Evidence schema](https://github.com/devansh-567/sih-2026/blob/main/rfplatform/models/schema.py): `rfplatform/models/schema.py`

### ML and synthesis

- [ML inference](https://github.com/devansh-567/sih-2026/blob/main/rfplatform/ml/inference.py): `rfplatform/ml/inference.py`
- [CNN model](https://github.com/devansh-567/sih-2026/blob/main/rfplatform/ml/model.py): `rfplatform/ml/model.py`
- [Synthetic signals](https://github.com/devansh-567/sih-2026/blob/main/rfplatform/synth/generator.py): `rfplatform/synth/generator.py`

### Results and exports

- [Report export](https://github.com/devansh-567/sih-2026/blob/main/rfplatform/report/generator.py): `rfplatform/report/generator.py`

### Other components

- **Analyst**

## Connections

- Analyst → Analysis workspace: uses
- Analysis workspace → API client: requests (evidence: `frontend/src/App.tsx`)
- API client → HTTP API: calls API
- HTTP API → Recording ingestion: loads recordings (evidence: `rfplatform/api/main.py`)
- HTTP API → Analysis orchestration: runs analysis (evidence: `rfplatform/api/main.py`)
- Analysis orchestration → DSP estimation: extracts features (evidence: `rfplatform/pipeline/stages.py`)
- Analysis orchestration → Modulation classifier: classifies modulation (evidence: `rfplatform/pipeline/stages.py`)
- Analysis orchestration → Signal demodulation: demodulates (evidence: `rfplatform/pipeline/stages.py`)
- Analysis orchestration → FEC decoding: tests convolutional codes (evidence: `rfplatform/pipeline/stages.py`)
- Analysis orchestration → Reed-Solomon: tests RS codes (evidence: `rfplatform/pipeline/stages.py`)
- Analysis orchestration → De-interleaving: tests interleavers (evidence: `rfplatform/pipeline/stages.py`)
- Analysis orchestration → Bitstream framing: analyzes framing (evidence: `rfplatform/pipeline/stages.py`)
- Analysis orchestration → ML inference: requests inference (evidence: `rfplatform/pipeline/stages.py`)
- Analysis orchestration → Confidence fusion: combines evidence (evidence: `rfplatform/pipeline/stages.py`)
- ML inference → CNN model: runs model (evidence: `rfplatform/ml/inference.py`)
- ML inference → Evidence schema: returns parameters (evidence: `rfplatform/ml/inference.py`)
- Confidence fusion → Evidence schema: uses evidence types (evidence: `rfplatform/pipeline/fusion.py`)
- Analysis orchestration → Evidence schema: builds results (evidence: `rfplatform/pipeline/stages.py`)
- HTTP API → Analysis history: persists analyses (evidence: `rfplatform/api/main.py`)
- HTTP API → Report export: exports results (evidence: `rfplatform/api/main.py`)
- HTTP API → History comparison: compares history (evidence: `rfplatform/api/main.py`)
- Analysis history → History comparison: provides stored analyses
- Synthetic signals → CNN model: supplies training signals
- Analysis workspace → Evidence findings: renders (evidence: `frontend/src/App.tsx`)
- Analysis workspace → Demod and FEC views: renders (evidence: `frontend/src/App.tsx`)
- Evidence findings → Evidence schema: displays parameters
- API client → Report export: requests export (evidence: `frontend/src/lib/api.ts`)
