# ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor- architecture

> Architecture diagram of the GitHub repository ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-
- Repository: https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-

## Overview

AeroFare is a Streamlit flight-fare forecasting and booking-advisor dashboard. Users explore market and model insights, enter a flight itinerary for a fare estimate and booking recommendation, or upload CSV queries for batch predictions. Dataset loading and model training form the preparation path; the saved pipeline and metrics support inference and dashboard explainability. The dashboard’s market, benchmark, and data-explorer capabilities are documented, but their implementation details are not fully excerpted, so those branches are shown at the application level.

Main entry points: [`app.py`](https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/app.py) (Streamlit Dashboard), [`models/flight_price_pipeline.pkl`](https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/models/flight_price_pipeline.pkl) (Trained Pipeline), [`train_model.py`](https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/train_model.py) (Model Training), [`dataset_loader.py`](https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/dataset_loader.py) (Dataset Loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Dashboard"]
  node_dashboard["Streamlit Dashboard<br/>[app.py]"]
  node_market["Market Intelligence<br/>[app.py]"]
  node_benchmarks["Model Benchmarks<br/>[app.py]"]
  node_data_explorer["Data Explorer<br/>[app.py]"]
end

subgraph group_data["Flight Data"]
  node_loader["Dataset Loader<br/>[dataset_loader.py]"]
  node_benchmark_data["Benchmark Dataset"]
end

subgraph group_model["Model Lifecycle"]
  node_training["Model Training<br/>[train_model.py]"]
  node_pipeline["Trained Pipeline"]
  node_metrics["Model Metrics<br/>[model_metrics.json]"]
end

subgraph group_advisory["Fare Services"]
  node_inference["Fare Inference<br/>[predict.py]"]
  node_booking_advisor["Booking Advisor<br/>[predict.py]"]
  node_price_curve["Price Sensitivity<br/>[predict.py]"]
  node_batch["Batch Prediction<br/>[predict.py]"]
end

node_traveler(("Dashboard User"))

node_traveler -->|"uses"| node_dashboard
node_dashboard -->|"loads data"| node_loader
node_loader -->|"reads fallback"| node_benchmark_data
node_training -->|"loads data"| node_loader
node_training -->|"saves model"| node_pipeline
node_training -->|"saves metrics"| node_metrics
node_dashboard -->|"requests forecast"| node_inference
node_dashboard -->|"requests advice"| node_booking_advisor
node_dashboard -->|"requests curve"| node_price_curve
node_dashboard -->|"requests batch"| node_batch
node_inference -->|"loads model"| node_pipeline
node_price_curve -->|"predicts prices"| node_pipeline
node_batch -->|"predicts fares"| node_pipeline
node_dashboard -->|"reads metadata"| node_metrics
node_dashboard -->|"presents analysis"| node_market
node_dashboard -->|"presents results"| node_benchmarks
node_dashboard -->|"browses records"| node_data_explorer

click node_dashboard "https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/app.py"
click node_market "https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/app.py"
click node_benchmarks "https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/app.py"
click node_data_explorer "https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/app.py"
click node_loader "https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/dataset_loader.py"
click node_benchmark_data "https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/flight_price_dataset.csv"
click node_training "https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/train_model.py"
click node_pipeline "https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/models/flight_price_pipeline.pkl"
click node_metrics "https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/models/model_metrics.json"
click node_inference "https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/predict.py"
click node_booking_advisor "https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/predict.py"
click node_price_curve "https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/predict.py"
click node_batch "https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/predict.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dashboard,node_market,node_benchmarks,node_data_explorer,node_traveler toneBlue
class node_loader,node_benchmark_data toneAmber
class node_training,node_pipeline,node_metrics toneMint
class node_inference,node_booking_advisor,node_price_curve,node_batch toneRose
```

## Components

### Dashboard

- [Streamlit Dashboard](https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/app.py): `app.py`
- [Market Intelligence](https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/app.py): `app.py`
- [Model Benchmarks](https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/app.py): `app.py`
- [Data Explorer](https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/app.py): `app.py`

### Flight Data

- [Dataset Loader](https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/dataset_loader.py): `dataset_loader.py`
- [Benchmark Dataset](https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/flight_price_dataset.csv): `flight_price_dataset.csv`

### Model Lifecycle

- [Model Training](https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/train_model.py): `train_model.py`
- [Trained Pipeline](https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/models/flight_price_pipeline.pkl): `models/flight_price_pipeline.pkl`
- [Model Metrics](https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/models/model_metrics.json): `models/model_metrics.json`

### Fare Services

- [Fare Inference](https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/predict.py): `predict.py`
- [Booking Advisor](https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/predict.py): `predict.py`
- [Price Sensitivity](https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/predict.py): `predict.py`
- [Batch Prediction](https://github.com/ashelledsouza/aerofare-intelligence-flight-price-prediction-smart-booking-advisor-/blob/main/predict.py): `predict.py`

### Other components

- **Dashboard User**

## Connections

- Dashboard User → Streamlit Dashboard: uses (evidence: `README.md`)
- Streamlit Dashboard → Dataset Loader: loads data (evidence: `app.py`)
- Dataset Loader → Benchmark Dataset: reads fallback (evidence: `dataset_loader.py`)
- Model Training → Dataset Loader: loads data (evidence: `train_model.py`)
- Model Training → Trained Pipeline: saves model (evidence: `train_model.py`)
- Model Training → Model Metrics: saves metrics (evidence: `train_model.py`)
- Streamlit Dashboard → Fare Inference: requests forecast (evidence: `app.py`)
- Streamlit Dashboard → Booking Advisor: requests advice (evidence: `README.md`)
- Streamlit Dashboard → Price Sensitivity: requests curve (evidence: `README.md`)
- Streamlit Dashboard → Batch Prediction: requests batch (evidence: `app.py`)
- Fare Inference → Trained Pipeline: loads model (evidence: `predict.py`)
- Price Sensitivity → Trained Pipeline: predicts prices (evidence: `predict.py`)
- Batch Prediction → Trained Pipeline: predicts fares (evidence: `predict.py`)
- Streamlit Dashboard → Model Metrics: reads metadata (evidence: `app.py`)
- Streamlit Dashboard → Market Intelligence: presents analysis (evidence: `README.md`)
- Streamlit Dashboard → Model Benchmarks: presents results (evidence: `README.md`)
- Streamlit Dashboard → Data Explorer: browses records (evidence: `README.md`)
