Overview & Architecture

πŸ›©οΈ Project Overview and Architecture


πŸ“‘

SkySpy is an enterprise-grade, real-time ADS-B aircraft tracking and monitoring platform built for enthusiasts, researchers, and aviation professionals.



🎯 What is SkySpy?

SkySpy captures position data from 1090MHz Mode S and 978MHz UAT receivers, displays aircraft on an interactive map, monitors safety conditions, and provides advanced features like custom alerts, weather integration, ACARS message decoding, and push notifications.

πŸ“˜

Deployment Flexibility

SkySpy is designed to run on hardware ranging from Raspberry Pi edge devices to enterprise server infrastructure, with configuration profiles optimized for each deployment scenario.



✨ Key Capabilities

CapabilityDescriptionStatus
πŸ“ Real-Time TrackingSub-second aircraft position updates with distance, altitude, speed, and climb rate calculationsβœ…
πŸ–₯️ Interactive DashboardCanvas-based radar display with multiple visualization modes including CRT phosphor effectsβœ…
🚨 Safety MonitoringTCAS RA/TA detection, proximity alerts, extreme vertical speed warnings, emergency squawk detectionβœ…
πŸ”” Custom Alert RulesFlexible AND/OR logic conditions with 80+ notification channel integrationsβœ…
πŸ“Š Historical AnalyticsPostgreSQL-backed sighting history with session tracking, gamification, and trend analysisβœ…
🌀️ Aviation WeatherMETARs, TAFs, PIREPs, SIGMETs, G-AIRMETs, and NOTAMs integrationβœ…
πŸ“» ACARS/VDL2 DecodingAircraft communication message reception, parsing, and display with libacars integrationβœ…
πŸ’» Multi-Platform CLINative Go terminal radar client with themes, overlays, and export capabilitiesβœ…


πŸ—οΈ High-Level Architecture

flowchart TB
    subgraph sources["πŸ“‘ DATA SOURCES"]
        UF["πŸ›©οΈ Ultrafeeder<br/>(1090MHz ADS-B)"]
        D978["πŸ“» dump978<br/>(978MHz UAT)"]
        ACARS["πŸ“¨ ACARS Hub<br/>(VDL2/ACARS)"]
    end

    subgraph server["πŸ–₯️ SKYSPY DJANGO API SERVER (Daphne ASGI)"]
        direction TB
        subgraph core["βš™οΈ Core Services"]
            AT["Aircraft Tracking"]
            SM["Safety Monitoring"]
            AE["Alert Engine"]
            WI["Weather Integration"]
            AD["ACARS Decoder"]
        end
        subgraph channels["πŸ”Œ Django Channels"]
            WS["Socket.IO Handlers"]
        end
    end

    subgraph storage["πŸ’Ύ DATA LAYER"]
        PG["🐘 PostgreSQL<br/>━━━━━━━━━━<br/>β€’ Aircraft Data<br/>β€’ Sighting History<br/>β€’ Alert Rules<br/>β€’ User Accounts"]
        RD["⚑ Redis<br/>━━━━━━━━━━<br/>β€’ Channel Layer<br/>β€’ Cache<br/>β€’ Message Broker<br/>β€’ Pub/Sub"]
        CL["πŸ”„ Celery Workers<br/>━━━━━━━━━━<br/>β€’ Polling Tasks<br/>β€’ Analytics<br/>β€’ Notifications<br/>β€’ Transcription"]
    end

    subgraph clients["πŸ‘₯ CLIENTS"]
        REACT["βš›οΈ React Frontend<br/>(Web SPA)<br/>━━━━━━━━━━<br/>β€’ Map View<br/>β€’ Aircraft List<br/>β€’ Stats/History<br/>β€’ Alerts Config"]
        GO["πŸ”² Go CLI Client<br/>(skyspy-go)<br/>━━━━━━━━━━<br/>β€’ Terminal Radar<br/>β€’ 10+ Themes<br/>β€’ GeoJSON Layers<br/>β€’ Export Tools"]
        EXT["🌐 External APIs<br/>━━━━━━━━━━<br/>β€’ OpenSky DB<br/>β€’ Aviation Wx<br/>β€’ Planespotters<br/>β€’ FAA NOTAMs<br/>β€’ CheckWX/AVWX"]
    end

    sources --> server
    server --> storage
    storage --> clients


πŸ”§ Technology Stack

🐍 Backend (Django API Server)

ComponentTechnologyPurpose
DjangoDjango 5.xWeb framework with ORM
DaphneDaphneSocket.IO-capable async server
DRFDjango REST FrameworkRESTful API with OpenAPI schema
Socket.IOSocket.IOReal-time bidirectional event-based communication
CeleryCelery + geventBackground task processing with green threads
PostgreSQLPostgreSQL 16Primary data store
RedisRedis 7Caching, message broker, channel layer
JWTSimpleJWT + OIDCJWT tokens with SSO support
ACARSlibacars 2.2Native ACARS message decoding
AppriseApprise80+ notification services

βš›οΈ Frontend (React SPA)

ComponentTechnologyPurpose
ReactReact 18Component-based UI
ViteVite 5Fast development and bundling
LeafletLeafletInteractive mapping
LucideLucide ReactIconography
CSSCSS ModulesScoped component styles
PlaywrightPlaywrightEnd-to-end testing

πŸ–₯️ CLI Client (Go)

ComponentTechnologyPurpose
GoBubble TeaTerminal user interface
LipGlossLip GlossTerminal styling
Socket.IOSocket.IO ClientReal-time data streaming
CobraCobraCommand-line parsing
AuthOIDC + API KeysAuthentication support


βš™οΈ Core Components


1️⃣ Aircraft Tracking Service

πŸ’‘

Core Engine

The aircraft tracking service is the heart of SkySpy, processing thousands of position updates per minute.

Responsibilities:

  • πŸ“‘ Polling ADS-B receivers (Ultrafeeder/readsb/dump1090) at configurable intervals
  • πŸ”„ Processing and normalizing aircraft position data
  • πŸ“ Calculating distance and bearing from receiver location
  • ⏱️ Managing aircraft sessions (first seen, last seen, tracking quality)
  • πŸ“’ Broadcasting updates via Socket.IO to connected clients
# Polling configuration (celery.py)
'poll-aircraft-every-2s': {
    'task': 'skyspy.tasks.aircraft.poll_aircraft',
    'schedule': 2.0,
    'options': {'expires': 2.0},
}

2️⃣ Safety Monitoring Engine

⚠️

Critical Monitoring

Continuous real-time monitoring for safety-critical events that require immediate attention.

Event TypeTrigger ConditionPriority
🚨 Emergency Squawk7500, 7600, 7700πŸ”΄ Critical
⚠️ TCAS RAResolution Advisory detectedπŸ”΄ Critical
⚑ TCAS TATraffic Advisory detected🟠 High
πŸ“ Proximity AlertAircraft within threshold distance🟠 High
πŸ“ˆ Extreme VSVertical speed > 6000 ft/min🟑 Medium
πŸ“‰ VS ChangeSudden VS change > 2000 ft/min🟑 Medium

3️⃣ Alert Rule Engine

πŸ“˜

Flexible Alerting

Create sophisticated alert rules using AND/OR condition logic with support for 80+ notification channels.

{
  "name": "Military Aircraft Alert",
  "conditions": {
    "operator": "AND",
    "conditions": [
      { "field": "military", "operator": "eq", "value": true },
      { "field": "distance", "operator": "lt", "value": 50 }
    ]
  },
  "actions": ["notify", "log"]
}

4️⃣ Socket.IO Namespaces

Socket.IO provides real-time data streaming via namespaces:

NamespacePurposeDescription
πŸ›©οΈ /aircraftAircraft UpdatesReal-time position streaming
🚨 /safetySafety EventsEmergency and TCAS notifications
πŸ”” /alertsAlert TriggersCustom rule match notifications
πŸ“» /acarsACARS StreamDecoded message feed
πŸ“Š /statsStatisticsLive metrics updates
πŸ“± /cannonballMobile ModeGPS-based threat detection

5️⃣ Celery Task System

Background task processing with priority queues:

QueueTasksPriority
pollingAircraft polling, stats updatesπŸ”΄ High (time-sensitive)
defaultGeneral background tasks🟑 Normal
databaseDB operations, cleanup🟑 Normal
notificationsPush notification delivery🟑 Normal
transcriptionAudio transcriptionπŸ”΅ Low
low_priorityAnalytics, aggregationπŸ”΅ Low


πŸ”„ Data Flow

πŸ“‘ ADS-B Data Ingestion

flowchart TD
    A["πŸ“‘ ADS-B Receiver<br/>(Ultrafeeder)"] --> B["πŸ”— JSON API Endpoint<br/>/tar1090/data/aircraft.json"]
    B --> C["βš™οΈ Celery Task<br/>poll_aircraft"]
    C --> D["⚑ Update Redis Cache<br/>(live aircraft state)"]
    C --> E["πŸ“’ Broadcast via<br/>Socket.IO"]
    C --> F["πŸ’Ύ Store to PostgreSQL<br/>(periodic snapshots)"]
    D --> G["πŸ‘₯ Connected Clients"]
    E --> G

    subgraph clients["πŸ“± Clients"]
        G1["βš›οΈ Web Dashboard<br/>(React)"]
        G2["πŸ–₯️ CLI Client<br/>(Go)"]
        G3["πŸ“± Mobile Apps"]
    end
    G --> clients

🚨 Safety Event Detection

flowchart TD
    A["✈️ Aircraft Position Update"] --> B["πŸ” Safety Monitoring Service"]

    B --> C{"🚨 Check Emergency<br/>Squawks 7500/7600/7700"}
    B --> D{"πŸ“ Calculate Proximity<br/>to Other Aircraft"}
    B --> E{"πŸ“ˆ Analyze Vertical<br/>Speed Changes"}
    B --> F{"⚠️ Detect TCAS<br/>Alerts"}

    C --> G{"Event Detected?"}
    D --> G
    E --> G
    F --> G

    G -->|Yes| H["πŸ’Ύ Create SafetyEvent Record"]
    H --> I["πŸ“’ Broadcast via Socket.IO"]
    I --> J["πŸ”” Trigger Notifications<br/>(if configured)"]

πŸ”” Alert Rule Processing

flowchart TD
    A["✈️ Aircraft Update Received"] --> B["πŸ“‹ Alert Rule Cache<br/>(Redis)"]
    B --> C["πŸ”„ Evaluate Each Active Rule"]

    C --> D["πŸ”€ Parse AND/OR Conditions"]
    D --> E["βœ… Check Field Values<br/>Against Thresholds"]
    E --> F["⏱️ Apply Cooldown Logic"]

    F --> G{"Rule Matches?"}
    G -->|Yes| H["πŸ’Ύ Create AlertHistory Record"]
    H --> I["πŸ“€ Dispatch Notifications"]
    I --> J["πŸ“’ Broadcast via Socket.IO"]


🌟 Key Features Summary


✈️ Aircraft Tracking

  • πŸ“ Real-time position updates from 1090MHz and 978MHz receivers
  • πŸ”Œ Support for multiple receiver sources (Ultrafeeder, dump978)
  • πŸ“ Distance and bearing calculation from receiver location
  • ⏱️ Session management with first/last seen timestamps
  • 🏷️ Aircraft type classification (commercial, military, private, etc.)

πŸ–₯️ Interactive Dashboard

  • πŸ—ΊοΈ Canvas-based map with multiple rendering modes
  • πŸ“Ÿ CRT radar mode with sweep animation
  • πŸ“‹ Aircraft detail panels with registration, operator, and photo
  • πŸ“Š Real-time statistics (count, altitude distribution, closest/highest/fastest)
  • πŸ” Filter and search capabilities

πŸ“š Historical Data

  • πŸ•’ Sighting history with advanced filtering
  • πŸ“ˆ Session analytics and tracking quality metrics
  • ✈️ Flight pattern analysis
  • πŸ“Š Time comparison statistics (hourly, daily, weekly trends)
  • πŸ“» ACARS message history

🌀️ Aviation Weather

  • πŸ“ METAR - Current weather observations
  • πŸ“… TAF - Terminal area forecasts
  • πŸ‘¨β€βœˆοΈ PIREPs - Pilot reports
  • ⚠️ SIGMETs/AIRMETs - Hazardous weather
  • πŸ“‹ NOTAMs - Notices to airmen

πŸ”” Notification System

πŸ“˜

80+ Channels Supported

Pushover, Telegram, Slack, Discord, email, and many more via Apprise integration.

  • πŸ“ Rich message formatting with aircraft details
  • ⏱️ Cooldown management to prevent spam
  • βš™οΈ Per-rule notification configuration

πŸ” Authentication & Authorization

ModeDescriptionIcon
publicNo authentication required🌐
privateAuthentication required for all endpointsπŸ”’
hybridPer-feature access control (default)πŸ”“

Supported Auth Methods:

  • πŸ”‘ Local username/password authentication
  • πŸ”— API key authentication for integrations
  • 🌐 OIDC/SSO support (Keycloak, Authentik, Azure AD, Okta)
  • πŸ‘₯ Role-based access control (viewer, operator, analyst, admin)

πŸ“± Mobile Features (Cannonball Mode)

  • πŸ“ GPS-based threat detection
  • πŸ“Ί Edge-to-edge radar display
  • πŸ“ Real-time proximity calculations
  • πŸ”Š Audio/haptic alerts
  • 🎬 Session recording and playback


πŸš€ Deployment Options

🐳 Docker Compose (Recommended)

# Production deployment
docker-compose up -d

# With ACARS listener
docker-compose --profile acars up -d

πŸ›οΈ Services Architecture

ServiceContainerPortStatus
🌐 apiskyspy-api8000βœ…
βš™οΈ celery-workerskyspy-celery-worker-βœ…
⏰ celery-beatskyspy-celery-beat-βœ…
🐘 postgresskyspy-postgres5432βœ…
⚑ redisskyspy-redis6379βœ…
πŸ“» acars-listenerskyspy-acars-listener5555/udp, 5556/udpβœ…

πŸ“ Raspberry Pi Optimization

πŸ’‘

Edge Deployment

SkySpy includes optimized settings specifically tuned for Raspberry Pi 4/5 deployment.

# settings_rpi.py
POLLING_INTERVAL = 3  # Reduced polling frequency
RPI_TASK_INTERVALS = {
    'stats_cache': 90.0,
    'safety_stats': 60.0,
    'acars_stats': 120.0,
}


🌐 External Data Sources

SourceData ProvidedRate LimitStatus
🌍 OpenSky NetworkAircraft database, live positions4,000 credits/dayβœ…
πŸ“· Planespotters.netAircraft photosCached locallyβœ…
🌀️ Aviation Weather CenterMETARs, TAFs, PIREPsUnlimitedβœ…
πŸ‡ΊπŸ‡Έ FAANOTAMs, TFRsUnlimitedβœ…
☁️ CheckWXWeather data3,000/dayβœ…
🌧️ AVWXWeather dataUnlimited basicβœ…
✈️ OpenAIPAirspace boundariesUnlimitedβœ…


πŸ“– API Documentation

SkySpy provides a comprehensive REST API with OpenAPI documentation:

DocumentationURLDescription
πŸ“˜ Swagger UI/api/docs/Interactive API explorer
πŸ“• ReDoc/api/redoc/Beautiful API reference
πŸ“„ OpenAPI Schema/api/schema/Machine-readable spec

πŸ”— Key Endpoints

CategoryBase PathDescription
✈️ Aircraft/api/v1/aircraft/Live aircraft tracking
πŸ“š History/api/v1/sightings/, /api/v1/sessions/Historical data
πŸ”” Alerts/api/v1/alerts/rules/, /api/v1/alerts/history/Alert management
🚨 Safety/api/v1/safety/events/Safety event monitoring
🌀️ Aviation/api/v1/aviation/Weather and airspace data
πŸ“» ACARS/api/v1/acars/ACARS message history
πŸŽ™οΈ Audio/api/v1/audio/Radio transmission recordings
βš™οΈ System/api/v1/system/Health and status


πŸ“¦ Version Information

ComponentVersionStatus
πŸš€ SkySpy API2.6.0Stable
🌐 Web Dashboard2.5.0Stable
πŸ–₯️ Go CLI1.0.0Stable
🐍 Django5.xRequired
🐍 Python3.12+Required
πŸ“¦ Node.js20+Required
πŸ”΅ Go1.21+Required


πŸ“š Next Steps

LinkDescription
πŸ“₯ Installation GuideDetailed setup instructions
βš™οΈ Configuration ReferenceEnvironment variables and settings
πŸ”— API ReferenceComplete API documentation
πŸ”Œ Socket.IO ProtocolReal-time streaming guide
πŸ”” Alert RulesCustom alert configuration
πŸ” AuthenticationAuth modes and SSO setup



πŸ›©οΈ

SkySpy - Enterprise-grade aircraft tracking for enthusiasts and professionals alike.