How vivekv81/flightz works
Flightz is a Flask flight-fare comparison app. A user searches by route and date in the web interface; the frontend requests the Flask search endpoint, which checks SQLite, then falls back to an external flight API and local JSON data. Available results are validated, may be cached, and receive an ML fare estimate before being returned for display. The README also documents database statistics and benchmarking. The excerpts do not show all route wiring, validation code, or benchmark internals, so those links are omitted where evidence is unavailable.
Main entry points: app.py Search orchestration · script.js Search interface · index.html Search page · train_model.py Model training
Components 17
Web interface
- Browser
- Login and search pages
templates/home.html - Search page
templates/index.html - Search interface
static/script.js
Flight search
- Flask application
app.py - Search orchestration
app.py - Flight validation
app.py - Database statistics
app.py - Search benchmark
benchmark.py
Flight sources
- Flight database
app.py - Flight API
- JSON fallback data
flights.json
Fare estimation
- Fare prediction
app.py - Model training
ml/train_model.py - Deployment model training
ml/train_deployment_model.py - Training dataset
data/Data_Train.xlsx
Other components
- Traveler
Connections 18
- Traveler → Browser: uses
README.md - Browser → Login and search pages: opens
- Browser → Search page: opens
- Search page → Search interface: uses
- Search interface → Flask application: requests flights
static/script.js - Flask application → Search orchestration: routes search
app.py - Search orchestration → Flight database: queries first
app.py - Search orchestration → Flight API: fetches fallback
app.py - Search orchestration → JSON fallback data: searches fallback
app.py - Search orchestration → Flight validation: validates results
README.md - Search orchestration → Fare prediction: adds estimates
app.py - Search orchestration → Flight database: caches API results
app.py - Fare prediction → Model training: loads model
- Model training → Training dataset: trains on
ml/train_model.py - Deployment model training → Training dataset: trains on
ml/train_deployment_model.py - Search orchestration → Search interface: returns results
static/script.js - Flask application → Database statistics: serves statistics
app.py - Search benchmark → Flight database: benchmarks searches