How akritivishwakarma2007/airiva works
Airiva is a high-frequency Indian domestic airfare index. Its principal workflow gathers airline and OTA fares, retains sold-out observations for audit while filtering and deduplicating quotes for analysis, computes passenger-weighted Törnqvist index series, stores them, and exposes results through a dashboard and REST API. The graph reflects README-documented capabilities and sampled source; unsampled modules are included only where their roles are documented, and uncertain internal wiring is omitted.
Main entry points: index_engine/runner.py Index runner · main.py FastAPI application · scraper/runner.py Scraper runner · quotes.py Quote endpoints
Components 26
Fare ingestion
- Scraper runner
apix/scraper/runner.py - Carrier scrapers
apix/scraper - OTA scraper
apix/scraper/makemytrip.py - Raw scrape storage
apix/scraper/storage.py
Quote processing
- Quote loader
apix/pipeline/loader.py - Quote normalization
apix/pipeline/normalizer.py - Direct OTA deduplication
apix/pipeline/deduplicator.py - IQR outlier filtering
apix/pipeline/outlier_filter.py - Quote database
apix/pipeline/db.py
Index and validation
- Index runner
apix/index_engine/runner.py - DGCA route weights
apix/index_engine/weights.py - Törnqvist calculation
apix/index_engine/tornqvist.py - Time aggregation
apix/index_engine/aggregator.py - Index values
apix/index_engine/runner.py - Backtest and CPI benchmark
apix/backtest
API and dashboard
- FastAPI application
apix/api/main.py - Index endpoints
apix/api/routers/index.py - Quote endpoints
apix/api/routers/quotes.py - Admin endpoints
apix/api/routers/admin.py - Role authorization
apix/api/auth.py - Interactive dashboard
apix/dashboard/app.js
Other components
- Analyst or admin
- Airline sites
- MakeMyTrip
- DGCA statistics
- Supabase
Connections 27
- Scraper runner → Carrier scrapers: dispatches
- Scraper runner → OTA scraper: dispatches
- Carrier scrapers → Airline sites: collect fares
- OTA scraper → MakeMyTrip: collect fares
- Scraper runner → Raw scrape storage: stores raw payloads
- Raw scrape storage → Supabase: uploads sanitized data
- Quote loader → Quote normalization: processes quotes
- Quote normalization → Direct OTA deduplication: normalizes quotes
- Direct OTA deduplication → IQR outlier filtering: flags duplicates
- IQR outlier filtering → Quote database: persists quotes and flags
- Index runner → Quote database: reads quotes
- Index runner → DGCA route weights: loads route weights
- DGCA route weights → DGCA statistics: derives traffic weights
- Index runner → Törnqvist calculation: computes index
- Index runner → Time aggregation: aggregates series
- Index runner → Index values: upserts index values
- Backtest and CPI benchmark → DGCA statistics: parses published statistics
- Analyst or admin → FastAPI application: requests data
- FastAPI application → Index endpoints: routes requests
- FastAPI application → Quote endpoints: routes requests
- FastAPI application → Admin endpoints: routes requests
- Index endpoints → Index values: reads index series
- Quote endpoints → Quote database: reads raw quotes
- Admin endpoints → Role authorization: checks permissions
- Quote endpoints → Role authorization: checks permissions
- FastAPI application → Interactive dashboard: serves dashboard
- Interactive dashboard → Supabase: queries fare quotes