# sgoudelis/ground-station architecture

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

- Interactive diagram: https://gitdiagram.com/sgoudelis/ground-station
- Repository: https://github.com/sgoudelis/ground-station

## Overview

1. **Repository shape**
   This is a split-stack ground-station system with three major runtime pieces: a React frontend, a Python backend API/server, and multiple worker/process subsystems that do the heavy signal-processing and hardware control. The repo is organized around domain areas rather than a single monolith.

2. **Frontend boundary**
   `frontend/` is a single-page app built with React, Redux Toolkit, Material UI, Vite, and Socket.IO client. It is organized into feature slices such as overview, target tracking, waterfall, hardware, satellites, scheduler, file browser, settings, and performance. The UI is mostly a real-time control and visualization surface rather than a data-processing layer.

3. **Backend boundary**
   `backend/` is the orchestration and API layer, implemented in Python with FastAPI and Socket.IO. It owns authentication, REST endpoints, real-time event delivery, configuration loading, database CRUD, file management, and process coordination. The backend is also the bridge between the browser and the worker processes.

4. **Process and service model**
   The backend is not where the heavy DSP happens. The repository separates that work into worker processes under `backend/workers`, `backend/pipeline`, `backend/demodulators`, `backend/fft`, `backend/audio`, `backend/tasks`, and `backend/tracker`. This separation is important: UI/API requests stay responsive while high-throughput IQ streaming and decoding run independently.

5. **Signal-processing data flow**
   The main real-time path is: SDR hardware or playback source produces raw IQ samples, an IQ broadcaster fans them out, then consumers attach independently for FFT/waterfall, demodulation, IQ recording, and raw-IQ decoding. Demodulated audio can then feed an audio broadcaster, which fans out to live browser monitoring and audio-based decoders/transcription. The architecture is explicitly pub/sub to prevent slow consumers from blocking acquisition.

6. **Hardware abstraction layer**
   Hardware support is split into controllers, workers, and probes. `backend/controllers` and `backend/workers` manage rigs, rotators, and SDRs; `backend/hardware` contains enumeration/probing for RTL-SDR, SoapySDR, UHD, local/remote discovery, and SigMF playback; `backend/controllers/*hamlib.py` indicates Hamlib integration for radio and rotator control. The boundary here is “hardware-specific access behind abstractions,” not direct UI coupling.

7. **Tracking and pointing**
   Satellite tracking is a first-class subsystem in `backend/tracking`, `backend/tracker`, `backend/orbits`, `backend/celestial`, and `backend/satconfig`. These modules calculate orbits, passes, Doppler, elevation/footprint, and drive tracker instances that coordinate rotators and rigs. The frontend’s tracking and target views are consumers of this model, not the source of truth.

8. **Scheduled observations**
   Automated observations are modeled as a scheduler/executor pipeline in `backend/observations`, `backend/server/scheduler.py`, and `backend/tasks`. Monitored satellites generate future passes, APScheduler-triggered jobs start/stop observations, and each observation can compose multiple tasks such as recording, decoding, and transcription. These observations run in isolated internal VFO sessions so they do not collide with interactive user sessions.

9. **Persistence and schema**
   Application state is backed by SQLAlchemy models in `backend/db/models.py` with Alembic migrations in `backend/alembic/`. CRUD modules in `backend/crud` encapsulate data access for satellites, transmitters, tracking state, groups, hardware, locations, preferences, scheduled observations, and orbital sources. This is the main durable state boundary for UI, scheduler, and tracking metadata.

10. **Files, artifacts, and decoded outputs**
   The system persists more than database rows: it stores SigMF IQ captures, waterfall snapshots, decoded images/text, transcriptions, and configuration files under `backend/data/` and related runtime paths. The file browser UI is a direct reflection of this artifact store, exposing recordings, decoded telemetry, and transcription outputs as first-class user-facing results.

11. **External integrations**
   External data comes primarily from TLE/orbital sources such as CelesTrak and SatNOGS, fetched by TLE sync logic in `backend/tlesync` and related tasks. Optional AI transcription integrates with Gemini Live and Deepgram, and weather-satellite decoding integrates with SatDump. These services extend the signal pipeline but are not required for the core tracking/control loop.

12. **Operational/runtime concerns**
   The app is designed to run as a containerized service with USB access, optional host networking for SoapySDR discovery, and a mounted data directory. `Dockerfile`, GitHub Actions, tests, and Alembic migrations show that the repo is production-oriented: reproducible builds, schema evolution, and automated validation are part of the architecture, not just development tooling.

Main entry points: [`frontend/src/App.jsx`](https://github.com/sgoudelis/ground-station/blob/main/frontend/src/App.jsx) (App shell), [`backend/handlers/routing/registry.py`](https://github.com/sgoudelis/ground-station/blob/main/backend/handlers/routing/registry.py) (Handlers), [`backend/observations/executor.py`](https://github.com/sgoudelis/ground-station/blob/main/backend/observations/executor.py) (Observations), [`backend/pipeline/orchestration/processmanager.py`](https://github.com/sgoudelis/ground-station/blob/main/backend/pipeline/orchestration/processmanager.py) (Pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend"]
  node_frontend_app["App shell<br/>React SPA<br/>[App.jsx]"]
  node_frontend_dashboard["Dashboard<br/>control surface"]
  node_frontend_waterfall["Waterfall<br/>signal UI"]
  node_frontend_tracking["Targeting<br/>tracking UI<br/>[target-slice.jsx]"]
  node_frontend_overview["Overview<br/>mission UI<br/>[overview-slice.jsx]"]
  node_frontend_hardware["Hardware<br/>inventory UI<br/>[rig-slice.jsx]"]
  node_frontend_satellites["Satellites<br/>catalog UI"]
  node_frontend_scheduler["Scheduler<br/>observation UI"]
  node_frontend_filebrowser["Files<br/>artifact UI"]
  node_frontend_settings["Settings<br/>admin UI<br/>[settings.jsx]"]
  node_frontend_performance["Performance<br/>runtime UI"]
end

subgraph group_backend["Backend"]
  node_backend_app["API server<br/>FastAPI/Socket.IO<br/>[app.py]"]
  node_backend_handlers["Handlers<br/>API/events<br/>[registry.py]"]
  node_backend_sessions["Sessions<br/>session state<br/>[service.py]"]
  node_backend_pipeline["Pipeline<br/>stream processing<br/>[processmanager.py]"]
  node_backend_workers["Workers<br/>[common.py]"]
  node_backend_hardware["Hardware layer<br/>probe/enum<br/>[soapyenum.py]"]
  node_backend_tracking["Tracking core<br/>orbit/pointing<br/>[passes.py]"]
  node_backend_tracker["Tracker<br/>runtime coordinator<br/>[manager.py]"]
  node_backend_observations["Observations<br/>scheduler/executor<br/>[executor.py]"]
  node_backend_db[("Database<br/>SQLAlchemy/Alembic<br/>[models.py]")]
  node_backend_storage["Artifacts<br/>file store<br/>[README.md]"]
  node_backend_integrations["Integrations<br/>external feeds<br/>[logic.py]"]
end

node_frontend_app -->|"navigates to"| node_frontend_dashboard
node_frontend_app -->|"navigates to"| node_frontend_waterfall
node_frontend_app -->|"navigates to"| node_frontend_tracking
node_frontend_app -->|"navigates to"| node_frontend_overview
node_frontend_app -->|"navigates to"| node_frontend_hardware
node_frontend_app -->|"navigates to"| node_frontend_satellites
node_frontend_app -->|"navigates to"| node_frontend_scheduler
node_frontend_app -->|"navigates to"| node_frontend_filebrowser
node_frontend_app -->|"navigates to"| node_frontend_settings
node_frontend_app -->|"navigates to"| node_frontend_performance
node_frontend_dashboard -->|"socket/API"| node_backend_handlers
node_frontend_waterfall -->|"stream data"| node_backend_pipeline
node_frontend_tracking -->|"tracking data"| node_backend_tracking
node_frontend_scheduler -->|"manage jobs"| node_backend_observations
node_frontend_filebrowser -->|"browse artifacts"| node_backend_storage
node_frontend_settings -->|"admin data"| node_backend_db
node_frontend_performance -->|"runtime state"| node_backend_sessions
node_backend_app -->|"serves"| node_backend_handlers
node_backend_app -->|"hosts"| node_backend_sessions
node_backend_app -->|"orchestrates"| node_backend_pipeline
node_backend_handlers -->|"CRUD"| node_backend_db
node_backend_handlers -->|"queries"| node_backend_tracking
node_backend_handlers -->|"controls"| node_backend_observations
node_backend_handlers -->|"files"| node_backend_storage
node_backend_pipeline -->|"runs in"| node_backend_workers
node_backend_workers -->|"accesses"| node_backend_hardware
node_backend_tracking -->|"drives"| node_backend_tracker
node_backend_tracker -->|"commands"| node_backend_workers
node_backend_observations -->|"uses"| node_backend_tracker
node_backend_observations -->|"composes"| node_backend_pipeline
node_backend_integrations -->|"feeds data"| node_backend_tracking
node_backend_integrations -->|"syncs"| node_backend_db

click node_frontend_app "https://github.com/sgoudelis/ground-station/blob/main/frontend/src/App.jsx"
click node_frontend_dashboard "https://github.com/sgoudelis/ground-station/blob/main/frontend/src/components/dashboard/dashboard-slice.jsx"
click node_frontend_waterfall "https://github.com/sgoudelis/ground-station/blob/main/frontend/src/components/waterfall/waterfall-slice.jsx"
click node_frontend_tracking "https://github.com/sgoudelis/ground-station/blob/main/frontend/src/components/target/target-slice.jsx"
click node_frontend_overview "https://github.com/sgoudelis/ground-station/blob/main/frontend/src/components/overview/overview-slice.jsx"
click node_frontend_hardware "https://github.com/sgoudelis/ground-station/blob/main/frontend/src/components/hardware/rig-slice.jsx"
click node_frontend_satellites "https://github.com/sgoudelis/ground-station/blob/main/frontend/src/components/satellites/satellite-slice.jsx"
click node_frontend_scheduler "https://github.com/sgoudelis/ground-station/blob/main/frontend/src/components/scheduler/scheduler-slice.jsx"
click node_frontend_filebrowser "https://github.com/sgoudelis/ground-station/blob/main/frontend/src/components/filebrowser/filebrowser-slice.jsx"
click node_frontend_settings "https://github.com/sgoudelis/ground-station/blob/main/frontend/src/components/settings/settings.jsx"
click node_frontend_performance "https://github.com/sgoudelis/ground-station/blob/main/frontend/src/components/performance/performance-slice.jsx"
click node_backend_app "https://github.com/sgoudelis/ground-station/blob/main/backend/app.py"
click node_backend_handlers "https://github.com/sgoudelis/ground-station/blob/main/backend/handlers/routing/registry.py"
click node_backend_sessions "https://github.com/sgoudelis/ground-station/blob/main/backend/session/service.py"
click node_backend_pipeline "https://github.com/sgoudelis/ground-station/blob/main/backend/pipeline/orchestration/processmanager.py"
click node_backend_workers "https://github.com/sgoudelis/ground-station/blob/main/backend/workers/common.py"
click node_backend_hardware "https://github.com/sgoudelis/ground-station/blob/main/backend/hardware/soapyenum.py"
click node_backend_tracking "https://github.com/sgoudelis/ground-station/blob/main/backend/tracking/passes.py"
click node_backend_tracker "https://github.com/sgoudelis/ground-station/blob/main/backend/tracker/manager.py"
click node_backend_observations "https://github.com/sgoudelis/ground-station/blob/main/backend/observations/executor.py"
click node_backend_db "https://github.com/sgoudelis/ground-station/blob/main/backend/db/models.py"
click node_backend_storage "https://github.com/sgoudelis/ground-station/blob/main/backend/data/README.md"
click node_backend_integrations "https://github.com/sgoudelis/ground-station/blob/main/backend/tlesync/logic.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_app,node_frontend_dashboard,node_frontend_waterfall,node_frontend_tracking,node_frontend_overview,node_frontend_hardware,node_frontend_satellites,node_frontend_scheduler,node_frontend_filebrowser,node_frontend_settings,node_frontend_performance toneBlue
class node_backend_app,node_backend_handlers,node_backend_sessions,node_backend_pipeline,node_backend_workers,node_backend_hardware,node_backend_tracking,node_backend_tracker,node_backend_observations,node_backend_db,node_backend_storage,node_backend_integrations toneAmber
```

## Components

### Frontend

React SPA for real-time control and visualization

- [App shell](https://github.com/sgoudelis/ground-station/blob/main/frontend/src/App.jsx): React SPA · Top-level client app and routing entrypoint · `frontend/src/App.jsx`
- [Dashboard](https://github.com/sgoudelis/ground-station/blob/main/frontend/src/components/dashboard/dashboard-slice.jsx): control surface · Live system status, rig control, and runtime overlays · `frontend/src/components/dashboard/dashboard-slice.jsx`
- [Waterfall](https://github.com/sgoudelis/ground-station/blob/main/frontend/src/components/waterfall/waterfall-slice.jsx): signal UI · Spectrum, VFO, and decode-centric real-time display · `frontend/src/components/waterfall/waterfall-slice.jsx`
- [Targeting](https://github.com/sgoudelis/ground-station/blob/main/frontend/src/components/target/target-slice.jsx): tracking UI · Satellite and tracker views for passes and rotator control · `frontend/src/components/target/target-slice.jsx`
- [Overview](https://github.com/sgoudelis/ground-station/blob/main/frontend/src/components/overview/overview-slice.jsx): mission UI · High-level satellite overview and pass surfaces · `frontend/src/components/overview/overview-slice.jsx`
- [Hardware](https://github.com/sgoudelis/ground-station/blob/main/frontend/src/components/hardware/rig-slice.jsx): inventory UI · Rig, rotator, SDR, and camera management screens · `frontend/src/components/hardware/rig-slice.jsx`
- [Satellites](https://github.com/sgoudelis/ground-station/blob/main/frontend/src/components/satellites/satellite-slice.jsx): catalog UI · Satellite, transmitter, group, and orbital source management · `frontend/src/components/satellites/satellite-slice.jsx`
- [Scheduler](https://github.com/sgoudelis/ground-station/blob/main/frontend/src/components/scheduler/scheduler-slice.jsx): observation UI · Monitored satellites and automated observation workflows · `frontend/src/components/scheduler/scheduler-slice.jsx`
- [Files](https://github.com/sgoudelis/ground-station/blob/main/frontend/src/components/filebrowser/filebrowser-slice.jsx): artifact UI · Recordings, decoded outputs, and transcription browsing · `frontend/src/components/filebrowser/filebrowser-slice.jsx`
- [Settings](https://github.com/sgoudelis/ground-station/blob/main/frontend/src/components/settings/settings.jsx): admin UI · Preferences, app settings, maintenance, and system info · `frontend/src/components/settings/settings.jsx`
- [Performance](https://github.com/sgoudelis/ground-station/blob/main/frontend/src/components/performance/performance-slice.jsx): runtime UI · Flow visualization of connections and live metrics · `frontend/src/components/performance/performance-slice.jsx`

### Backend

Python orchestration, APIs, and worker processes

- [API server](https://github.com/sgoudelis/ground-station/blob/main/backend/app.py): FastAPI/Socket.IO · Backend entrypoint and runtime composition · `backend/app.py`
- [Handlers](https://github.com/sgoudelis/ground-station/blob/main/backend/handlers/routing/registry.py): API/events · REST and socket route dispatch for domain entities · `backend/handlers/routing/registry.py`
- [Sessions](https://github.com/sgoudelis/ground-station/blob/main/backend/session/service.py): session state · Live session store, trackers, and socket registry · `backend/session/service.py`
- [Pipeline](https://github.com/sgoudelis/ground-station/blob/main/backend/pipeline/orchestration/processmanager.py): stream processing · IQ fan-out, demodulation, recording, and transcription pipeline · `backend/pipeline/orchestration/processmanager.py`
- [Workers](https://github.com/sgoudelis/ground-station/blob/main/backend/workers/common.py): device workers · Hardware-specific worker processes for SDR playback and capture · `backend/workers/common.py`
- [Hardware layer](https://github.com/sgoudelis/ground-station/blob/main/backend/hardware/soapyenum.py): probe/enum · Hardware discovery and SDR/rig abstraction · `backend/hardware/soapyenum.py`
- [Tracking core](https://github.com/sgoudelis/ground-station/blob/main/backend/tracking/passes.py): orbit/pointing · Orbit, passes, Doppler, footprint, and celestial calculations · `backend/tracking/passes.py`
- [Tracker](https://github.com/sgoudelis/ground-station/blob/main/backend/tracker/manager.py): runtime coordinator · Tracker instances and rotator and rig control coordination · `backend/tracker/manager.py`
- [Observations](https://github.com/sgoudelis/ground-station/blob/main/backend/observations/executor.py): scheduler/executor · Pass generation, automated observations, and task execution · `backend/observations/executor.py`
- [Database](https://github.com/sgoudelis/ground-station/blob/main/backend/db/models.py): SQLAlchemy/Alembic · Persistent models, CRUD, and schema migrations · `backend/db/models.py`
- [Artifacts](https://github.com/sgoudelis/ground-station/blob/main/backend/data/README.md): file store · SigMF captures, waterfall snapshots, decoded outputs, and configs · `backend/data/README.md`
- [Integrations](https://github.com/sgoudelis/ground-station/blob/main/backend/tlesync/logic.py): external feeds · TLE sync, satellite sources, transcription, and decoding services · `backend/tlesync/logic.py`

## Connections

- App shell → Dashboard: navigates to · Main shell opens operational dashboard views
- App shell → Waterfall: navigates to · App routes into signal monitoring views
- App shell → Targeting: navigates to · App routes into target and tracker views
- App shell → Overview: navigates to · App routes into mission overview
- App shell → Hardware: navigates to · App routes into hardware management
- App shell → Satellites: navigates to · App routes into satellite catalog management
- App shell → Scheduler: navigates to · App routes into automated observation planning
- App shell → Files: navigates to · App routes into artifact browsing
- App shell → Settings: navigates to · App routes into administrative settings
- App shell → Performance: navigates to · App routes into runtime diagnostics
- Dashboard → Handlers: socket/API · Dashboard consumes live status and control events
- Waterfall → Pipeline: stream data · Waterfall consumes IQ, FFT, VFO, and decoder updates
- Targeting → Tracking core: tracking data · Target views consume passes, Doppler, and pointing state
- Scheduler → Observations: manage jobs · Scheduler UI creates and monitors observations
- Files → Artifacts: browse artifacts · File browser exposes stored captures and outputs
- Settings → Database: admin data · Settings read and update durable preferences and metadata
- Performance → Sessions: runtime state · Performance views inspect session and socket activity
- API server → Handlers: serves · API and socket endpoints are registered here
- API server → Sessions: hosts · Backend maintains session lifecycle and socket registry
- API server → Pipeline: orchestrates · Backend coordinates the processing pipeline
- Handlers → Database: CRUD · Handlers read and mutate persistent application state
- Handlers → Tracking core: queries · Handlers expose orbit and pass calculations
- Handlers → Observations: controls · Handlers schedule and inspect observation jobs
- Handlers → Artifacts: files · Handlers manage runtime artifacts and downloads
- Pipeline → Workers: runs in · Pipeline work is executed in separate worker processes
- Workers → Hardware layer: accesses · Workers rely on hardware discovery and device abstractions
- Tracking core → Tracker: drives · Tracking calculations feed tracker runtime coordination
- Tracker → Workers: commands · Tracker issues control to SDRs, rigs, and rotators
- Observations → Tracker: uses · Automated observations create isolated tracker sessions
- Observations → Pipeline: composes · Observation tasks compose recording, decoding, and transcription
- Integrations → Tracking core: feeds data · External orbital and mission data updates tracking core
- Integrations → Database: syncs · Imported sources and metadata are persisted
