Full-stack flight price scanner built on fast-flights v3 (SOCS cookie bypass): Backend (FastAPI + SQLite): - REST API with rate limiting, Pydantic v2 validation, paginated responses - Scan pipeline: resolves airports, queries every day in the window, saves individual flights + aggregate route stats to SQLite - Background async scan processor with real-time progress tracking - Airport search endpoint backed by OpenFlights dataset - Daily scan window (all dates, not monthly samples) Frontend (React 19 + TypeScript + Tailwind CSS v4): - Dashboard with live scan status and recent scans - Create scan form: country mode or specific airports (searchable dropdown) - Scan detail page with expandable route rows showing individual flights (date, airline, departure, arrival, price) loaded on demand - AirportSearch component with debounced live search and multi-select Database: - scans → routes → flights schema with FK cascade and auto-update triggers - Migrations for schema evolution (relaxed country constraint) Tests: - 74 tests: unit + integration, isolated per-test SQLite DB - Confirmed flight fixtures in tests/confirmed_flights.json (50 real flights, BDS→FMM Ryanair + BDS→DUS Eurowings, scraped Feb 2026) - Integration tests parametrized from confirmed routes Docker: - Multi-stage builds, Compose orchestration, Nginx reverse proxy Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
68 lines
1.9 KiB
Plaintext
68 lines
1.9 KiB
Plaintext
# Flight Radar Web App - Environment Configuration
|
|
# Copy this file to .env and customize for your environment
|
|
|
|
# ============================================================================
|
|
# Backend Configuration
|
|
# ============================================================================
|
|
|
|
# Server Settings
|
|
PORT=8000
|
|
HOST=0.0.0.0
|
|
|
|
# Database
|
|
DATABASE_PATH=/app/data/cache.db
|
|
|
|
# CORS Origins (comma-separated)
|
|
# Development: http://localhost:5173,http://localhost:3000
|
|
# Production: https://yourdomain.com
|
|
ALLOWED_ORIGINS=http://localhost,http://localhost:80
|
|
|
|
# ============================================================================
|
|
# Frontend Configuration
|
|
# ============================================================================
|
|
|
|
# API Base URL (used during build)
|
|
VITE_API_BASE_URL=http://localhost:8000
|
|
|
|
# ============================================================================
|
|
# Docker Configuration
|
|
# ============================================================================
|
|
|
|
# Backend Port (external)
|
|
BACKEND_PORT=8000
|
|
|
|
# Frontend Port (external)
|
|
FRONTEND_PORT=80
|
|
|
|
# ============================================================================
|
|
# Optional: Production Settings
|
|
# ============================================================================
|
|
|
|
# Logging Level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
|
|
LOG_LEVEL=INFO
|
|
|
|
# Rate Limiting (requests per minute)
|
|
RATE_LIMIT_SCANS=10
|
|
RATE_LIMIT_LOGS=30
|
|
RATE_LIMIT_AIRPORTS=100
|
|
RATE_LIMIT_DEFAULT=60
|
|
|
|
# Cache Settings
|
|
CACHE_THRESHOLD_HOURS=24
|
|
|
|
# ============================================================================
|
|
# Notes
|
|
# ============================================================================
|
|
#
|
|
# Development:
|
|
# - Use default settings
|
|
# - CORS allows localhost origins
|
|
# - Verbose logging enabled
|
|
#
|
|
# Production:
|
|
# - Set proper ALLOWED_ORIGINS
|
|
# - Use HTTPS if possible
|
|
# - Adjust rate limits as needed
|
|
# - Consider using environment-specific .env files
|
|
#
|