Professional Flight & Airport Management API with Real-time Capabilities
A modern flight tracking and management system built with Swift, Vapor, PostgreSQL, and Redis.
- Real-time Flight Tracking: Monitor flights with live updates
- Comprehensive Data Model: Aircraft, airports, flights, bookings, and more
- Advanced Caching: Redis-powered caching for high performance
- State Management: FlightStateEngine with snapshots and streaming
- Timeline Generation: Detailed flight event timelines
- Modular Architecture: Clean separation of concerns
- Docker Support: Easy deployment with PostgreSQL and Redis
┌───────────────────────────────────────────────────────────────┐
│ AeroNexus Architecture │
├─────────────────┬─────────────────┬─────────────────┬─────────────┤
│ AeroNexusCore │ AeroNexusAPI │ AeroNexusCLI │ Database │
│ (Business Logic)│ (HTTP API) │ (CLI Tools) │ (PostgreSQL)│
└─────────────────┴─────────────────┴─────────────────┴─────────────┘
│
▼
┌───────────────────────────────────────────────────────────────┐
│ Redis Cache │
│ ┌─────────────┐ ┌─────────────┐ ┌───────────────────┐ │
│ │ Flight Cache │ │ Timeline │ │ State Snapshots │ │
│ │ │ │ Cache │ │ │ │
│ └─────────────┘ └─────────────┘ └───────────────────┘ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Pub/Sub Channels │ │
│ │ ┌─────────────────┐ │ │
│ │ │ flight:state:updates │ │
│ │ └─────────────────┘ │ │
│ └─────────────────────────────────────────────────────────┘ │
└───────────────────────────────────────────────────────────────┘
- Backend: Swift 6, Vapor 4
- Database: PostgreSQL (production), SQLite (development)
- Cache: Redis with RediStack
- API: RESTful endpoints with JSON
- Real-time: Server-Sent Events (SSE)
- Deployment: Docker with multi-container setup
- Containerization: Docker & Docker Compose
- Testing: XCTest with XCTVapor
All endpoints are prefixed with /v1/:
GET /v1/flights # List all flights
POST /v1/flights # Create flight
GET /v1/flights/:id # Get flight details
PUT /v1/flights/:id # Update flight
DELETE /v1/flights/:id # Delete flight
GET /v1/flights/:id/timeline # Get flight timeline
- Gates:
/v1/gates - Passengers:
/v1/passengers - Bookings:
/v1/bookings - Baggage:
/v1/baggage
All endpoints require an API key via the Authorization header:
Authorization: Bearer <API_KEY>
Example request with curl:
curl -H "Authorization: Bearer <API_KEY>" http://localhost:8080/v1/flights
curl -X POST http://localhost:8080/v1/flights \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"number": "ANX123",
"origin": "JFK",
"destination": "LAX",
"departure_at": "2024-03-01T10:00:00Z",
"arrival_at": "2024-03-01T13:00:00Z"
}'
Q: Cómo obtengo un API Key? A: Solicita acceso al administrador del sistema o consulta la documentación interna.
Q: Qué formato tienen las respuestas? A: Todas las respuestas son JSON estructurado.
Q: Hay límites de uso? A: Sí, existen límites de peticiones por minuto según el plan contratado.
# Clone repository
git clone https://github.com/your-username/AeroNexus.git
cd AeroNexus
# Configure database (or use defaults)
export DB_HOST=localhost
export DB_USER=vapor
export DB_PASS=vapor
export DB_NAME=aeronexus
# Build and run
swift build -c release
swift run# Build and start containers
docker compose build
docker compose up
# Access API at http://localhost:8080/v1/flightsswift testMIT License © 2024 Alex Beltran
This project is licensed under the MIT License - see the LICENSE file for details.
- Free to use: Anyone can use, modify, and distribute the software
- Attribution required: Must include copyright notice in all copies
- No liability: Software provided "AS IS" without warranty
- Open source: Encourages contribution and community use
- License Type: MIT (Most permissive open source license)
- SPDX Identifier: MIT
- OSI Approved: Yes
- GitHub License Template: Standard MIT License
For more information about open source licensing, visit:
Alex Beltran Lead Developer, AeroNexus alexbeltrn@icloud.com
Professional. Minimal. Production-Ready.