# tharuntulasi06/ola-bike-ride-request-forecasting architecture

> Architecture diagram of the GitHub repository tharuntulasi06/ola-bike-ride-request-forecasting, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tharuntulasi06/ola-bike-ride-request-forecasting
- Repository: https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting

## Overview

This is an Ola ride-demand forecasting and fleet-operations system. Its primary workflow ingests ride, GPS, and weather data; builds spatial clusters and temporal features; trains forecasting models; serves predictions and operational analytics through FastAPI; and presents them in a fleet dashboard. Evaluation, explainability, DuckDB analytics, and the ST-GNN are additional product capabilities. Several model and analytics modules were not excerpted, so those branches reflect README documentation; unsupported internal calls are omitted.

Main entry points: [`src/train.py`](https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/src/train.py) (Training entry point), [`api/main.py`](https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/api/main.py) (FastAPI service), [`dashboard/app/page.tsx`](https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/dashboard/app/page.tsx) (Dashboard page), [`src/data_loader.py`](https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/src/data_loader.py) (Dataset loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Data ingestion"]
  node_loader["Dataset loader<br/>[data_loader.py]"]
end

subgraph group_forecast["Forecasting pipeline"]
  node_features["Spatial features<br/>[feature_builder.py]"]
  node_train["Training entry point<br/>[train.py]"]
  node_trainer["GBDT ensemble<br/>[trainer.py]"]
  node_gnn["ST-GNN model<br/>[st_gnn_model.py]"]
  node_evaluation["Model evaluation<br/>[evaluate.py]"]
  node_explain["Model explainability<br/>[explainability.py]"]
end

subgraph group_serve["API and analytics"]
  node_api["FastAPI service<br/>[main.py]"]
  node_database[("DuckDB analytics<br/>[db.py]")]
end

subgraph group_dashboard["Fleet dashboard"]
  node_dashboard["Dashboard page<br/>[page.tsx]"]
  node_client["API client<br/>[api.ts]"]
  node_panels["Fleet dashboard panels"]
end

node_operator(("Fleet operator"))
node_sources["Ride and weather data"]

node_sources -->|"provides datasets"| node_loader
node_loader -->|"supplies ride data"| node_features
node_features -->|"builds features"| node_train
node_train -->|"trains ensemble"| node_trainer
node_train -.->|"uses model"| node_gnn
node_trainer -->|"serves predictions"| node_api
node_api -->|"queries analytics"| node_database
node_api -->|"provides REST data"| node_client
node_operator -.->|"uses dashboard"| node_dashboard
node_dashboard -->|"requests data"| node_client
node_dashboard -->|"renders panels"| node_panels

click node_loader "https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/src/data_loader.py"
click node_features "https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/src/feature_builder.py"
click node_train "https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/src/train.py"
click node_trainer "https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/src/trainer.py"
click node_gnn "https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/src/st_gnn_model.py"
click node_evaluation "https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/src/evaluate.py"
click node_explain "https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/src/explainability.py"
click node_api "https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/api/main.py"
click node_database "https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/src/db.py"
click node_dashboard "https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/dashboard/app/page.tsx"
click node_client "https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/dashboard/lib/api.ts"
click node_panels "https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/tree/main/dashboard/components"

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_loader toneBlue
class node_features,node_train,node_trainer,node_gnn,node_evaluation,node_explain toneAmber
class node_api,node_database toneMint
class node_dashboard,node_client,node_panels toneRose
class node_operator,node_sources toneIndigo
```

## Components

### Data ingestion

- [Dataset loader](https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/src/data_loader.py): `src/data_loader.py`

### Forecasting pipeline

- [Spatial features](https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/src/feature_builder.py): `src/feature_builder.py`
- [Training entry point](https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/src/train.py): `src/train.py`
- [GBDT ensemble](https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/src/trainer.py): `src/trainer.py`
- [ST-GNN model](https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/src/st_gnn_model.py): `src/st_gnn_model.py`
- [Model evaluation](https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/src/evaluate.py): `src/evaluate.py`
- [Model explainability](https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/src/explainability.py): `src/explainability.py`

### API and analytics

- [FastAPI service](https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/api/main.py): `api/main.py`
- [DuckDB analytics](https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/src/db.py): `src/db.py`

### Fleet dashboard

- [Dashboard page](https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/dashboard/app/page.tsx): `dashboard/app/page.tsx`
- [API client](https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/blob/main/dashboard/lib/api.ts): `dashboard/lib/api.ts`
- [Fleet dashboard panels](https://github.com/tharuntulasi06/ola-bike-ride-request-forecasting/tree/main/dashboard/components): `dashboard/components`

### Other components

- **Fleet operator**
- **Ride and weather data**

## Connections

- Ride and weather data → Dataset loader: provides datasets (evidence: `README.md`)
- Dataset loader → Spatial features: supplies ride data (evidence: `README.md`)
- Spatial features → Training entry point: builds features (evidence: `README.md`)
- Training entry point → GBDT ensemble: trains ensemble (evidence: `src/train.py`)
- Training entry point → ST-GNN model: uses model (evidence: `README.md`)
- GBDT ensemble → FastAPI service: serves predictions (evidence: `api/main.py`)
- FastAPI service → DuckDB analytics: queries analytics (evidence: `api/main.py`)
- FastAPI service → API client: provides REST data (evidence: `dashboard/lib/api.ts`)
- Fleet operator → Dashboard page: uses dashboard (evidence: `README.md`)
- Dashboard page → API client: requests data (evidence: `dashboard/app/page.tsx`)
- Dashboard page → Fleet dashboard panels: renders panels (evidence: `dashboard/app/page.tsx`)
