Skip to content

GPS tracking and airspace reservation system for small aviation - aircraft, drones, paragliders, and hot air balloons

License

Notifications You must be signed in to change notification settings

mihrans/SmallAviationMonitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

26 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SmallAviationMonitor

A worldwide GPS device monitoring system for aviation traffic with real-time tracking via Progressive Web App.

Project Status License Cloudflare

πŸš€ Live URLs

πŸ“‹ Project Overview

SmallAviationMonitor is a real-time GPS tracking and airspace monitoring web application designed for pilots operating various types of aircraft including small and large aircraft, drones, paragliders, and hot air balloons. The system enables worldwide traffic monitoring through a Progressive Web App that works on iOS and Android.

Current Status: βœ… PRODUCTION

The system is fully deployed and operational:

  • βœ… Frontend: Deployed on Cloudflare Pages
  • βœ… Backend API: Running on Cloudflare Workers
  • βœ… Database: Cloudflare D1 (SQLite) with 7 tables
  • βœ… GPS Logger: Progressive Web App (iOS & Android)

πŸ“± GPS Logger PWA

Quick Start

  1. Visit: https://smallaviationmonitor.pages.dev/download
  2. Scan QR code with your phone
  3. iOS: Safari β†’ Share β†’ "Add to Home Screen"
  4. Android: Chrome β†’ "Install app"
  5. Open app, configure device, start tracking!

Features

  • βœ… Works on iOS (Safari 11.3+) & Android (Chrome, Edge)
  • βœ… No app store required
  • βœ… Full GPS/location access with high accuracy
  • βœ… Offline support with IndexedDB + background sync
  • βœ… 5-second update interval
  • βœ… Device configuration (aircraft type, name, phone)
  • βœ… Live position display (lat, lng, altitude, speed, heading)
  • βœ… Automatic updates

Why PWA?

  • For iOS: No $99/year Apple Developer account needed
  • For Android: No Google Play approval process
  • For Everyone: Instant updates, cross-platform, smaller footprint
  • Full GPS: Same location accuracy as native apps

See PWA Documentation for complete details.

🎯 Key Features

βœ… Currently Live

GPS Tracking (PWA)

  • Progressive Web App installable on iOS and Android
  • High-accuracy GPS tracking with 5-second updates
  • Offline support with background sync
  • Real-time telemetry (position, speed, heading, altitude)
  • Device configuration and management
  • Auto-generated device IDs

Monitoring Dashboard

  • Real-time GPS device tracking on interactive map
  • Multiple device type support (aircraft, drone, paraglider, balloon)
  • Device status monitoring (online/offline/warning)
  • Connection statistics dashboard
  • Modern responsive UI with dark/light mode
  • Live position updates

Backend Infrastructure

  • RESTful API on Cloudflare Workers
  • Global edge deployment for low latency
  • Cloudflare D1 database (7 tables)
  • CORS-enabled public API
  • Health monitoring endpoint
  • Automatic scaling

πŸ“‹ Planned Features

  • User authentication and pilot accounts
  • Airspace reservation system (GPS polygons)
  • Alert queue for notifications
  • Historical playback of flight paths
  • Push notifications (when Safari supports)
  • Native mobile apps (currently archived)

πŸ› οΈ Technology Stack

Frontend

  • Framework: React 18 + TypeScript
  • Build Tool: Vite
  • UI Library: shadcn/ui (Radix UI components)
  • Styling: Tailwind CSS
  • State Management: TanStack Query
  • Routing: React Router v6
  • PWA: Service Worker + IndexedDB
  • Deployment: Cloudflare Pages

Backend

  • Runtime: Cloudflare Workers (serverless)
  • Language: TypeScript
  • Database: Cloudflare D1 (SQLite)
  • API: RESTful
  • Deployment: Wrangler CLI

GPS Logger PWA

  • Frontend: React + TypeScript
  • GPS: Geolocation API (watchPosition with high accuracy)
  • Offline: Service Worker + IndexedDB queuing
  • Sync: Background Sync API
  • Manifest: PWA manifest.json for installability

πŸ“– API Documentation

GPS Position Endpoint

POST /api/v1/gps/position
Content-Type: application/json

{
  "deviceId": "pwa_1234567890_abc123",
  "deviceType": "aircraft",
  "position": {
    "lat": 40.7128,
    "lng": -74.0060,
    "altitude": 100,
    "altitudeUnit": "meters"
  },
  "telemetry": {
    "speed": 120,
    "speedUnit": "kmh",
    "heading": 90,
    "accuracy": 10
  },
  "device": {
    "name": "John Doe",
    "pilot": "John Doe",
    "contact": "+1234567890"
  },
  "timestamp": "2024-01-15T12:00:00.000Z",
  "source": "pwa"
}

Other Endpoints

  • GET /api/v1/devices - List all devices
  • POST /api/v1/devices - Register device
  • GET /api/v1/devices/:id - Get device details
  • POST /api/v1/reservations - Create airspace reservation
  • GET /api/v1/reservations - List reservations
  • GET /health - Health check

See API Specifications for complete documentation.

πŸ—‚οΈ Project Structure

SmallAviationMonitor/
β”œβ”€β”€ backend/                   # Cloudflare Workers API
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   └── index.ts          # Main API worker (500+ lines)
β”‚   β”œβ”€β”€ schema/
β”‚   β”‚   └── init.sql          # Database schema (7 tables)
β”‚   └── wrangler.toml         # Cloudflare configuration
β”œβ”€β”€ frontend/                  # React + TypeScript frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/       # 15+ React components
β”‚   β”‚   β”‚   β”œβ”€β”€ PWAGPSLogger.tsx  # PWA GPS tracker (600+ lines)
β”‚   β”‚   β”‚   β”œβ”€β”€ MobileDownload.tsx # Download page
β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   β”œβ”€β”€ pages/            # Index, Download, PWA, NotFound
β”‚   β”‚   └── contexts/         # App state management
β”‚   β”œβ”€β”€ public/
β”‚   β”‚   β”œβ”€β”€ manifest.json     # PWA manifest
β”‚   β”‚   β”œβ”€β”€ service-worker.js # Service worker
β”‚   β”‚   └── pwa-icon-*.svg    # PWA icons
β”‚   └── PWA-README.md         # PWA documentation
β”œβ”€β”€ docs/                      # Complete documentation (15+ files)
β”‚   β”œβ”€β”€ product-vision.md
β”‚   β”œβ”€β”€ functionality-planning.md
β”‚   β”œβ”€β”€ architecture.md
β”‚   β”œβ”€β”€ api-specifications.md
β”‚   └── ...
β”œβ”€β”€ _ARCHIVED/                 # Future features (not in active development)
β”‚   β”œβ”€β”€ mobile/               # React Native app (for future use)
β”‚   └── _INCOMING/            # Previous codebase
└── README.md                  # This file

πŸ’» Local Development

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Wrangler CLI: npm install -g wrangler

Backend

cd backend
npm install
wrangler dev
# API runs at http://localhost:8787

Frontend

cd frontend
npm install
npm run dev
# App runs at http://localhost:5173

PWA (Local)

cd frontend
npm run dev
# Open http://localhost:5173/pwa

πŸš€ Deployment

Automated Deployment (GitHub Actions)

The project automatically deploys when you push to main:

  • Frontend β†’ Cloudflare Pages
  • Backend β†’ Cloudflare Workers

Note: Configure CLOUDFLARE_API_TOKEN in GitHub secrets for auto-deployment.

Manual Deployment

Backend

cd backend
npm install
wrangler deploy

Frontend

cd frontend
npm install
npm run build
npm run deploy

πŸ“š Documentation

Getting Started

Deployment

Features

Planning

🎯 Current Focus: PWA Only

Note: Native mobile apps (Android APK and iOS apps) are currently archived in _ARCHIVED/mobile/. We're focusing on the Progressive Web App solution which:

  • βœ… Works on both iOS and Android
  • βœ… No app store approval required
  • βœ… Instant updates
  • βœ… Same GPS capabilities as native apps
  • βœ… Smaller footprint
  • βœ… Cross-platform with single codebase

Native apps will be enabled later when needed.

🀝 Contributing

See CONTRIBUTING.md for guidelines.

πŸ“„ License

This project is licensed under the MIT License - see LICENSE.md for details.

πŸ†˜ Support

πŸ“Š Project Status

Component Status URL/Details
Frontend Dashboard βœ… Production https://smallaviationmonitor.pages.dev
GPS Logger PWA βœ… Production https://smallaviationmonitor.pages.dev/pwa
Download Page βœ… Production https://smallaviationmonitor.pages.dev/download
Backend API βœ… Production https://smallaviationmonitor-api.administrator-112.workers.dev
Database (D1) βœ… Production 7 tables initialized
CI/CD Pipeline βœ… Configured GitHub Actions
Documentation βœ… Complete 40,000+ words, 20+ files
Native Apps πŸ“¦ Archived Available in _ARCHIVED/mobile/

πŸ“ˆ Statistics

  • Total Files: 100+ files
  • Lines of Code: 5,000+ lines
  • Documentation: 40,000+ words (20+ markdown files)
  • React Components: 15+ components
  • API Endpoints: 8+ REST endpoints
  • Database Tables: 7 tables with 18 indexes
  • Git Commits: 18+ commits
  • Deployment: Fully automated via GitHub Actions

🌟 Features Highlight

For End Users

  • πŸ“± Progressive Web App (no app store)
  • 🌍 Worldwide GPS tracking
  • πŸ“‘ 5-second position updates
  • πŸ’Ύ Offline support with sync
  • 🎯 High-accuracy GPS mode
  • πŸ”„ Automatic app updates
  • πŸ“Š Live dashboard monitoring
  • 🎨 Clean, modern interface

For Developers

  • ⚑ Serverless architecture (Cloudflare Workers)
  • πŸ—„οΈ Edge database (D1/SQLite)
  • 🌐 Global CDN deployment
  • πŸ”’ HTTPS everywhere
  • πŸ“ Complete documentation
  • πŸ”„ CI/CD automation
  • πŸ› οΈ Modern tech stack (React 18, TypeScript, Vite)
  • πŸ§ͺ Ready for testing and extension

SmallAviationMonitor - Tracking aviation worldwide, one GPS signal at a time. ✈️🚁πŸͺ‚πŸŽˆ

Made with ❀️ using Cloudflare Edge Platform

About

GPS tracking and airspace reservation system for small aviation - aircraft, drones, paragliders, and hot air balloons

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages