Skip to content

About

A Flask-based web application for uploading, parsing, and exploring satellite Two-Line Element (TLE) data. Built with SQLAlchemy + SQLite for persistence and a reporting interface.

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

66 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›°οΈ Satellite TLE Tracker & AI Orbital Discovery

Live Demo on Vercel GitHub Pages Website GitHub Repository CI Version License: MIT Python Flask Docker SQLite PostgreSQL Offline AI SBOM One-Shot Prompt

πŸš€ Live Web Application (Vercel): https://sethusrinivasan-satellite-tracker.vercel.app
🌐 Official Documentation (GitHub Pages): https://sethusrinivasan.github.io/satellite-tracker/
πŸ“ GitHub Repository: https://github.com/sethusrinivasan/satellite-tracker
πŸ€– One-Shot Project Spec: docs/PROMPT.md

A demonstration and experimental Flask web application for uploading, parsing, exploring, and tracking satellite Two-Line Element (TLE) data. Features real-time SGP4 (Simplified General Perturbations 4) orbit propagation, country proximity filtering, interactive 2D/3D map tracking, and an in-process offline Text-to-SQL AI natural language search powered by Qwen2.5-Coder.

ℹ️ Project Status & Disclaimer: This is a demo / hobby project for learning only. Do not use it for real operational work, navigation, or production. No SLAs or accuracy guarantees. Feel free to review, copy, fork, and adapt the code.

πŸ€– One-Shot Generation Prompt: You can recreate or generate this complete application using our self-contained prompt document docs/PROMPT.md.


🌟 Key Features

  • πŸ›°οΈ Dual-Mode TLE Ingestion & Parsing: Parses standard TLE format records from local files (.txt, .tle, .dat) or imports live orbital feeds directly from CelesTrak. Extracts key Keplerian orbital elements (Inclination, Eccentricity, RAAN, Argument of Perigee, Mean Motion, BSTAR Drag Term), and calculates UTC Epoch timestamps.
  • 🌐 Live CelesTrak Integration & Cooldown Resilience: Includes pre-configured one-click feeds for Active Satellites, Space Stations, 100 Brightest, Starlink, and Weather. Hardened with SSRF protection and handles CelesTrak's 2-hour IP rate limit with transparent local snapshot fallback.
  • πŸ”„ Deduplication Engine: Database indexing by NORAD Catalog Number (norad_cat_id) and unique (satellite_id, epoch_datetime) constraints avoids duplicate record ingestion upon re-uploading.
  • πŸ’¬ Offline AI Natural Language Search (Text-to-SQL):
    • Runs fully offline using llama-cpp-python and the quantized GGUF model Qwen2.5-Coder-1.5B-Instruct-Q4_K_M.gguf.
    • Translates plain English prompts (e.g., "Find satellites with inclination > 50 degrees") into SQL queries.
    • Built-in SQL safety validation filter blocks non-SELECT statements (DROP, DELETE, UPDATE, INSERT, ALTER, etc.).
  • πŸ” Keyword Search (default Search tab): Leave the box empty to list every satellite, or type a term to ILIKE match name, NORAD ID, international designator, classification, and raw TLE lines.
  • 🌍 Geo-Spatial & Country Proximity Search: Computes real-time satellite orbital positions using SGP4 orbital propagation. The country dropdown is limited to countries with bounding-box data; a prefix table uses the first word of each catalogue name (CSS (TIANHE) β†’ CSS, STARLINK-1007 β†’ STARLINK).
  • πŸ›°οΈ Live 2D & 3D Globe Tracker: Multi-satellite real-time tracking with satellite.js. Maps default to Esri World Dark Gray (no API key). Set CARTO_API_KEY to keep CARTO dark tiles. Use Full screen / Exit full screen (or Escape) on the satellite detail and tracker maps. Optional overlays (off by default) pin Weather & quakes (including million-city temperature trends), Markets, Currencies, Flights, News, Ships, Webcams, and Cloud DCs from free public APIs only β€” see Data sources & attribution.
  • ⚑ Multi-Tier Caching & Valkey Integration: Low-latency memory caching, atomic disk Stale-While-Revalidate (SWR), and pluggable support for Valkey / Redis via VALKEY_URL or embedded valkeylite (on POSIX), with zero-dependency fallback for cross-platform desktop.
  • πŸ—„οΈ SQLite or PostgreSQL datastore: First launch opens /setup to pick an engine. Settings live in instance/datastore.json (outside the database) and can be switched later from Admin β†’ Database, with optional row copy. Compose Postgres uses the released postgres:18.6-alpine image.
  • πŸ–₯️ Native Desktop Standalone (Tauri v2): Cross-platform native packages for Windows (.msi, .exe), macOS (.dmg), and Linux (.AppImage, .deb) with custom aerospace branding and OS AppData redirection.
  • πŸ” Admin Management & Google OAuth2: Protected dashboard for uploads, datastore switch, a read-only Tables & SQL editor (row cap, CSV/Excel export, saved queries with p50/p95/p99/p100 latency), seed flags, and GGUF downloads via Google OAuth 2.0. Local /auth/dev-bypass is disabled when FLASK_ENV=production.

πŸ–ΌοΈ Visual Application Feature Showcase

πŸ“Έ Live Production Screenshots: Captured directly from the live Vercel production deployment at https://sethusrinivasan-satellite-tracker.vercel.app.

1. πŸ” Satellite Search & Orbital Catalogue Explorer

Interactive search and exploration interface supporting keyword filtering across NORAD catalog IDs, satellite names, international designators, classifications, and country proximity orbital propagation.

Satellite Search & Catalogue Explorer


2. πŸ›°οΈ Live 2D Ground Track & Real-Time Orbital Telemetry Tracker

Interactive 2D Leaflet ground track map and real-time orbital path projection rendering live SGP4 propagation, sub-satellite coordinates, and live telemetry vectors (velocity, altitude, latitude, longitude, and orbital period).

Live Orbit Tracker & Real-Time Telemetry


3. πŸ“₯ 3-Line TLE Ingestion & Deduplication Upload Interface

Parses standard 3-line and 2-line TLE dataset files, verifies modulo-10 checksums, extracts Keplerian elements, and prevents duplicate epoch ingestion with drag-and-drop dropzone support.

TLE Data Upload Interface


4. πŸ“Š Database Statistics & Ingestion Audit History

Comprehensive catalogue statistics dashboard providing real-time telemetry on stored satellites, TLE epoch records, and a full audit log of file upload batches and duplicate filtration counts.

Database Statistics & Upload History


πŸ“š Domain Terminology Reference Guide

For detailed explanations of space domain, orbital mechanics, and artificial intelligence terminology used in this application, please refer to the following authoritative resources:

Term / Acronym Definition & Domain Reference Link
TLE Two-Line Element Set format for satellite orbital state vectors CelesTrak TLE Guide / Wikipedia
NORAD Catalog ID 5-digit sequential number assigned by USSPACECOM Wikipedia: Satellite Catalog Number
SGP4 Simplified General Perturbations model 4 for satellite orbit propagation Space-Track.org Documentation / Wikipedia
Inclination Vertical tilt of the satellite's orbit relative to Earth's equator (degrees) Wikipedia: Orbital inclination
Eccentricity Shape of the orbit (0 = circular, 0 < e < 1 = elliptical) Wikipedia: Orbital eccentricity
RAAN Right Ascension of the Ascending Node (longitude of orbital node) Wikipedia: RAAN
Argument of Perigee Angle between ascending node and satellite's closest point to Earth Wikipedia: Argument of periapsis
Mean Motion Number of complete revolutions a satellite completes per day (rev/day) Wikipedia: Mean motion
BSTAR Drag Model parameter representing atmospheric drag force on the satellite Wikipedia: BSTAR
Epoch Specific UTC time instant at which the orbital parameters were measured Wikipedia: Epoch (astronomy)
GGUF Binary file format for compact LLM quantization and execution GGML / GGUF Specification
Text-to-SQL Natural language processing technique mapping text to database SQL queries Wikipedia: Semantic parsing

πŸ“– Documentation & Architecture

Detailed project architecture and design documentation are available in the repository and published on GitHub Pages:


πŸš€ Quick Start

1. Prerequisites

  • Python 3.9+
  • gcc / C++ compiler (required for compiling llama-cpp-python C++ bindings)

2. Installation

# Clone the repository
git clone https://github.com/sethusrinivasan/satellite-tracker.git
cd satellite-tracker

# Preferred: run.sh recreates an incomplete venv (Debian without python3-venv)
bash run.sh

# Or create the venv yourself
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

If data/kaggle_tle_data.txt is missing, first launch seeds a small demo TLE set (source=demo) so Search and Upload have rows to show.

3. Environment Configuration (Optional for OAuth)

Copy the .env.example file to create a local .env:

cp .env.example .env

To enable Google OAuth for the Admin panel:

  1. Obtain Google OAuth credentials from the Google Cloud Console.
  2. Set GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET in .env.
  3. Set ADMIN_ALLOWED_EMAILS to restrict access to authorized user emails.

Google does not force the account picker on every visit. After a successful sign-in the admin session lasts 14 days (ADMIN_SESSION_DAYS) and refreshes while you use the app. Use Sign out to clear it.

Optional: CARTO_API_KEY keeps CARTO dark map tiles. Without it, Live Orbit Tracking uses Esri World Dark Gray.

Optional PostHog web analytics: create a project at PostHog, copy the Project API key (phc_…), and set POSTHOG_PROJECT_API_KEY in .env. Use POSTHOG_HOST=https://eu.i.posthog.com for EU cloud. Session replay stays off unless POSTHOG_SESSION_REPLAY=true. Pageviews and autocapture then appear under Web analytics.

On first launch without DATABASE_URL / DB_ENGINE, open http://localhost:5000/setup and choose SQLite or PostgreSQL. You can switch later from Admin β†’ Database.

4. Running the Application

# Using the run script
bash run.sh

# Or directly with Python
python3 run.py

πŸš€ Deployment Options

The application supports three primary deployment pathways: Vercel for instant zero-configuration serverless hosting, Docker / Compose for full-featured self-hosting, and Native Desktop (Tauri v2) for standalone installation on Windows, macOS, and Linux without Python or Docker requirements.


1. ⚑ Production Serverless Deployment (Vercel)

Deploy with Vercel Live Demo on Vercel

The repository is preconfigured for Vercel Serverless Functions via vercel.json using the Python WSGI entrypoint api/index.py.

Vercel Project Settings:

  • Framework Preset: Flask (or Other)
  • Root Directory: . (repository root)
  • Build Command & Output Directory: Leave empty / default

Environment Variables in Vercel:

  • SECRET_KEY: A long random production secret
  • GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, and ADMIN_ALLOWED_EMAILS (optional, for Google OAuth)
  • Authorized redirect URI in Google Cloud Console: https://sethusrinivasan-satellite-tracker.vercel.app/auth/callback

Deploy via Vercel CLI:

vercel --prod --force

ℹ️ Serverless Storage & Features: Vercel storage is ephemeral. SQLite databases, uploads, and cached query lookups are stored under /tmp/satellite-tracker. Heavyweight native AI libraries (llama-cpp-python) are omitted from serverless builds to adhere to bundle size constraints; cached queries, TLE uploads, keyword search, and live SGP4 orbital tracking run in serverless mode.


2. 🐳 Self-Hosted Container Deployment (Docker & Compose)

Build and run on any local machine or self-hosted server with zero external dependencies:

# Option A: One-step build and run via helper script
./run.sh --docker

# Option B: Standard Docker CLI commands
docker build -t satellite-tracker:latest .
docker run -p 5000:5000 --env-file .env satellite-tracker:latest

πŸ”„ Local Docker Compose (build, wizard, and tests)

Use Compose for a local build with a persistent instance/ volume. The first visit opens a setup wizard to choose SQLite or PostgreSQL. You can switch engines later from Admin β†’ Database.

run.sh exports SATTRACK_UID / SATTRACK_GID so instance/datastore.json is not created as root:root mode 600 (that causes Permission denied when you later run ./run.sh --local).

# SQLite (default) β€” first-launch datastore wizard at http://localhost:5000/setup
docker compose up --build
# or: ./run.sh --compose

# App + PostgreSQL 18.6 β€” pick PostgreSQL in the wizard (host: postgres)
docker compose --profile postgres up --build
# or: ./run.sh --compose-postgres

# Tests
docker compose --profile test run --rm test
docker compose --profile test-postgres run --rm test-postgres

Headless bootstrap (skips the wizard): set DATABASE_URL or DB_ENGINE in .env. Example for Compose Postgres:

DATABASE_URL=postgresql+psycopg://sattrack:sattrack@postgres:5432/sattrack

πŸ”„ Automated CI/CD Docker Publishing

CI

GitHub Actions (.github/workflows/docker-publish.yml) runs pytest and builds the container on main and on pull requests. Images are pushed to GHCR (and Docker Hub, if those secrets are set) only when the checked-in VERSION file is bumped to a new semantic version. There is no published image until that bump happens.


3. πŸ–₯️ Native Standalone Desktop Application (Tauri v2)

Satellite TLE Tracker is packaged as a high-performance native desktop application for Windows, macOS, and Linux using Tauri v2 with a PyInstaller-frozen Python backend sidecar.

  • Zero Prerequisites: Single-click installation without needing Python, Rust, or Docker installed.
  • Dedicated OS AppData Storage: Persists SQLite database (satellites.db), user settings, and offline GGUF AI models in platform-standard user-writable paths:
    • Windows: %APPDATA%\satellite-tracker\
    • macOS: ~/Library/Application Support/satellite-tracker/
    • Linux: ~/.local/share/satellite-tracker/
  • Embedded Production WSGI: Uses Waitress to serve requests over a dynamic localhost port (127.0.0.1:{ephemeral_port}).
  • Local Desktop Session: Automatically authorizes desktop administration without external OAuth dependencies.
  • Automated Multi-Platform Release Builds: GitHub Actions workflow (.github/workflows/desktop-release.yml) automatically builds release artifacts on native runners:
    • πŸͺŸ Windows: .msi (Windows Installer) and .exe (NSIS setup installer)
    • 🍏 macOS: .dmg (Apple Silicon M-series & Intel x86_64)
    • 🐧 Linux: .AppImage (portable universal) and .deb (Debian/Ubuntu)

Running & Building Locally:

# 1. Install prerequisites
pip install -r requirements.txt pyinstaller waitress
npm install

# 2. Build Python backend sidecar binary
python3 scripts/build_sidecar.py

# 3. Launch desktop app in development mode
npm run desktop:dev

# 4. Compile standalone desktop bundle
npm run desktop:build

⚑ Pluggable Caching Architecture & Valkey Evaluation

1. What is used for caching?

The application implements multi-tiered caching tailored to high-throughput geospatial and telemetry feeds:

Cache Layer Purpose & Backing Store TTL / Strategy
Shared Overlay Cache (overlay_cache.py, cache_backends.py) Caches external API responses (OpenSky flights, Open-Meteo temps, CNBC/Yahoo markets, GDACS news, Digitraffic AIS, Cloud DC pings) Per-feed TTL (25s to 3600s). Stale-While-Revalidate (SWR): expired snapshots are returned instantly while background threads asynchronously refresh data.
Offline AI Query Cache (query_cache.py) Persists verified Natural Language-to-SQL translations (data/ai_query_cache.json) Permanent / user-verified. Enables instant offline discovery without running local LLM inference.
CelesTrak Ephemeris Cache (upload.py) Caches remote TLE downloads in instance/celestrak_cache/ and data/celestrak_active_cache.tle 2-hour interval handling. If CelesTrak returns HTTP 403 cooldown notices, local snapshots are automatically ingested.
Internal Memory Lookups (flight_overlay.py, news_overlay.py) In-process dictionaries for route callsign pairings and geographic gazetteer coordinates Ephemeral in-memory process lifetime.

2. Can Valkey be used in embedded format for all caching needs?

Valkey is the Linux Foundation's high-performance, open-source (BSD-3-Clause) fork of Redis.

Feasibility & Platform Evaluation:

  • Linux & macOS (Web & Dev): βœ… Fully Supported. The valkeylite package embeds a compiled valkey-server binary and manages its lifecycle seamlessly via Python.
  • Windows (Desktop Standalone): ⚠️ Not Natively Supported for Embedded Server. Valkey server relies on POSIX system calls (fork, epoll, POSIX signals, UNIX domain sockets). Official Valkey binaries do not compile natively on Windows Win32. Forcing an embedded Valkey requirement would break native Windows desktop builds (.msi / .exe) and require WSL or Cygwin.
  • Multi-Worker Web Deployments: In Gunicorn/uWSGI with multiple workers, each process running an embedded daemon creates an isolated cache. For scaled web production, a shared external Valkey instance is optimal.

3. Applicable Design Patterns in the Caching Architecture

The caching subsystem (app/services/cache_backends.py, app/services/overlay_cache.py) is implemented using 6 software design patterns:

  1. Strategy Pattern (CacheBackend):
    • CacheBackend defines the abstract interface (get_record, set_record, delete, clear, is_available, close).
    • Concrete strategies: MemoryCacheBackend (fast in-process dict), FileCacheBackend (durable atomic JSON files), and ValkeyCacheBackend (external Valkey/Redis or embedded POSIX daemon).
  2. Composite Pattern (TieredCacheBackend):
    • Uniformly treats multi-tier hierarchies as a single cache. Implements hierarchical read-through (reads L1 Memory -> L2 Valkey/Disk; on hit, back-populates earlier tiers) and write-through across all active tiers.
  3. Resilience / Fallback Decorator (FallbackCacheBackend):
    • Wraps a primary backend (Valkey) and secondary backend (FileCache). Catches network partitions, timeouts, and daemon crashes at runtime, transparently routing reads and writes to the fallback backend with zero HTTP errors.
  4. Factory Method (CacheBackendFactory):
    • Dynamically constructs the optimal cache hierarchy based on is_valkey_supported_platform(), feature flags, and environment variables (ENABLE_VALKEY_CACHE, USE_EMBEDDED_VALKEY, VALKEY_URL, REDIS_URL).
  5. Stale-While-Revalidate (SWR) / Cache-Aside (get_or_set):
    • Serves cached data instantly; if expired, returns the stale record immediately to eliminate latency while asynchronously launching a background thread (schedule_refresh) to fetch fresh telemetry.
  6. FaΓ§ade Pattern (overlay_cache.py):
    • Provides a clean, unified public interface (get_or_set, store, get_fresh, get_stale) that hides backend storage, concurrency locks, and serialization details from application route handlers.

4. Configuration & Windows Fallback Matrix

Runtime Environment Valkey Behavior Primary Cache Fallback / Secondary
Windows Desktop (win32) Embedded disabled by platform guard (is_valkey_supported_platform) MemoryCacheBackend (L1) FileCacheBackend (L2 with msvcrt locks)
Windows with Remote URL Connects over TCP to VALKEY_URL / REDIS_URL ValkeyCacheBackend FileCacheBackend (Atomic JSON)
Linux / macOS POSIX Embedded via valkeylite or external URL ValkeyCacheBackend FileCacheBackend (Atomic JSON)
Vercel Serverless Daemon disabled (ephemeral container) MemoryCacheBackend FileCacheBackend (/tmp)

Environment Variables:

  • ENABLE_VALKEY_CACHE=1 (or USE_EMBEDDED_VALKEY=1): Force-enable Valkey caching on supported POSIX platforms.
  • ENABLE_VALKEY_CACHE=0: Force-disable Valkey, falling back to Memory + File cache.
  • VALKEY_URL or REDIS_URL: Connect to external Valkey/Redis instance (e.g. valkey://localhost:6379 or redis://user:pass@host:6379/0).

πŸ€– Setting Up Offline AI Search

  1. Navigate to the Admin Panel (/admin).
  2. Under Offline AI Model Management, click Download Model.
  3. The system will stream the Qwen2.5-Coder-1.5B-Instruct-Q4_K_M.gguf file (~900MB) from HuggingFace to app/models/.
  4. Once downloaded, switch to the πŸ’¬ AI Search tab on the main page to ask natural language questions!

πŸ“ Repository Structure

satellite-tracker/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ models/            # Directory for local GGUF model binaries (git-ignored)
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”œβ”€β”€ admin.py       # Admin dashboard, datastore switch, SQL explorer
β”‚   β”‚   β”œβ”€β”€ auth.py        # Google OAuth2 login & fail-closed local bypass
β”‚   β”‚   β”œβ”€β”€ report.py      # Keyword, proximity, Text-to-SQL, & tracker routes
β”‚   β”‚   β”œβ”€β”€ setup.py       # First-launch SQLite / PostgreSQL wizard
β”‚   β”‚   └── upload.py      # GET form + POST ingest & seed auto-import
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ datastore.py   # Engine URI, schema ensure, snapshot migrate
β”‚   β”‚   β”œβ”€β”€ demo_tle.py    # Bundled demo TLEs when Kaggle file is absent
β”‚   β”‚   β”œβ”€β”€ db_service.py  # SQLAlchemy persistence & deduplication logic
β”‚   β”‚   β”œβ”€β”€ geo_query_service.py # SGP4, country list, name prefixes
β”‚   β”‚   β”œβ”€β”€ sql_console.py # Read-only admin SQL, saved queries, latency
β”‚   β”‚   β”œβ”€β”€ overlay_cache.py # Shared overlay cache (per-feed TTL, stale-while-revalidate)
β”‚   β”‚   β”œβ”€β”€ overlay_http.py # Overlay HTTP + 429/Retry-After host backoff
β”‚   β”‚   β”œβ”€β”€ world_events.py # NASA EONET weather/climate + USGS quakes
β”‚   β”‚   β”œβ”€β”€ city_temperature.py # Million-city 7d/30d/90d/1y temps (Open-Meteo)
β”‚   β”‚   β”œβ”€β”€ market_indices.py # CNBC index levels + Yahoo 7d–10y %
β”‚   β”‚   β”œβ”€β”€ currency_overlay.py # Local units per USD/EUR/yen/gold/oil/Big Mac
β”‚   β”‚   β”œβ”€β”€ flight_overlay.py # OpenSky Network airborne positions
β”‚   β”‚   β”œβ”€β”€ news_overlay.py # Last-24h GDACS + UN / Global Voices / Conversation / DW pins
β”‚   β”‚   β”œβ”€β”€ shipping_overlay.py # Sea lanes + Digitraffic AIS
β”‚   β”‚   β”œβ”€β”€ webcam_overlay.py # Official + OSM public webcam pins
β”‚   β”‚   β”œβ”€β”€ cloud_datacenters.py # AWS / Azure / GCP pins + HTTPS ping p50/p95/p99
β”‚   β”‚   └── tle_parser.py  # TLE line format parsing & checksum validation
β”‚   β”œβ”€β”€ static/            # CSS & JS (basemap.js, datastore.js, tracker.js)
β”‚   β”œβ”€β”€ templates/         # Jinja2 HTML (setup, admin_database, report, …)
β”‚   └── models.py          # Satellite, TLEElement, Upload, SavedQuery
β”œβ”€β”€ docker-compose.yml     # App + postgres:18.6-alpine + test profiles
β”œβ”€β”€ docker/postgres-init/  # Extra test database for Compose pytest
β”œβ”€β”€ data/                  # Local directory for user datasets (git-ignored)
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ index.md           # GitHub Pages landing page
β”‚   β”œβ”€β”€ architecture.md    # System architecture & database schema
β”‚   └── design.md          # UI/UX design tokens & visual components
β”œβ”€β”€ instance/              # SQLite database & file upload storage (git-ignored)
β”œβ”€β”€ config.py              # Application settings
β”œβ”€β”€ requirements.txt       # Dependencies
β”œβ”€β”€ run.py                 # Application launcher
└── run.sh                 # Convenience execution script

🌐 Data sources & attribution

Tracker overlays use free, no-key (or optional free-key) public resources only. The map credit strip and each popup name the source. Clicking a News title opens the publisher article in a new tab (target="_blank" rel="noopener noreferrer").

Layer What you see Free source Attribution / terms
Basemap (default) Dark gray canvas + labels Esri World Dark Gray Tiles Β© Esri β€” Esri, HERE, Garmin, FAO, NOAA, USGS. Reasonable non-commercial use; no Esri API key.
Basemap (optional) CARTO dark_all CARTO basemaps + OpenStreetMap Β© OpenStreetMap contributors Β© CARTO. Requires a free CARTO_API_KEY.
Weather & quakes Weather/climate events plus M4.5+ earthquakes, plus temperature trend pins for cities over 1 million people (latest daily mean and 7d / 30d / 90d / 1y Β°C change). Quake bubbles scale size and color by magnitude. Temp pins color by the 7-day change (blue cooler, red warmer). NASA EONET Β· USGS Β· Open-Meteo ERA5 archive NASA public information; USGS is U.S. Government public-domain data. City temperatures are Open-Meteo daily 2 m means (ERA5 / Copernicus, CC BY 4.0). ERA5 can lag a few days; the popup shows the last available date.
Markets Major world indexes (60+). Level and 1d % from CNBC. 7d / 30d / 1q / 6m / 1y / 2y / 5y / 10y % are calculated locally from Yahoo Finance daily closes (ETF proxy where an index series is missing). Pin color is the 1-day change. CNBC public quotes Β· Yahoo Finance chart daily history Index levels from CNBC public quotes. Longer-horizon % use Yahoo daily closes, cached about an hour, and are not a paid market-data feed. Rank/cap figures are approximate, not a live cap feed.
Currencies Local units needed to buy 1 USD, 1 EUR, 1 yen, 1 oz gold, 1 barrel of oil (WTI), and 1 Big Mac. FX/gold also show 1d / 7d / 30d / 90d / 6m / 1y / 5y %. Pin color is the 1-day change vs USD (more local per $1 = weaker = red). Frankfurter daily FX + XAU Β· CNBC WTI Β· The Economist Big Mac Index End-of-day FX and gold from Frankfurter (official / central-bank sources). Oil is the public CNBC WTI crude quote converted at the local-per-USD rate. Big Mac local prices are The Economist’s published index, not a live restaurant feed.
Flights Airborne aircraft in the current map view. Tooltip/popup state origin, destination, and estimated on-time vs delayed. The OpenSky Network REST /api/states/all Β· adsbdb callsign routes Aircraft positions from The OpenSky Network (SchΓ€fer et al., IPSN 2014). Routes are usual callsign city pairs from adsbdb, not a guaranteed flight plan. On-time is estimated from first-seen time vs typical duration, not an airline schedule.
News Alerts and headlines from the last 24 hours, pinned at published or gazetteer coordinates. Hover shows a short title; click opens the article. GDACS GeoJSON Β· UN News RSS Β· Global Voices (CC BY 3.0) Β· The Conversation (CC BY-ND) Β· Deutsche Welle RSS Free-reuse or attributed RSS/GeoJSON only. Wikipedia featured was dropped (too old). Items without a usable place stay off the map.
Ships Current AIS positions at that moment Fintraffic Digitraffic AIS Live positions are Finland/Baltic only, CC BY 4.0. Hover a vessel for its latest location and timestamp.
Webcams Official public camera pages worldwide; extra OSM pins around world hubs and when zoomed in. Click the title to open the publisher page. USGS Β· NPS Β· NOAA Β· INGV Β· GeoNet Β· vegvesen Β· foto-webcam.eu Β· Traffic Scotland Β· MSS Singapore Β· USAP McMurdo Β· OpenStreetMap via Overpass We link out; we do not host the video. OSM webcam URLs are Β© OpenStreetMap contributors, ODbL.
Cloud DCs AWS (orange), Azure (blue), and GCP (green) region pins. Tooltip shows HTTPS ping p50 / p95 / p99 measured from this SatTrack server. AWS DynamoDB /ping Β· Azure Speed Test public blobs Β· GCPing Cloud Run City-level public geography, not a building address. Latency is HTTPS round-trip (not ICMP) from the app host. Pins render immediately; pings fill in. Cached ~90s.
TLE seed (optional) Catalogue ingest CelesTrak Download and upload locally. A former Kaggle Starlink dump is gone from that URL; if data/kaggle_tle_data.txt is missing, the app seeds bundled demo TLEs (source=demo).
Offline AI model Text-to-SQL Qwen2.5-Coder via Hugging Face Model card / license on Hugging Face. Inference stays in-process (llama-cpp-python).
Web analytics (optional) Pageviews PostHog Loaded only if POSTHOG_PROJECT_API_KEY is set.

No paid market-data, ADS-B, or news APIs are called. Overlay routes do not forward user search text to third parties.


πŸ“Š Sample Datasets & Reference Data

Sample TLE datasets can be retrieved directly from public orbital data sources or Kaggle:

  1. CelesTrak Active Satellites TLE Data:
    CelesTrak Active Satellites β€” Real-time active satellite element sets. Download and upload via /upload.
  2. Local seed file: Save a TLE text file as data/kaggle_tle_data.txt for auto-seeding. If that file is absent, the app inserts bundled demo TLEs marked source=demo. (The old Kaggle Starlink dump that used to be linked here returns 404.)

πŸ€– AI Assistance Acknowledgment

This repository and codebase were developed with pair-programming assistance from Antigravity, an AI agentic coding assistant developed by Google DeepMind. AI tools were used to generate initial code scaffolding, assist with architectural documentation, draft threat models, and format dependency inventories. All code, security controls, and design decisions have been thoroughly reviewed and validated by human maintainers.


🀝 Contributing & License

This demonstration project is open-source under the MIT License. Contributions, bug reports, feature suggestions, and enhancements are welcome! Feel free to fork, adapt, and build upon this project.

About

A Flask-based web application for uploading, parsing, and exploring satellite Two-Line Element (TLE) data. Built with SQLAlchemy + SQLite for persistence and a reporting interface.

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages