How priyadarsh912/airindex-india works
AirIndex India collects airfare observations, cleans and scores them, then computes weighted and alternative price indices for CPI-oriented monitoring. Its user-facing workflow is the React dashboard consuming a FastAPI service and presenting index trends, anomalies, backtests, explainability, and observation data. Collection includes live Google Flights scraping and a generated DGCA-modeled reference series; persistence supports a local SQL ledger and Supabase. The README documents additional compliance, basket, and institutional API capabilities, but their internal wiring is not established by the sampled excerpts, so uncertain links are left out or marked unverified.
Main entry points: App.jsx Dashboard application · quality_engine.py Quality pipeline · fast_flights_provider.py FastFlights provider · corridor_runner.py Corridor runner
Components 32
Collection and storage
- FastFlights provider
backend/providers/fast_flights_provider.py - Google Flights scraper
backend/scraper/google_flights.py - Corridor runner
backend/scraper/corridor_runner.py - Autonomous collection
backend/autonomous_scheduler.py - Collector planner
backend/collector_planner.py - Reference data generator
backend/data_generator.py - Observation persistence
backend/database/supabase.py - Database client
backend/db_client.py
Fare processing
- Fare normalizer
backend/fare_normalizer.py - Fee derivation
backend/fee_deriver.py - Fare validation
backend/fare_validator.py - Quality pipeline
backend/quality_engine.py - Flight registry
backend/flight_registry.py
Statistical analytics
- Representative basket
backend/psd_basket_manager.py - Airfare index engine
backend/index_engine.py - Surge and anomalies
backend/anomaly_engine.py - Backtest analytics
backend/backtest_engine.py - Corridor clustering
backend/clustering_engine.py - Collection compliance
backend/compliance_gateway.py
API service
- FastAPI service
backend/main.py
Dashboard
- Dashboard application
frontend/src/App.jsx - Dashboard data hook
frontend/src/hooks/useAirScopeData.js - Index trend view
frontend/src/components/IndexTrendChart.jsx - Observation explorer
frontend/src/components/DataExplorerView.jsx - Surge alerts view
frontend/src/components/SurgeAlertsPanel.jsx - Index explainability
frontend/src/components/ExplainabilityView.jsx - Backtest view
frontend/src/components/BacktestValidationView.jsx - Basket management view
frontend/src/components/PSDBasketView.jsx - Source comparison view
frontend/src/components/SourceComparisonView.jsx - Data integrity view
frontend/src/components/DataIntegrityView.jsx - API documentation view
frontend/src/components/APIDocsView.jsx
Other components
- Institutional user
Connections 28
- Institutional user → Dashboard application: uses
README.md - Dashboard application → Dashboard data hook: loads data
frontend/src/App.jsx - Dashboard application → Index trend view: renders
frontend/src/App.jsx - Dashboard application → Surge alerts view: renders
frontend/src/App.jsx - Dashboard application → Observation explorer: renders
frontend/src/App.jsx - Dashboard application → Index explainability: renders
frontend/src/App.jsx - Dashboard application → Backtest view: renders
frontend/src/App.jsx - Dashboard application → Data integrity view: renders
frontend/src/App.jsx - Dashboard application → API documentation view: renders
frontend/src/App.jsx - Dashboard application → Basket management view: renders
frontend/src/App.jsx - Dashboard application → Source comparison view: renders
frontend/src/App.jsx - FastFlights provider → Google Flights scraper: scrapes via
backend/providers/fast_flights_provider.py - FastFlights provider → Fare normalizer: normalizes via
backend/providers/fast_flights_provider.py - Google Flights scraper → Observation persistence: persists observations
- Corridor runner → Google Flights scraper: uses scraper
backend/scraper/corridor_runner.py - Corridor runner → Database client: uses client
backend/scraper/corridor_runner.py - Autonomous collection → Corridor runner: dispatches
- Collector planner → FastFlights provider: selects provider
backend/collector_planner.py - Observation persistence → Database client: uses ledger
backend/database/supabase.py - Quality pipeline → Fare validation: validates fares
backend/quality_engine.py - Quality pipeline → Fare normalizer: normalizes classes
backend/quality_engine.py - Quality pipeline → Airfare index engine: cleaned data
README.md - Representative basket → Airfare index engine: supplies weights
backend/index_engine.py - Reference data generator → Backtest analytics: generates benchmark
backend/backtest_engine.py - Surge and anomalies → Surge alerts view: alerts shown in
- Airfare index engine → Index explainability: contributions shown in
- Backtest analytics → Backtest view: results shown in
- FastAPI service → Dashboard data hook: serves data