How sgoudelis/ground-station works
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: App.jsx App shell · registry.py Handlers · executor.py Observations · processmanager.py Pipeline
Components 23
Frontend
React SPA for real-time control and visualization
- App shell · Top-level client app and routing entrypoint
frontend/src/App.jsx - Dashboard · Live system status, rig control, and runtime overlays
frontend/src/components/dashboard/dashboard-slice.jsx - Waterfall · Spectrum, VFO, and decode-centric real-time display
frontend/src/components/waterfall/waterfall-slice.jsx - Targeting · Satellite and tracker views for passes and rotator control
frontend/src/components/target/target-slice.jsx - Overview · High-level satellite overview and pass surfaces
frontend/src/components/overview/overview-slice.jsx - Hardware · Rig, rotator, SDR, and camera management screens
frontend/src/components/hardware/rig-slice.jsx - Satellites · Satellite, transmitter, group, and orbital source management
frontend/src/components/satellites/satellite-slice.jsx - Scheduler · Monitored satellites and automated observation workflows
frontend/src/components/scheduler/scheduler-slice.jsx - Files · Recordings, decoded outputs, and transcription browsing
frontend/src/components/filebrowser/filebrowser-slice.jsx - Settings · Preferences, app settings, maintenance, and system info
frontend/src/components/settings/settings.jsx - Performance · Flow visualization of connections and live metrics
frontend/src/components/performance/performance-slice.jsx
Backend
Python orchestration, APIs, and worker processes
- API server · Backend entrypoint and runtime composition
backend/app.py - Handlers · REST and socket route dispatch for domain entities
backend/handlers/routing/registry.py - Sessions · Live session store, trackers, and socket registry
backend/session/service.py - Pipeline · IQ fan-out, demodulation, recording, and transcription pipeline
backend/pipeline/orchestration/processmanager.py - Workers · Hardware-specific worker processes for SDR playback and capture
backend/workers/common.py - Hardware layer · Hardware discovery and SDR/rig abstraction
backend/hardware/soapyenum.py - Tracking core · Orbit, passes, Doppler, footprint, and celestial calculations
backend/tracking/passes.py - Tracker · Tracker instances and rotator and rig control coordination
backend/tracker/manager.py - Observations · Pass generation, automated observations, and task execution
backend/observations/executor.py - Database · Persistent models, CRUD, and schema migrations
backend/db/models.py - Artifacts · SigMF captures, waterfall snapshots, decoded outputs, and configs
backend/data/README.md - Integrations · TLE sync, satellite sources, transcription, and decoding services
backend/tlesync/logic.py
Connections 32
- 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