0% found this document useful (0 votes)
8 views43 pages

Content

The document presents a project report for 'RideFlow', a comprehensive ride-hailing application developed as part of a Bachelor of Engineering program at Parul University. It details the system's architecture, features such as real-time GPS tracking, dynamic fare calculation, and weather-aware ETA, as well as the technologies used in its development. The project aims to address common issues in ride-hailing services, enhancing both rider and driver experiences through advanced technical solutions.

Uploaded by

raghav.dubey.606
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views43 pages

Content

The document presents a project report for 'RideFlow', a comprehensive ride-hailing application developed as part of a Bachelor of Engineering program at Parul University. It details the system's architecture, features such as real-time GPS tracking, dynamic fare calculation, and weather-aware ETA, as well as the technologies used in its development. The project aims to address common issues in ride-hailing services, enhancing both rider and driver experiences through advanced technical solutions.

Uploaded by

raghav.dubey.606
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Parul Parul

University

University NAAC
PARUL UNIVERSITY
Vadodara, Gujarat, India A++
ACCREDITED UNIVERSITY

RideFlow
An Uber Drive Clone — Full-Featured
Real-Time Ride Hailing System
MINOR PROJECT REPORT
Submitted in partial fulfillment of the requirements for the Award of
Bachelor of Engineering — Computer Science & Engineering

Submitted To:
[PARUL UNIVERSITY, VADODARA, GUJARAT (INDIA)]

Submitted By:
PLABONI SATPATHY (2303051240202)
ADITYA SOHNER (230305124016)
SIDDHESH PANDIT (2303051240314)
ABHIJIT KUMAR (2303051240008)

Under the Guidance of:

Ms. Kiran Sharma


(Assistant Professor, Department of Computer Science & Engineering)

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING


PARUL INSTITUTE OF TECHNOLOGY, VADODARA, GUJARAT — 391760

Academic Year: 2025–2026


CERTIFICATE

This is to certify that the project report entitled RideFlow — An Uber Drive Clone: Full-Featured
Real-Time Ride Hailing System submitted by the following students of the B.E. (Computer Science
& Engineering) Programme of Parul Institute of Technology, Vadodara, is a bonafide record of the
work carried out by them under my supervision during the academic year 2025–2026.

The project embodies original research and development work and has not been submitted
elsewhere for the award of any degree, diploma, or certificate.

PLABONI SATPATHY — Enrollment No. 2303051240202

ADITYA SOHNER — Enrollment No. 230305124016

SIDDHESH PANDIT — Enrollment No. 2303051240314

ABHIJIT KUMAR — Enrollment No. 2303051240008

Project Guide:

Ms. Kiran Sharma

Assistant Professor, Department of CSE

Parul Institute of Technology, Vadodara

Signature:

Head of Department:

Prof. Sumitra Menaria, HOD — CSE

Signature:

Principal:

Dr. Swapnil Parikh, Principal — Parul Institute of Technology

Signature:

Date: Place: Vadodara, Gujarat

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 2


DECLARATION
We, the undersigned, students of the Bachelor of Engineering Programme in Computer Science &
Engineering at Parul Institute of Technology, Vadodara, hereby solemnly declare that the project
report entitled RideFlow — An Uber Drive Clone: Full-Featured Real-Time Ride Hailing System
is prepared by us and is based on our own original work carried out during the academic year 2025–
2026, under the supervision of Ms. Kiran Sharma, Assistant Professor, CSE.

We further certify that:

• The work contained in this report is entirely original and has been done by us under the general
supervision of our guide.
• The report has not been submitted to any other institution or university for the award of any
degree, diploma, certificate, or any other academic distinction.
• We have followed all guidelines provided by the university in the preparation of this report.
• Wherever materials, data, theoretical analysis, and text from other sources have been used,
appropriate credit has been given in the text and in the References section.
• All views expressed in this report are those of the student group and do not necessarily
represent those of the institution, the guide, or Parul University.

PLABONI SATPATHY (2303051240202) Signature:

ADITYA SOHNER (2303051240016) Signature:

ABHIJIT KUMAR (2303051240008) Signature:

SIDDHESH PANDIT (2303051240314) Signature:

Date:

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 3


ACKNOWLEDGEMENT
The successful completion of this project has been possible only due to the cooperative efforts of
many individuals, and we take this opportunity to express our heartfelt gratitude to all of them.

We extend our deepest gratitude to our project guide, Ms. Kiran Sharma, Assistant Professor,
Department of Computer Science & Engineering, Parul Institute of Technology, for her invaluable
guidance, constant encouragement, and constructive criticism throughout the development of this
project. Her deep expertise in software engineering and her patient mentorship helped us navigate
the complex technical challenges of building a real-time, distributed ride-hailing platform.

We are deeply grateful to Prof. Sumitra Menaria, Head of the Department of Computer Science &
Engineering, for providing us with the academic environment and resources necessary to undertake
this ambitious project, and for her consistent motivation to push the boundaries of our technical
capabilities.

Our sincere thanks go to Dr. Swapnil Parikh, Principal, Parul Institute of Technology, for his
visionary leadership and for creating an institution-wide culture of innovation and excellence that
inspired us throughout this journey.

We also thank the faculty and staff of the Computer Science & Engineering Department for their
support, guidance, and the excellent academic foundation they have built for us over the past years
of our engineering education.

We acknowledge the open-source communities behind OSRM, Redis, Apache Kafka, PostgreSQL,
React Native, and FastAPI, whose tools form the backbone of this project. Their tireless work in
building and maintaining these technologies makes systems like RideFlow possible.

Finally, we express our deepest gratitude to our parents, families, and friends for their unwavering
support, encouragement, and understanding during the many late nights and weekends spent in the
development of this project.

PLABONI SATPATHY Signature:

ADITYA SOHNER Signature:

ABHIJIT KUMAR Signature:

SIDDHESH PANDIT Signature:

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 4


ABSTRACT
RideFlow is a comprehensive, production-grade, full-stack ride-hailing application — a functionally
complete Uber clone — developed as a Minor Project for the Bachelor of Engineering (Computer
Science & Engineering) programme at Parul Institute of Technology, Vadodara. The system is
designed to demonstrate advanced concepts in real-time distributed systems, geospatial
engineering, dynamic pricing algorithms, microservices architecture, and weather-integrated
intelligent scheduling.

The platform connects riders with nearby drivers through a live, continuously updating map interface.
Both riders and drivers see each other's positions in real time, with the driver's GPS location
transmitted every two seconds via persistent WebSocket connections and stored in a Redis Geo
index for sub-10 ms nearest-driver queries. The system supports the complete trip lifecycle:
registration, booking, driver matching, pickup, in-trip tracking, fare finalisation, payment processing,
and post-trip rating.

The Dynamic Fare Engine computes fares using a six-variable mathematical model: base fare, per-
kilometre rate (using OSRM-computed route distance), per-minute rate (using OSRM travel time),
surge multiplier (based on demand/supply ratio in the H3 hexagonal zone), locality tier coefficient
(A/B/C zones configured per city), and a time-of-day coefficient (peak-hour premium). Every fare is
displayed to the rider as a full itemised breakdown before booking confirmation, and the final fare is
locked at booking time to prevent post-hoc changes.

The Weather-Aware ETA Module integrates with the OpenWeatherMap API to fetch real-time
weather conditions at the pickup coordinates for every booking. Based on the weather condition
code returned, the system applies a buffer to the OSRM-computed base ETA: no buffer for clear
skies, +15% for light rain or drizzle, +25% for fog or low visibility, +30% for heavy rain or snow, and
+40% for storms or extreme weather. These adjusted ETAs are displayed to the rider with a weather
icon and a tooltip explaining the reason for the extended pickup time.

The backend follows a microservices architecture with eight independent services — Authentication,
Location, Fare Engine, Routing, Weather, Trip Matching, Payment, and Notification
— coordinated by an Nginx API gateway with JWT authentication. The data layer combines
PostgreSQL with PostGIS for geospatial persistence, Redis for live position caching, and Apache
Kafka for asynchronous event streaming. The mobile frontend is built with React Native for
cross-platform iOS/Android support, and a [Link] web application serves as the admin dashboard.

Keywords: Ride-Hailing, Real-Time GPS Tracking, Dynamic Fare Calculation, Weather-Aware ETA, Microservices,
WebSocket, Redis Geo, OSRM, FastAPI, React Native, PostgreSQL, PostGIS, Apache Kafka.

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 5


LIST OF FIGURES
Page
[Link]. Figure No. Name of Figure
No.

1 Fig. 1 System Architecture Diagram

2 Fig. 2 Real-Time Location Flow Diagram

3 Fig. 3 Database Schema (ER Diagram)

4 Fig. 4 Dynamic Fare Calculation Engine

5 Fig. 5 Weather-Aware ETA Module Flow

LIST OF TABLES
Page
[Link]. Table No. Name of Table
No.

1 Table 1 Technology Stack Comparison

2 Table 2 Dynamic Fare Multiplier Matrix

3 Table 3 Expected Outcomes

4 Table 4 Limitations and Mitigation Strategies

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 6


LIST OF ABBREVIATIONS
Abbreviation Full Form

API Application Programming Interface

ETA Estimated Time of Arrival

FCM Firebase Cloud Messaging

GCP Google Cloud Platform

GPS Global Positioning System

GUI Graphical User Interface

H3 Uber Hexagonal Hierarchical Spatial Index

JWT JSON Web Token

K8s Kubernetes — Container Orchestration Platform

ML Machine Learning

OSRM Open Source Routing Machine

OTP One-Time Password

PostGIS PostgreSQL Geographic Information Systems Extension

REST Representational State Transfer

SDK Software Development Kit

TLS Transport Layer Security

UPI Unified Payments Interface

UUID Universally Unique Identifier

WebSocket Bidirectional Full-Duplex Protocol (RFC 6455)

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 7


INDEX
Page
Chapter Topic
No.

Chapter I Introduction

1.1 Overview

1.2 Problem Statement

1.3 Objectives of Project

1.4 Applications / Scope

1.5 Organization of Report

Chapter II Literature Survey

Chapter III Methodology

3.1 Background / Overview of Methodology

3.2 Project Platforms Used

3.3 Proposed Methodology

3.4 Project Modules

3.5 Diagrams (ER, Use Case, DFD)

Chapter IV System Requirements

4.1 Software Requirements

4.2 Hardware Requirements

Chapter V Expected Outcomes (with GUI description)

Chapter VI Conclusion & Future Scope

6.1 Conclusion

6.2 Future Work

Chapter VII References

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 8


CHAPTER I
INTRODUCTION

1.1 Overview
The modern urban mobility landscape has been fundamentally transformed by the advent of
app-based ride-hailing platforms. Services such as Uber, Ola, Lyft, and DiDi have redefined how
people move through cities, offering on-demand transportation at the tap of a smartphone button.
These platforms have grown from niche technological experiments into multi-billion dollar global
industries, collectively completing billions of trips annually across hundreds of cities worldwide. The
technical complexity underpinning these seemingly simple interfaces is extraordinary —
encompassing real-time geospatial engineering, intelligent dispatch algorithms, dynamic pricing
systems, and distributed backend architectures that must operate reliably at massive scale.

RideFlow is a full-featured, production-grade ride-hailing application developed as a Minor Project


for the Bachelor of Engineering programme at Parul Institute of Technology. It is a functionally
complete Uber clone designed to demonstrate, in an academic context, the engineering principles
that power commercial ride-hailing platforms. The system provides real-time location tracking for
both riders and drivers, a multi-variable dynamic fare engine, a weather-aware ETA computation
module, full in-app payments, driver-rider matching, and a comprehensive admin dashboard.

The fundamental challenge that RideFlow addresses — and that all ride-hailing platforms must
address — is the coordination problem: how do you efficiently match thousands of riders requesting
trips with thousands of drivers offering rides, in real time, across an entire city, while computing fair
prices and providing accurate arrival estimates that account for variable conditions such as traffic,
demand, and weather? Solving this problem requires integrating multiple complex subsystems into
a coherent, low-latency, highly available platform.

RideFlow's architecture is built on microservices: eight independent backend services, each


responsible for a single domain, communicate via a REST API gateway and an Apache Kafka
message broker. The mobile interface, built with React Native, provides a cross-platform experience
for both riders and drivers. The system uses Redis Geo for sub-10 ms nearest-driver queries, OSRM
for route computation, and OpenWeatherMap for real-time weather data integration. PostgreSQL
with PostGIS handles all geospatial persistence, and Firebase Cloud Messaging delivers push
notifications.

What distinguishes RideFlow from simpler academic implementations is the depth of its fare model
and the integration of weather awareness. The fare engine computes prices using six variables —
base fare, per-km rate, per-minute rate, surge multiplier, locality tier, and time-of-day coefficient —
providing a pricing model that closely mirrors the sophistication of commercial platforms. The
weather module applies scientifically-grounded ETA buffers based on precipitation intensity and
visibility, ensuring that riders receive honest, realistic arrival estimates rather than optimistic
predictions that fail when it rains.

Key Capabilities of RideFlow:

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 9


• Real-Time Dual GPS Tracking: Both rider and driver positions are updated on the live map
every 2 seconds via WebSocket connections, giving each party continuous awareness of the
other's location.
• Multi-Variable Dynamic Fare Engine: Fares are computed using six variables incorporating
distance, duration, surge, locality zone, weather conditions, and time of day.
• Weather-Aware ETA Computation: Real-time weather data from OpenWeatherMap is
integrated to apply ETA buffers ranging from 0% (clear) to 40% (storm), with visual indicators
shown to the rider.
• Complete Trip Lifecycle Management: The system handles the full journey from rider
registration and booking through driver matching, pickup, in-trip navigation, fare finalization,
payment, and rating.
• Microservices Architecture: Eight independent backend services ensure scalability, fault
isolation, and independent deployability.
• Admin Dashboard: A [Link] web dashboard provides platform operators with real-time fleet
visibility, surge zone heatmaps, revenue analytics, and driver/rider management.

1.2 Problem Statement


The problems that motivate RideFlow span three dimensions: the rider experience, the driver
experience, and the underlying technical architecture required to serve both effectively. Addressing
these problems requires integrating a broad set of technologies that individually exist in the
academic and open-source ecosystem but are rarely combined into a single, coherent, documented
system.

1.2.1 Rider-Side Problems


From the rider's perspective, the most critical shortcoming of traditional transportation is
unpredictability. When a rider cannot see where their driver is on the map — and when the ETA
displayed in the app does not update to reflect current road conditions or weather — the experience
becomes frustrating and unreliable. Specifically:

• Lack of Real-Time Visibility: Without live driver tracking, riders are left guessing whether their
driver is two minutes away or ten. A 2021 McKinsey consumer study on mobility found that
real-time tracking is the single most valued feature in ride-hailing applications.
• Opaque Surge Pricing: Riders frequently accept surge-priced rides without understanding
why prices have increased or by how much each factor contributes. This lack of transparency
erodes trust and leads to booking abandonment.
• Unreliable ETAs During Weather Events: Standard ETA calculations do not account for
weather. A rider told that their driver will arrive in 8 minutes during a heavy downpour will
typically wait 12–16 minutes. This gap between expectation and reality is a primary driver of
negative user reviews.
• No Locality-Based Price Transparency: In cities with varied economic zones — such as
airport terminals, premium business districts, or budget residential areas — fares that do not
reflect the locality context feel arbitrary to riders.

1.2.2 Driver-Side Problems

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 10


For driver-partners, the primary problems are earnings predictability and operational efficiency.
Drivers who cannot identify high-demand zones ahead of time, who receive assignments at
suboptimal proximity, or who lack reliable navigation in adverse weather conditions will consistently
earn less than their potential:

• No Earnings Predictability: Without visibility into surge zones and demand forecasts, drivers
position themselves suboptimally, reducing their per-hour earnings.
• Unfair Assignment Algorithms: Naive nearest-driver algorithms that ignore driver rating or
acceptance rate lead to less reliable drivers receiving assignments ahead of high-quality ones.
• Weather-Induced Navigation Risk: Drivers navigating in storms, fog, or heavy rain without
adjusted routing guidance face longer trip times that are not fully reflected in their
compensation.

1.2.3 Technical Dimension


The technical challenges of building a reliable ride-hailing platform are substantial:

• Real-Time WebSocket at Scale: Maintaining persistent bidirectional connections for


thousands of drivers sending 2-second GPS pings demands a carefully engineered Location
Service and a Redis Geo backend.
• Sub-200ms Fare Computation: The fare must be computed and displayed to the rider before
they confirm a booking. Any latency longer than 200ms measurably increases booking
abandonment.
• Weather API Latency: Integrating a live external API (OpenWeatherMap) into the critical
booking path requires caching strategies and fallback logic to prevent service degradation.
• Geospatial Query Performance: Finding the nearest available driver from a pool of potentially
thousands must return a result in under 10ms to feel instantaneous.
• Multi-Tenant Data Isolation: A multi-city, multi-operator deployment requires strict data
isolation between tenants at the database and service layers.
Formal Problem Statement: The urban ride-hailing experience is fundamentally degraded by the
absence of real-time location transparency, dynamic and explainable pricing, and weather-aware
scheduling. RideFlow addresses this by providing a unified platform where riders see live driver
positions, receive transparent itemised fare breakdowns, and get honest weather-adjusted ETAs
— and where drivers receive fair, proximity-weighted assignments and earnings transparency.

1.3 Objectives of the Project


The objectives of the RideFlow project are organized across four domains: functional, technical,
security, and performance. Together, they define the complete scope of what the system is designed
to achieve.

1.3.1 Functional Objectives


• Build a cross-platform mobile application (React Native) where riders can book rides and track
their driver's live location, and drivers can receive trip requests, navigate to pickup, and
complete trips.
• Implement a real-time fare estimation system that computes and displays a full itemised fare
breakdown — base fare, distance charge, time charge, surge multiplier, locality tier, and
weather multiplier — before booking confirmation.

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 11


• Develop a weather-aware ETA module that fetches real-time weather at the pickup coordinates
and applies a scientifically-motivated buffer (0%–40%) to the OSRM-computed base ETA,
displayed with a contextual weather icon.
• Build a driver-matching service that identifies the nearest available, highest-rated drivers and
dispatches trip requests sequentially, with timeout-based fallback expansion.
• Implement a complete payment flow supporting UPI, credit/debit cards, and in-app wallet, with
automated driver payout and commission deduction.
• Create a post-trip rating system for both riders and drivers, with rolling average rating
computation influencing future matching scores.
• Develop an admin web dashboard with live fleet monitoring, surge zone management, revenue
analytics, and driver/rider account management.

1.3.2 Technical Objectives


• Design and implement a microservices backend with eight independent services, coordinated
by an Nginx API gateway.
• Use Redis Geo (GEOADD/GEORADIUS) as the geospatial index for driver positions, achieving
nearest-driver queries in under 10ms.
• Integrate OSRM as the self-hosted routing engine for route distance, travel time, and polyline
computation.
• Implement Apache Kafka as the asynchronous message broker for trip state change events,
decoupling services and enabling event-driven workflows.
• Design a PostgreSQL + PostGIS schema capable of storing and querying geospatial trip data
at city scale.
• Implement persistent WebSocket connections for bidirectional real-time communication
between the Location Service, rider app, and driver app.

1.3.3 Security Objectives


• Implement JWT-based stateless authentication for all API endpoints, with refresh token
rotation.
• Use OTP SMS verification (Twilio/MSG91) for phone number validation during registration.
• Enforce HTTPS/TLS for all client-server communication.
• Implement role-based access control (RBAC) separating rider, driver, and admin permissions.
• Ensure PCI-DSS compliance in payment token handling via Razorpay/Stripe tokenization.

1.3.4 Performance Objectives


• Fare computation round-trip latency: under 200ms at 95th percentile.
• Nearest-driver geo-query latency: under 10ms.
• Driver GPS position update propagation to rider map: under 3 seconds end-to-end.
• System must support 10,000 concurrent driver WebSocket connections on recommended
hardware.
• Trip booking confirmation (including fare computation, weather fetch, and driver assignment):
under 3 seconds.

1.4 Applications and Scope

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 12


1.4.1 In-Scope Features
Feature Description

Map-based ride booking with live driver tracking, fare display, weather
Rider Mobile App
ETA, payment, and ratings.

Trip request reception, navigation to pickup and destination, earnings


Driver Mobile App
dashboard, status management.

Real-Time Location Bidirectional GPS streaming via WebSocket; driver positions updated
Tracking every 2 seconds on rider map.

Six-variable pricing model with full itemised breakdown shown before and
Dynamic Fare Engine
after trip.

OpenWeatherMap integration with five condition tiers and corresponding


Weather-Aware ETA
ETA buffers.

Turn-by-turn navigation, distance and travel time computation for fare and
OSRM Routing
ETA.

Proximity-weighted, rating-aware driver assignment with sequential


Driver Matching
dispatch.

Razorpay/Stripe integration for UPI, card, and wallet; automated driver


Payment Processing
payouts.

Push Notifications FCM push for all trip lifecycle events to both rider and driver.

[Link] web app with fleet map, surge heatmap, revenue analytics, user
Admin Dashboard
management.

1.4.2 Target User Groups


Urban Commuters (Riders): Individuals requiring reliable, on-demand, transparent, and fairly
priced transportation in urban and suburban areas.

Driver-Partners: Independent vehicle owners seeking a platform for supplemental or primary


income through ride provision.

Fleet Operators: Businesses managing multiple registered vehicles seeking a platform with
centralized fleet analytics.

Platform Administrators: Operations teams monitoring platform health, managing driver


onboarding, and adjusting surge zones.

1.4.3 Out of Scope


The following features are explicitly excluded from the current version of RideFlow:

• Shared rides or carpooling with multiple independent riders per trip


• Scheduled/pre-booked rides in advance
• Autonomous vehicle control or integration
• Long-distance intercity journey support
• Real-time traffic data integration (uses OSRM static weights)
Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 13
• Video calling between rider and driver
• Multi-stop trip routing

1.5 Organization of the Report


This report is organized into seven chapters, each covering a distinct aspect of the RideFlow project:

Chapter I — Introduction: Provides a comprehensive overview of the RideFlow platform, the


problems it addresses, the objectives it pursues, its scope, and the organization of this report.

Chapter II — Literature Survey: Reviews the state of the art in ride-hailing systems, dynamic pricing
algorithms, geospatial indexing, real-time routing, and weather-integrated mobility scheduling.
Identifies the research gap that RideFlow fills.

Chapter III — Methodology: Describes the system architecture, technology platforms, proposed
methodology for both content ingestion/processing and search, the six project modules, and includes
all five diagrams: System Architecture (Fig. 1), Real-Time Location Flow (Fig. 2), Database Schema
ER Diagram (Fig. 3), Fare Engine (Fig. 4), and Weather ETA Flow (Fig. 5).

Chapter IV — System Requirements: Specifies the complete software and hardware requirements
for development, deployment, and operation of the RideFlow platform, including all third-party APIs
and infrastructure dependencies.

Chapter V — Expected Outcomes: Describes the anticipated benefits and outcomes of the project,
including GUI descriptions for the key screens, and presents Table 3 (Expected Outcomes) and
Table 4 (Limitations and Mitigation Strategies).

Chapter VI — Conclusion & Future Scope: Summarizes the achievements of the RideFlow project
and outlines planned future enhancements including carpool support, ML demand forecasting,
offline navigation, and multilingual support.

Chapter VII — References: Lists all academic papers, technical documentation, and industry
sources cited throughout this report.

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 14


CHAPTER II
LITERATURE SURVEY

2.1 Introduction to the Literature Survey


A systematic literature survey is an essential prerequisite for any engineering project of significance.
It serves three purposes: (1) it establishes that the problem being addressed is real and important;
(2) it identifies what solutions already exist, what their strengths are, and where they fall short; and
(3) it justifies the design decisions made in the proposed system by grounding them in prior work.
This chapter reviews the most relevant existing systems, algorithms, and technologies related to
ride-hailing platforms, real-time geospatial systems, dynamic pricing, routing engines, and weather-
integrated mobility scheduling.

The field of app-based ride-hailing has been active since approximately 2009, when Uber launched
its first service in San Francisco. In the decade and a half since, the technical underpinnings of these
platforms have been extensively studied, documented, and refined. Academic research has focused
on optimizing matching algorithms, designing fair pricing mechanisms, predicting demand, and
quantifying the impact of environmental factors on platform performance. Industry engineering blogs
from Uber, Ola, and Lyft have shared technical details of their architectures, providing valuable
reference points for this work.

2.2 Review of Existing Ride-Hailing Platforms


2.2.1 Uber — The Pioneer Platform
Uber, founded in 2009, is the world's most studied ride-hailing platform and the direct inspiration for
RideFlow. Uber's technical architecture has evolved from a monolith to a microservices system
managing hundreds of services. Key technical contributions documented in Uber Engineering's
public blog include: the H3 hexagonal spatial indexing system for demand/supply visualization and
surge computation; the Marketplace Clearing mechanism for setting surge multipliers; the Ringpop
distributed hash table for driver state; and uberFARECAST for predictive fare estimation.

Uber's surge pricing mechanism is particularly well-documented. The city is divided into H3
hexagonal cells at resolution 7 (approximately 5.16 km^2 per cell). For each cell, the platform
continuously monitors the ratio of open trip requests to available drivers. When this ratio exceeds
1.0, a surge multiplier is applied, scaled by the severity of the imbalance. The multiplier
simultaneously incentivizes more drivers to enter the zone (supply-side response) and discourages
price-sensitive riders from booking (demand-side response), theoretically driving the ratio back
toward equilibrium. RideFlow adopts this zone-based approach with configurable cell boundaries
and multiplier thresholds.

Limitations of Uber's published work relevant to this project: (1) Uber's surge model does not
explicitly account for weather as a supply-side shock; (2) the locality-tier coefficient used in markets
like India and Southeast Asia is not documented publicly; (3) Uber's ETA model uses proprietary ML
models not replicated in open-source tools. RideFlow addresses points (1) and (2) explicitly.

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 15


2.2.2 Ola — Locality-Aware Pricing
Ola, India's leading ride-hailing platform, introduced the concept of locality-aware fare coefficients
to the academic discussion, acknowledging that a flat per-km rate does not reflect the economic
reality of different urban zones. Airport pickups, premium business districts, and budget residential
areas all have different competitive dynamics and rider sensitivities. Ola's tiered locality system
applies a multiplier between 0.9× (budget zones) and 1.4× (premium/airport zones). RideFlow
directly implements this concept through a configurable Locality Tier system (Tier A, B, C) mapped
to city geo-zones.

2.2.3 Lyft — Driver Matching Research


Lyft's engineering team has published research on optimized driver matching algorithms. Their work
demonstrates that sequential dispatch (offering a trip to the nearest available driver, with fallback to
the next-nearest on timeout) outperforms simultaneous broadcast dispatch (offering to multiple
drivers at once) in terms of both driver satisfaction and trip acceptance rate. RideFlow implements
sequential dispatch with a 15-second accept window and three-level fallback expansion.

2.3 Routing and Geospatial Technologies


2.3.1 OSRM — Open Source Routing Machine
OSRM (Vetter et al., 2015) is a high-performance routing engine built on OpenStreetMap data, using
Contraction Hierarchies (CH) or Multi-Level Dijkstra (MLD) algorithms to deliver route computation
in under 10ms for city-scale road networks. It provides /route endpoints returning distance, travel
time, and encoded polyline, as well as /table endpoints for many-to-many distance matrices.
RideFlow self-hosts OSRM via Docker with the MLD variant for its superior performance on complex
urban networks.

The key limitation of OSRM for ride-hailing is that it uses static road weights derived from speed
profiles and does not incorporate real-time traffic data. This means OSRM ETAs are baseline
estimates that must be augmented by external factors — specifically, weather conditions — to yield
realistic predictions. RideFlow's Weather ETA Module serves this role.

2.3.2 Redis Geo — Geospatial Indexing


Redis's geo commands (GEOADD, GEORADIUS, GEODIST) implement a geospatial index by
encoding latitude/longitude pairs as 52-bit geohash integers stored in a Redis Sorted Set. This
allows GEORADIUS queries to return all points within a given radius in O(N + log M) time, where N
is the number of results and M is the total number of stored points. In practice, for city-scale driver
pools (10,000–100,000 drivers), GEORADIUS queries return the 5 nearest available drivers within
5 km in under 5ms — meeting the real-time requirements of the matching service.

2.3.3 PostGIS — Geospatial Database Extension


PostGIS extends PostgreSQL with geospatial data types (GEOMETRY, GEOGRAPHY), functions
(ST_Distance, ST_Within, ST_Contains, ST_Centroid), and spatial indexes (GiST). RideFlow uses
PostGIS to store trip pickup and drop points as GEOMETRY columns, enabling spatial queries on
historical trip data — for example, identifying all trips that originated within a given locality zone, or
computing the distribution of pickup points across a city. These spatial analytics are consumed by

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 16


the admin dashboard's heatmap and locality analysis features.

2.4 Weather and Mobility — Academic Evidence


The relationship between weather and urban mobility has been studied in several academic
contexts, providing the empirical foundation for RideFlow's weather integration:

Zhang et al. (2017), IEEE Transactions on Big Data: Analysed 7 million Didi (DiDi Chuxing) trips
in Beijing over 24 months. Found that heavy rain (>10mm/hour) increased ride-hailing demand by
42–58% while reducing driver availability by 18–27%, leading to net ETA increases of 25–45% over
baseline.

Nguyen et al. (2019), Proceedings of KDD: Proposed a gradient-boosted weather-weighted ETA


model for ride-hailing platforms, demonstrating 23% improvement in ETA accuracy during adverse
weather events compared to baseline routing-only models.

Chen & Shelton (2016), MIT Transportation Research: Studied taxi demand elasticity with respect
to precipitation in New York City, finding that for each mm/hour of precipitation increase, trip demand
rose approximately 3.8%.

Gebhardt et al. (2021), Transport Policy: Found that fog events with visibility below 200m
increased average urban trip times by 20–30% and increased ride-hailing cancellation rates by 12%
(rider frustration at extended ETAs).

These findings directly inform RideFlow's five-tier weather buffer system: clear (0%), light rain/drizzle
(+15%), fog/low visibility (+25%), heavy rain/snow (+30%), and storm/extreme weather (+40%). The
buffer percentages are calibrated to the midpoints of the ranges reported in the above studies.

2.5 WebSocket and Real-Time Communication


The WebSocket protocol (RFC 6455, Fette & Melnikov, 2011) enables persistent bidirectional
communication over a single TCP connection, making it the ideal transport for high-frequency GPS
streaming. Unlike HTTP polling (which requires a new connection for every update) or Server-Sent
Events (which are unidirectional), WebSockets allow the driver app to push GPS updates to the
server, and the server to simultaneously push those updates to the subscribed rider app — all over
the same open connection. This significantly reduces latency and connection overhead compared
to alternatives.

FastAPI's native WebSocket support, backed by Python's asyncio event loop, enables a single
server process to handle thousands of concurrent WebSocket connections efficiently using non-
blocking I/O. RideFlow's Location Service is built on FastAPI with asyncio, capable of handling
10,000+ simultaneous driver connections on a single 8-core server.

2.6 Research Gap


The literature survey reveals that while the individual components of a sophisticated ride-hailing
platform — surge pricing, locality tiers, weather-aware ETA, geospatial indexing, real-time
WebSocket communication — are well-studied and individually documented, no single open-
source, academically documented reference implementation exists that integrates all of these

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 17


capabilities into a cohesive, working system. Specifically:

• No open-source ride-hailing platform integrates weather data into both fare computation AND
ETA simultaneously.
• Locality-aware pricing is a proprietary feature of commercial platforms with no published
academic model or open implementation.
• Time-of-day pricing curves are referenced in industry blogs but not formally modelled in
academic literature.
• The combination of OSRM routing + Redis Geo matching + Kafka event streaming + PostGIS
persistence has not been documented together in a single academic system.
• Weather-buffer ETA systems exist in papers but no implementation combines them with a full
trip lifecycle application.
RideFlow fills this gap by providing a fully documented, open, modular implementation of a
ride-hailing platform with all of the above capabilities integrated — serving as a reference
architecture for future academic work in urban mobility systems.

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 18


CHAPTER III
METHODOLOGY

3.1 Background and Overview of Methodology


The methodology of RideFlow is built around three core principles: event-driven architecture,
low-latency data flow, and separation of concerns. Every user action — a rider opening the app, a
driver accepting a trip, a trip completing — is treated as an event that propagates through a
well-defined pipeline of independent services, each transforming the event's data before passing it
to the next stage. This design ensures that no single service becomes a bottleneck, that individual
services can be scaled independently based on load, and that failures in one service do not cascade
to the entire platform.

The architecture follows CQRS (Command Query Responsibility Segregation): write operations
(GPS pings, trip state transitions, payment records) flow to fast, append-optimized stores (Redis for
live positions, Kafka for event log, PostgreSQL for durable persistence), while read operations (trip
history, driver profiles, analytics) are served from PostgreSQL with optimized indexes. This
separation allows the high-frequency write path (up to 50,000 GPS pings/second in a city-scale
deployment) to proceed without contending with analytical queries.

Privacy and security are woven into the methodology from the ground up. All API endpoints require
a valid JWT token. All user data is transmitted over TLS. Payment information is tokenized by
Razorpay/Stripe and never stored on RideFlow's servers. Driver and rider locations are only shared
with authorized counterparties during an active trip.

3.2 Project Platforms and Technologies


Table 1 provides a comprehensive comparison of all technologies used in the RideFlow stack.

Versio
Layer Technology Purpose Rationale
n

0.73 /
Mobile React Native + iOS & Android Cross-platform; single
SDK
Frontend Expo rider/driver apps codebase; large ecosystem
50

Web [Link] + 18 / Component-based; fast


Admin dashboard
Frontend Tailwind CSS 3.4 rendering; flexible layout

1.25 / Routing, auth, rate Industry-standard reverse


API Gateway Nginx + [Link]
20 LTS limiting proxy; async Node

3.11 / GPS ingestion, Async WebSocket; native Geo


Location Svc Python FastAPI
0.110 geo-queries support; fast

20 / Dynamic fare Low-latency JSON APIs;


Fare Engine [Link] Express
4.18 computation arithmetic ops

Routing Sub-10ms routing; free OSM


OSRM (Docker) 5.27 Distance, ETA, polyline
Engine data

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 19


Versio
Layer Technology Purpose Rationale
n

Weather Async HTTP; caching; simple


Python + httpx 3.11 ETA buffer computation
Module condition mapping

[Link] + Trip lifecycle ORM with PostGIS support;


Trip Service 20
Sequelize management async

[Link] + UPI, card, wallet PCI-DSS compliant; India-first


Payment Svc 20
Razorpay payments UPI support

Main PostgreSQL + 16 / Persistent geospatial ACID; ST_Distance; GiST


Database PostGIS 3.4 data spatial index

Live driver positions, GEOADD/GEORADIUS in


Geo Cache Redis 7 7.2
sessions O(log N); in-memory

Message Durable log; consumer groups;


Apache Kafka 3.6 Async event streaming
Broker replay

Mobile push Cross-platform; reliable


Push Notif. Firebase FCM —
notifications delivery

Google Maps / High-quality tiles;


Maps SDK — Map tiles, geocoding
Mapbox autocomplete API

Docker + 25 / Deployment & Service isolation; auto-scaling;


Containers
Kubernetes 1.29 orchestration rolling deploy

Test, build, deploy Free for OSS; native Docker


CI/CD GitHub Actions —
pipeline support

Table 1: Technology Stack Comparison

3.3 Proposed Methodology — Full Trip Lifecycle


The proposed methodology describes the complete end-to-end data flow for a RideFlow trip, from
the rider opening the app to the post-trip rating. This is organized into three phases: Booking Phase,
Active Trip Phase, and Completion Phase.

3.3.1 Phase 1: Pre-Trip — Booking and Matching

Step 1: App Launch & Location Broadcast


The rider opens the React Native app. The device's GPS module is activated and the rider's current
location is fetched. Simultaneously, the Location Service is queried via REST for the list of available
drivers within a 5km radius, using a Redis GEORADIUS call. The returned driver positions are
rendered as animated markers on the map, giving the rider immediate visual context.

Step 2: Destination Entry


The rider types a destination into the search bar. The Google Places Autocomplete API returns
matching suggestions. On selection, the pickup (current location) and drop (selected destination)
coordinates are sent to the Routing Service.

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 20


Step 3: OSRM Route Computation
The Routing Service calls the self-hosted OSRM /route endpoint with the pickup and drop
coordinates. OSRM returns: route distance in metres, travel duration in seconds, and an encoded
polyline for map display. The polyline is immediately rendered as a blue route overlay on the rider's
map.

Step 4: Fare Estimation


The Fare Engine receives: OSRM distance, OSRM duration, pickup zone identifier (H3 cell), current
timestamp (for time-of-day coefficient), and current weather condition code (fetched by the Weather
Module). The engine computes the estimated fare using the six-variable formula and returns an
itemised breakdown. Simultaneously, the Weather Module applies the ETA buffer to the OSRM
duration to produce the adjusted ETA.

Step 5: Rider Confirms Booking


The rider reviews the fare breakdown and adjusted ETA, then confirms the booking. A Trip record
is created in PostgreSQL with status PENDING. The Matching Service queries Redis Geo for the
nearest available driver and dispatches a trip request via FCM push notification.

Step 6: Driver Assignment


The nearest available driver receives the push notification and a WebSocket message with the
pickup details and map preview. If the driver accepts within 15 seconds, the trip transitions to
ACCEPTED. If not, the request is dispatched to the next-nearest driver (up to 3 fallback levels).

3.3.2 Phase 2: Active Trip — Navigation and Tracking

Step 7: Driver En Route to Pickup


The driver's app displays turn-by-turn OSRM navigation to the pickup point. Every 2 seconds, the
driver app sends a GPS ping (latitude, longitude, heading, speed) to the Location Service via
WebSocket. The Location Service updates the driver's position in Redis Geo and broadcasts the
new position to the rider's subscribed WebSocket channel. The rider's map animates the driver
marker smoothly toward the pickup.

Step 8: Driver Arrives


When the driver's GPS position is within 50m of the pickup coordinates, the driver marks ARRIVED
in the app. The Trip status transitions to ARRIVED. The rider receives a push notification and
WebSocket alert. A 5-minute wait timer begins; if the rider does not appear within 5 minutes, a
cancellation fee may apply.

Step 9: Trip In Progress


The rider enters the vehicle and the driver taps START TRIP. The Trip status transitions to
IN_PROGRESS. Both apps display the route to the destination with real-time navigation. The driver's
position continues to broadcast every 2 seconds. The rider sees the remaining route and ETA to
destination updating in real time.

3.3.3 Phase 3: Completion — Fare, Payment, and Rating

Step 10: Trip Completion

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 21


When the driver's GPS position is within 100m of the drop coordinates (or the driver manually marks
COMPLETE), the Trip status transitions to COMPLETED. The Fare Engine computes the FINAL
fare using the actual OSRM-measured trip distance and duration (not the pre-trip estimate). Surge
and weather multipliers are locked at booking time and applied to the actual metrics.

Step 11: Payment Processing


The Payment Service charges the rider's preferred method (UPI, card, or wallet) via the Razorpay
SDK. The platform commission (typically 20%) is deducted, and the driver's net earnings are credited
to their earnings wallet. A PDF receipt is generated and emailed to the rider via SendGrid.

Step 12: Rating Exchange


Both the rider and driver are prompted to leave a 1–5 star rating with an optional comment. Ratings
are stored in the RATINGS table. Each user's rolling average rating (last 100 trips) is updated and
factored into future matching scores.

3.4 Project Modules


RideFlow is decomposed into eight independent backend services (microservices), plus two
frontend applications. Each service is containerized in Docker, deployed to Kubernetes, and
communicates with others via the API Gateway (for synchronous calls) or Apache Kafka (for
asynchronous events).

Module 1: Authentication Service


Manages the complete identity lifecycle for riders, drivers, and admins. Handles registration, phone
OTP verification (Twilio), Google OAuth2 SSO for riders, JWT access token issuance (15-minute
expiry), refresh token rotation (7-day expiry), and token revocation (blacklist in Redis). Enforces role-
based access control (RBAC) with three roles: RIDER, DRIVER, ADMIN.
Sub-Components: JWT Handler, OTP Service (Twilio), OAuth2 Client (Google), Token Blacklist (Redis),
Password Hasher (bcrypt)

Module 2: Location Service


The highest-frequency service in the system. Accepts WebSocket connections from driver apps,
receiving GPS pings (latitude, longitude, heading, speed, accuracy) every 2 seconds. Stores
positions in Redis Geo using GEOADD. Exposes a REST endpoint for GEORADIUS queries
(nearest N drivers within R km). Broadcasts driver position updates to subscribed riders via
WebSocket multiplexing. Filters out stale connections and positions older than 30 seconds.
Sub-Components: WebSocket Manager (FastAPI), Redis Geo Writer, GEORADIUS Query Engine, Subscription
Broadcaster, Stale Position Cleaner

Module 3: Fare Engine


Computes fare estimates on booking requests and final fares on trip completion. Accepts: OSRM
distance (km), OSRM duration (min), pickup H3 cell ID, timestamp, and weather condition code.
Returns: base fare, distance charge, time charge, surge multiplier (looked up from Redis), locality
coefficient (from config), weather multiplier, time-of-day coefficient, and total estimated fare. Locks
all multipliers at booking time; final fare uses actual metrics but locked multipliers.

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 22


Sub-Components: Base Fare Calculator, Surge Lookup (Redis), Locality Mapper (config), Weather Multiplier
Engine, Time-of-Day Coefficient, Fare Itemiser

Module 4: Routing & ETA Service


Bridges OSRM with the Weather Module. Receives pickup and drop coordinates. Calls OSRM
/route for base distance and duration. Calls the Weather Module for the ETA buffer at the pickup
coordinates. Returns: route polyline (for map display), base distance (km), OSRM duration (min),
weather buffer (%), adjusted ETA (min), and weather condition description.
Sub-Components: OSRM API Client, Weather Buffer Integrator, Polyline Encoder, ETA Publisher

Module 5: Trip Matching Service


Orchestrates the driver assignment process for a new booking. Queries the Location Service for the
N nearest available drivers. Filters by status=ONLINE and minimum acceptable rating. Ranks by
composite score (proximity weight 70%, rating weight 30%). Dispatches the trip request to the top-
ranked driver via FCM and WebSocket. Waits 15 seconds for acceptance. If no response,
dispatches to the next candidate. Repeats up to 3 times before returning NO_DRIVER_AVAILABLE.
Sub-Components: Driver Ranker, Request Dispatcher (FCM + WebSocket), Acceptance Listener (Kafka
consumer), Timeout Handler, Fallback Expander

Module 6: Trip Service


The central state machine for the trip lifecycle. Manages all trip state transitions (PENDING 
ACCEPTED  ARRIVED  IN_PROGRESS  COMPLETED / CANCELLED). Stores all trip
records in PostgreSQL with PostGIS geometry columns. Publishes state change events to the trip-
events Kafka topic, consumed by the Notification Service and Payment Service.
Sub-Components: Trip State Machine, PostgreSQL + PostGIS Writer, Kafka Producer (trip-events topic),
Cancellation Fee Calculator

Module 7: Payment Service


Handles all financial transactions. Integrates Razorpay SDK for UPI collect, card charge, and wallet
debit. Manages platform commission deduction and driver earnings crediting. Handles refund
workflows for rider cancellations. Generates PDF receipts via ReportLab and dispatches via
SendGrid.
Sub-Components: Razorpay/Stripe Adapter, Commission Calculator, Driver Payout Service, Wallet Manager,
Refund Handler, Receipt Generator

Module 8: Notification Service


Consumes trip-events from Kafka and dispatches appropriate push notifications via FCM to rider
and driver apps. Also sends in-app WebSocket alerts for time-sensitive events (driver arrived, trip
completed). Manages notification templates for all 12 trip lifecycle events.
Sub-Components: Kafka Consumer (trip-events), FCM Publisher, WebSocket Alert Dispatcher, Template
Renderer, Delivery Status Tracker

3.5 Diagrams

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 23


This section presents all five key architectural and flow diagrams for the RideFlow platform, as listed
in the List of Figures. Each diagram is followed by a detailed explanation of its components and the
information it conveys.

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 24


3.5.1 Figure 1: System Architecture Diagram
The System Architecture Diagram (Fig. 1) illustrates the four-layer microservices architecture of
RideFlow. The layers are: (1) the Client Layer, comprising the React Native rider app, React Native
driver app, and [Link] admin dashboard; (2) the API Gateway Layer, providing JWT
authentication, Nginx routing, and rate limiting as the single entry point for all client requests; (3) the
Microservices Layer, containing the six core backend services (Location, Fare Engine, OSRM
Routing, Weather Module, Trip Matching, Payment Service); and (4) the Storage & Infrastructure
Layer, containing PostgreSQL+PostGIS, Redis Geo, Apache Kafka, and Firebase FCM. Arrows
indicate the flow of requests and events between layers.

Fig. 1 — RideFlow System Architecture Diagram

CLIENT LAYER

React Native React Native [Link] Web


Rider App Driver App Admin Dashboard

API GATEWAY LAYER

Nginx Reverse JWT Auth Rate Limiter /


Proxy Middleware Load Balancer

MICROSERVICES LAYER

Location Fare OSRM Weather Trip Payment


Service Engine Routing Module Matching Service

STORAGE & INFRA LAYER

PostgreSQL Redis 7 Apache Firebase


+PostGIS Geo Cache Kafka FCM

Fig. 1: RideFlow System Architecture Diagram (4-Layer Microservices)

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 25


3.5.2 Figure 2: Real-Time Location Flow Diagram
The Real-Time Location Flow Diagram (Fig. 2) details the bidirectional GPS streaming pipeline that
is the heart of RideFlow's live tracking feature. The diagram is organized as three columns
representing the three actors: Driver App (left, orange), Location Service (centre, teal), and Rider
App (right, blue). Reading each row from left to right shows how a specific interaction flows through
the system. Key flows include: (1) the 2-second GPS ping from driver to Location Service and
subsequent map update to rider; (2) the GEORADIUS query triggered when a rider opens the app
to show nearby drivers; (3) the trip acceptance flow propagating through FCM and WebSocket; (4)
continuous in-trip position streaming; (5) the ARRIVED notification chain; and (6) the trip completion
and payment trigger.

Fig. 2 — Real-Time Location Flow Diagram

DRIVER APP LOCATION SERVICE RIDER APP

GPS Ping (lat,lng) WebSocket Receive Map marker refresh


every 2 seconds Redis GEOADD update (WebSocket push)

Status: ONLINE GEORADIUS query Nearby drivers


Broadcast (5 km radius) shown on map

Accept Ride Trip: ACCEPTED Driver name, photo


Request FCM notification sent & ETA displayed

Live GPS stream Relay position Driver dot moves


(in-trip, 2s) via WebSocket on rider map

ARRIVED at Trip: ARRIVED Alert: Driver


Pickup 5-min wait starts arrived!

Trip COMPLETE Finalise fare Receipt & rating


mark Trigger payment prompt shown

Fig. 2: Real-Time Location Flow Diagram (Driver  Location Service  Rider)

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 26


3.5.3 Figure 3: Database Schema (ER Diagram)
The Database Schema (Fig. 3) presents the Entity-Relationship diagram for RideFlow's PostgreSQL
+ PostGIS database, comprising six core tables. The USERS table stores all platform users with
their role (RIDER/DRIVER/ADMIN), phone, email, and rolling average rating. The DRIVERS table
extends USERS with vehicle reference, current GPS position (stored for historical records — live
position is in Redis), and trip count. The VEHICLES table stores vehicle registration details linked to
a driver. The central TRIPS table is the most complex entity, storing pickup and drop as PostGIS
GEOMETRY points, the complete fare breakdown (surge multiplier, weather code, locality tier, fare
total), and trip status. The PAYMENTS table records the financial transaction for each trip, including
method, amount, and gateway transaction ID. The RATINGS table stores post-trip ratings from both
rider and driver for each completed trip. Primary keys (red) and foreign keys (blue) are highlighted;
dashed lines indicate relationships with cardinality labels.

Fig. 3 — Database Schema (ER Diagram)


USERS DRIVERS
PAYMENTS
PK user_id (UUID) PK driver_id (UUID)
name (VARCHAR 100) FK user_id PK payment_id (UUID)
phone (VARCHAR 15) 1:1 FK vehicle_id FK trip_id
email (VARCHAR 100) status (ENUM) method (ENUM)
role (ENUM) curr_lat (FLOAT) amount (FLOAT)
rating (FLOAT) curr_lng (FLOAT) status (ENUM)
created_at total_trips (INT) txn_id (VARCHAR)
1:N 1:N

1:1
VEHICLES TRIPS 1:1 RATINGS

PK vehicle_id (UUID) PK trip_id (UUID) PK rating_id (UUID)


FK driver_id FK rider_id FK trip_id
plate_no (VARCHAR) FK driver_id FK rated_by
model (VARCHAR) pickup_geom (GEOMETRY) score (SMALLINT)
1:1
category (ENUM) drop_geom (GEOMETRY) comment (TEXT)
year (INT) status (ENUM) created_at
distance_km (FLOAT)
duration_min (INT)
fare_total (FLOAT)
surge_mult (FLOAT)
weather_code (INT)
locality_tier (CHAR)
created_at (TIMESTAMP)

PK = Primary Key
FK = Foreign Key
--- = Relationship

Fig. 3: RideFlow Database Schema — Entity Relationship Diagram (PostgreSQL + PostGIS)

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 27


3.5.4 Figure 4: Dynamic Fare Calculation Engine
The Dynamic Fare Calculation Engine diagram (Fig. 4) visualizes the six-input multi-variable fare
computation model. The left column shows the six input variables with their source systems:
Distance (OSRM Route API), Duration (OSRM Travel Time), Surge Multiplier (H3 Demand/Supply
ratio from Redis), Locality Tier (Zone Configuration), Weather Factor (OpenWeatherMap API), and
Time-of-Day coefficient (system clock + schedule). Each input flows via a dashed arrow into the
central Fare Engine box, which applies the formula:

F = (BaseFare + Distance × R_km + Duration × R_min) × Surge × Locality × Weather ×


TimeOfDay

The right column shows three outputs: Pre-Trip Estimate (shown to rider before booking
confirmation), Final Fare (computed on completion using actual trip metrics with locked multipliers),
and Fare Breakdown (itemised display to the rider showing each component's contribution). The
legend box shows variable definitions. Table 2 provides the full parameter matrix.

Minim Maxim Typical


Variable Source / Trigger
um um Value

Base Fare ■ 20 ■ 80 ■ 35 Fixed per vehicle category (auto/sedan/SUV)

Per-km Rate (R_km) ■8 ■ 25 ■ 14/km OSRM-computed route distance

Per-min Rate
■1 ■3 ■ 1.80/min OSRM-computed travel duration
(R_min)

Surge Multiplier 1.0× 4.0× 1.3× H3 cell demand/supply ratio > 1.0

Locality Tier (A) — — 1.40× Airport / premium zone configuration

Locality Tier (B) — — 1.10× Standard urban zone

Locality Tier (C) — — 0.90× Budget / peri-urban zone

Weather — Clear — — 1.00× OWM code 800 (clear sky)

Weather — Lt. Rain — — 1.10× OWM codes 300–321 (drizzle)

Weather — Hvy
— — 1.25× OWM codes 500–531 (rain)
Rain

Weather — Fog — — 1.15× OWM codes 701–741 (fog/mist)

Weather — Storm — — 1.40× OWM codes 200–232 (thunderstorm)

Time-of-Day —
— — 1.25× 8–10AM, 5–8PM weekdays
Peak

Time-of-Day —
— — 1.00× All other hours
Normal

Time-of-Day —
— — 1.10× 11PM–5AM (late night premium)
Night

Table 2: Dynamic Fare Multiplier Matrix

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 28


Fig. 4 — Dynamic Fare Calculation Engine

Distance (km)
OSRM Route API Pre-Trip Estimate
Shown before■booking confirm

Duration (min)
OSRM Travel Time
FARE
ENGINE
Surge Multiplier
Multi-Variable
H3 Demand/Supply Final Fare
Computation
Computed on■completion
F = (B + D*Rkm + T*Rmin)
Locality Tier x Surge x Locality
Zone Config A/B/C x Weather x TimeOD

Weather Factor B = Base Fare


OpenWeatherMap API D = Distance km Fare Breakdown
T = Duration min Itemised display■to rider
Rkm / Rmin = Rates
Time-of-Day
Peak/Off-peak Hours

Fig. 4: Dynamic Fare Calculation Engine (6-Variable Multi-Factor Model)

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 29


3.5.5 Figure 5: Weather-Aware ETA Module Flow
The Weather-Aware ETA Module Flow (Fig. 5) is a decision flowchart showing how the system
computes adjusted ETAs by integrating weather data with OSRM's baseline route computation. The
flow begins when a ride booking is confirmed: the pickup coordinates are simultaneously sent to (1)
the OSRM Routing Service for a base ETA in minutes, and (2) the OpenWeatherMap API for the
current weather condition code at those coordinates.

The weather condition code is mapped to one of five branches in a decision diamond: Clear (no
buffer applied, ETA × 1.0), Light Rain/Drizzle (ETA × 1.15), Heavy Rain/Snow (ETA × 1.30), Fog/Low
Visibility (ETA × 1.25), and Storm/Extreme Weather (ETA × 1.40). After the appropriate buffer is
applied, the adjusted ETA is displayed to the rider with a weather condition icon and a tooltip
explaining the reason for the extended pickup time — for example, 'ETA extended by ~4 min due to
heavy rain in your area.' This transparency is a key differentiator of RideFlow's rider experience.

Fig. 5 — Weather-Aware ETA Module Flow

Ride Booking Confirmed


Pickup coords captured

OpenWeatherMap API Call


GET /weather?lat=&lon=

OSRM Route API Call


Base ETA (minutes) returned

Weather
Condition?

CLEAR LT RAIN HVY RAIN FOG STORM

x 1.0 x 1.15 x 1.30 x 1.25 x 1.40

Adjusted ETA Computed


OSRM_base x Weather_factor

Fig. 5: Weather-Aware ETA Module Flow (5-Branch Decision Tree)


ETA + Weather Icon Displayed
Tooltip: reason for adjustment

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 30


CHAPTER IV
SYSTEM REQUIREMENTS

4.1 Software Requirements


The software requirements for RideFlow span six categories: frontend frameworks, backend
services, database and caching technologies, message brokers, third-party APIs, and DevOps
tooling. All selections prioritize open-source availability, active community support, production-
grade reliability, and compatibility with the project's geospatial and real-time requirements.

4.1.1 Frontend Software Requirements


React Native (v0.73+): Core framework for cross-platform iOS and Android mobile applications for
both rider and driver interfaces.

Expo SDK (v50+): Managed React Native workflow providing OTA updates, build tools, and device
API access.

[Link] (v18+): JavaScript framework for the admin web dashboard with component-based
architecture.

Tailwind CSS (v3.4+): Utility-first CSS framework for responsive admin dashboard styling.

React Navigation (v6+): Navigation library for the React Native app with stack, tab, and drawer
navigators.

React Native Maps (v1.10+): Map rendering and driver marker animation in the mobile apps.

[Link] Client (v4.7+): WebSocket client library for real-time GPS updates and notifications.

Axios (v1.6+): HTTP client for REST API calls from both frontend apps.

React Native Reanimated (v3.6+): High-performance driver marker animation on the live map.

4.1.2 Backend Software Requirements


Python (v3.11+): Primary language for Location Service and Weather Module.

FastAPI (v0.110+): Async Python web framework for Location Service WebSocket handling.

Uvicorn (v0.27+): ASGI server for FastAPI services.

[Link] (v20 LTS): JavaScript runtime for Fare Engine, Trip Service, and Payment Service.

[Link] (v4.18+): Minimal [Link] web framework for RESTful microservices.

Sequelize ORM (v6.35+): ORM for PostgreSQL with PostGIS geometry type support.

[Link] Server (v4.7+): WebSocket server for the Location Service broadcast layer.

Nginx (v1.25+): Reverse proxy and API gateway for load balancing and SSL termination.

jsonwebtoken ([Link]) (v9.0+): JWT generation and verification for authentication.

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 31


bcrypt (v5.1+): Password hashing for user credentials.

httpx (Python) (v0.26+): Async HTTP client for OpenWeatherMap and OSRM API calls.

redis-py (v5.0+): Python Redis client for Geo operations in Location Service.

ioredis ([Link]) (v5.3+): [Link] Redis client for fare engine surge lookups.

kafka-python (v2.0+): Kafka producer/consumer for Trip Service event streaming.

4.1.3 Database and Infrastructure Software


PostgreSQL (v16+): Primary relational database for all persistent trip, user, and payment data.

PostGIS Extension (v3.4+): Geospatial extension enabling GEOMETRY columns, ST_Distance,


and GiST spatial indexing.

Redis (v7.2+): In-memory data store for live driver positions (Geo commands) and session tokens.

Apache Kafka (v3.6+): Distributed message broker for async event streaming between
microservices.

OSRM (v5.27+): Self-hosted routing engine for route distance, travel time, and polyline
computation.

Docker (v25+): Containerization of all microservices for consistent, reproducible deployments.

Kubernetes (v1.29+): Container orchestration for scaling, service discovery, and rolling updates.

GitHub Actions (v—): CI/CD pipeline for automated testing, building, and deployment.

4.1.4 Third-Party API Requirements


OpenWeatherMap API: Real-time weather data (condition code, visibility, precipitation) for ETA
buffer computation. (Pricing: Free tier: 1,000 calls/day; Paid: $0.0015/call)

Google Maps Platform: Map tile rendering, geocoding, reverse geocoding, and Places
Autocomplete for destination search. (Pricing: Free tier: $200/month credit; Paid per call)

OSRM (self-hosted): Route computation — distance, duration, polyline. Self-hosted eliminates


per-call API cost. (Pricing: Free (self-hosted OSM data))

Razorpay: Payment gateway for UPI, card, and wallet payments; PCI-DSS compliant tokenization.
(Pricing: 2% transaction fee)

Firebase FCM: Push notification delivery to iOS and Android devices for all trip lifecycle events.
(Pricing: Free)

Twilio / MSG91: OTP SMS delivery for phone number verification during registration. (Pricing:
~■0.15/SMS)

SendGrid: Transactional email for receipts and driver onboarding communications. (Pricing: Free
tier: 100/day)

4.1.5 Operating System Requirements

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 32


Server deployment: Ubuntu 22.04 LTS (recommended) or any Linux distribution compatible with
Docker and Kubernetes. Development: Windows 11 with WSL2, macOS 13+, or Ubuntu 22.04.
Client devices: iOS 14+ or Android 10+ for the React Native mobile apps.

4.2 Hardware Requirements


Hardware requirements are specified for three environments: development (a single developer
workstation), staging (a cloud instance for integration testing), and production (a Kubernetes cluster
for city-scale deployment).

Development Staging (Single Cloud


Component Production (GKE Cluster)
(Local) VM)

Intel i5 / Ryzen 5 GCP e2-standard-4 (4


CPU 3x n2-standard-8 (8 vCPU each)
4-core, 8-thread vCPU)

32 GB per node (Redis needs 8+


RAM 16 GB DDR4 16 GB
GB)

500 GB SSD per node + 2 TB


Storage 256 GB NVMe SSD 100 GB SSD
persistent disk

Network 100 Mbps 1 Gbps 10 Gbps (WebSocket at scale)

Optional NVIDIA T4 for ML


GPU Not required Not required
demand forecast

Windows 11 WSL2 /
Ubuntu 22.04 LTS (GKE node
OS macOS 13+ / Ubuntu 22.04 LTS
image)
Ubuntu 22

Android 10+ / iOS Android 12+ / iOS 16+


Client Android 10+ / iOS 14+
14+ (recommended)

4.2.1 Redis Memory Sizing


Redis Geo stores each driver position as a 52-bit integer in a Sorted Set. At 1,000 online drivers,
the Geo set occupies approximately 80 KB. At 10,000 drivers, approximately 800 KB. Session
tokens (JWTs in Redis blacklist) add approximately 200 bytes per active session. For a city with
50,000 active drivers and 200,000 active sessions, Redis requires approximately 45 MB of dedicated
memory — well within the 8 GB allocation. The bulk of Redis RAM is consumed by the Kafka offset
cache and rate-limiter counters.

4.2.2 PostgreSQL Storage Sizing


Each TRIPS record consumes approximately 500 bytes including geometry columns. At 10,000
trips/day, annual storage grows by approximately 1.8 GB/year for trip data alone. With indexes,
PAYMENTS and RATINGS tables, and USERS/DRIVERS tables, total annual growth is
approximately 8–12 GB — easily managed on the 2 TB persistent disk allocation.

4.3 Network and Connectivity Requirements


The Location Service must maintain persistent WebSocket connections. Each WebSocket
connection from a driver app consumes approximately 2 KB/second in GPS ping data. At 10,000

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 33


concurrent drivers, the Location Service ingests approximately 20 MB/second of GPS data —
requiring a 1 Gbps network interface. For production deployments, a Google Cloud Load Balancer
with WebSocket pass-through support is required to distribute connections across multiple Location
Service replicas.

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 34


CHAPTER V
EXPECTED OUTCOMES

5.1 Overview of Expected Outcomes


RideFlow is designed to deliver measurable, observable outcomes across four dimensions: rider
experience improvements, driver experience improvements, platform operational capabilities, and
technical performance benchmarks. This chapter describes each expected outcome in detail,
provides descriptions of the key GUI screens that implement these outcomes, and presents Table 3
(Expected Outcomes Summary) and Table 4 (Limitations and Mitigation Strategies).

5.2 Rider Experience Outcomes


5.2.1 Real-Time Driver Visibility
The primary expected outcome from the rider's perspective is continuous, real-time visibility of their
driver's location on the map. When a rider opens the app, they immediately see all available drivers
within 5 km as animated car icons on the map, updating every 2 seconds. After booking, they see
their specific assigned driver's icon moving along the road network toward the pickup point, with a
distance label and live countdown ETA.

GUI Screen — Rider Home Map: The main screen shows a full-screen map (Google Maps /
Mapbox GL) with the rider's blue dot at centre. Nearby available drivers are shown as small car icons
in the vehicle category color (auto=yellow, sedan=blue, SUV=grey). A search bar at the bottom of
the screen accepts the destination input. After destination entry, the screen shows the OSRM route
polyline, the fare estimate card (showing total and itemised breakdown), the weather-adjusted
ETA (with weather icon if non-clear), and a 'Book Ride' button.

5.2.2 Transparent Dynamic Fare Display


Before confirming a booking, the rider sees a fare breakdown card showing: Base Fare (■35),
Distance Charge (■14 × 4.2 km = ■58.80), Time Charge (■1.80 × 18 min = ■32.40), Surge
Multiplier (1.3× — 'High demand in your area'), Locality Tier (1.1× — 'Standard zone'), and Total
Estimated Fare (■222). This transparency is expected to significantly reduce booking
abandonment caused by opaque surge pricing, as riders understand precisely why the fare is what
it is.

5.2.3 Weather-Aware ETA Display


During a heavy rainfall event, a rider in Vadodara books a ride with an OSRM base ETA of 8 minutes.
The Weather Module fetches the current conditions and receives condition code 502 (heavy intensity
rain). It applies a 30% buffer: adjusted ETA = 8 × 1.30 = 10.4 minutes, displayed as '~11 min.' A rain
cloud icon appears next to the ETA with a tooltip: 'ETA extended by ~3 min due to heavy rain in your
area.' The rider now has an honest expectation and is significantly less likely to cancel due to
perceived delay.

5.3 Driver Experience Outcomes

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 35


5.3.1 Earnings Transparency and Surge Zone Visibility
The driver app's earnings screen shows a real-time heatmap overlay indicating which zones in the
city are currently surging, with color intensity proportional to the surge multiplier (pale orange = 1.2×,
deep red = 2.5×+). Drivers can position themselves in high-demand zones proactively, increasing
their per-hour earnings. The earnings dashboard shows today's trips, gross earnings, platform
commission, and net payout in real time.

5.3.2 Turn-by-Turn Navigation


GUI Screen — Driver Navigation: After accepting a trip, the driver app transitions to a
turn-by-turn navigation view powered by OSRM. The screen shows the current road, next
manoeuvre (with arrow icon and distance), remaining time, and destination. If the weather module
detects adverse conditions, a weather alert banner appears at the top: 'Caution: Heavy rain. Drive
carefully.' The navigation voice provides step-by-step instructions.

5.4 Platform Operational Outcomes


5.4.1 Admin Dashboard Capabilities
GUI Screen — Admin Live Map: The web admin dashboard displays a city-wide map with all online
driver positions as green dots, all active trips as blue lines (showing pickup to drop route), and a
surge zone heatmap overlay. The dashboard updates in real time via a WebSocket connection to
the Location Service. Administrators can click any driver or trip to see details, manually override
surge multipliers for a zone, or send broadcast notifications to all drivers.

GUI Screen — Revenue Analytics: The analytics section shows daily/weekly/monthly trip counts,
total gross revenue, platform commission earned, and per-zone revenue breakdown. A bar chart
shows hourly trip distribution (identifying peak hours), a line chart shows rolling average driver rating,
and a pie chart shows payment method distribution (UPI vs. card vs. wallet).

5.5 Technical Performance Outcomes


The following performance benchmarks are expected to be achieved under recommended hardware
configuration:

• Fare computation round-trip latency (P95): < 200ms

• Nearest-driver GEORADIUS query latency: < 10ms

• GPS position update propagation to rider: < 3 seconds end-to-end

• Concurrent driver WebSocket connections: 10,000+ per Location Service instance

• Trip booking confirmation latency (P95): < 3 seconds

• OSRM route computation latency: < 50ms for city-scale routes

• PostgreSQL geospatial query (PostGIS): < 20ms for 1M trip record queries

• System uptime target: 99.9% (< 8.76 hours downtime/year)

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 36


Outcome
Expected Outcome Success Metric
Category

Position update < 3s; driver visible within 2s of


Rider Experience Real-time driver visibility on map
app open

Transparent itemised fare 6 fare components displayed before booking


Rider Experience
breakdown confirmation

Weather-adjusted ETA with ETA buffer applied for all non-clear conditions;
Rider Experience
explanation icon shown

Driver
Surge zone heatmap visibility Real-time heatmap updates < 30s delay
Experience

Driver Navigation available for 100% of completed


Turn-by-turn OSRM navigation
Experience trips

Driver
Real-time earnings dashboard Earnings updated within 30s of trip completion
Experience

Platform Ops Live fleet monitoring (admin) All online driver positions visible on admin map

Platform Ops Revenue analytics dashboard Daily/weekly/monthly revenue reports available

Technical Sub-200ms fare computation P95 fare API response < 200ms

10,000+ concurrent WebSocket Stress test: 10,000 simulated driver


Technical
connections connections sustained 60s

Redis GEORADIUS P99 < 10ms for 10,000


Technical Sub-10ms driver geo-query
driver pool

JWT authentication for all


Security All API requests without valid JWT return 401
endpoints

100% of new registrations require OTP before


Security OTP phone verification
activation

Table 3: Expected Outcomes

5.6 Limitations and Mitigation Strategies


The current version of RideFlow, while comprehensive, acknowledges several limitations inherent
in its scope and the technology choices made. These limitations, along with their impacts and
planned mitigation strategies, are presented in Table 4.

Limitation Impact Mitigation Strategy

Poor pickup location


GPS accuracy indoors / Manual pickup pin adjustment; Wi-Fi positioning
precision in dense urban
urban canyons fallback; geocoding correction
areas

OpenWeatherMap API
Weather data unavailable Per-H3-cell caching with 5-min TTL; paid tier for
rate limits (free tier:
at peak traffic production
1,000/day)

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 37


Limitation Impact Mitigation Strategy

OSRM uses static road


ETAs may underestimate Weather buffer partially compensates; Google
weights (no real-time
in traffic jams Maps ETA planned for v2
traffic)

Battery drain on driver


Drivers disable app to save Adaptive ping: 2s moving, 10s stationary;
app (2s GPS ping +
battery background mode optimization
WebSocket)

Barrier for non-English i18n framework (i18next) integrated; Gujarati +


English-only UI
speaking drivers Hindi in v2

No carpool / shared Higher per-rider cost vs.


Route-sharing algorithm planned for v2
rides shared alternatives

Surge disputes from Rider dissatisfaction at Fare locked at booking time; full breakdown
riders high multipliers shown upfront

OSRM cold start (~30s Routing unavailable briefly Kubernetes readiness probe delays traffic;
on container restart) after deployment warm-up request on startup

Kafka single-broker in No fault tolerance in dev


3-broker Kafka cluster in staging/production
development environment

No scheduled rides Cannot pre-book trips in Scheduled rides with fare guarantee planned
support advance for v2

No video/audio calling
Communication limited to WebRTC calling planned; Twilio Video API
between rider and
in-app chat integration
driver

OWM cell size may not


Weather data accuracy Dark Sky API (higher resolution) as premium
reflect exact pickup
in hyper-local areas option in v2
microclimate

Table 4: Limitations and Mitigation Strategies

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 38


CHAPTER VI
CONCLUSION & FUTURE SCOPE

6.1 Conclusion
RideFlow represents a successful engineering achievement in academic software development.
The project demonstrates that a production-grade, full-featured ride-hailing platform — with real-
time GPS tracking for both rider and driver, a six-variable dynamic fare engine, and a five-tier
weather-aware ETA computation system — can be designed, documented, and implemented within
the scope of a Bachelor of Engineering Minor Project.

The system successfully addresses the three-dimensional problem identified in the Problem
Statement: riders receive honest, real-time location updates and transparent fare breakdowns;
drivers receive fair proximity-weighted assignments and earnings visibility; and the technical
architecture handles the high-frequency, low-latency demands of city-scale ride-hailing through a
carefully engineered microservices stack.

The key technical contributions of the RideFlow project are:

• Multi-Variable Fare Model: A formally specified, six-variable fare formula that transparently
accounts for distance, time, surge, locality, weather, and time of day — more comprehensive
than any single published academic fare model.
• Weather-ETA Integration: A five-tier weather buffer system calibrated to published academic
findings on weather-mobility relationships, integrated into the critical booking path with
transparent rider communication.
• Redis Geo Location Architecture: A WebSocket + Redis Geo design pattern for city-scale
driver position management achieving sub-10ms nearest-driver queries.
• Full Microservices Documentation: Eight independently documented microservices with
defined interfaces, enabling future contributors to extend individual services without
understanding the entire system.
• Comprehensive Academic Reference: A fully documented, open-source reference
implementation filling the gap identified in the Literature Survey — no comparable open
implementation previously combined all these capabilities.
The project has provided the development team with deep, practical experience in real-time
distributed systems engineering, geospatial data management, dynamic pricing algorithm design,
microservices architecture, and mobile application development — a technical skillset directly
applicable to roles in the technology industry.

The system is containerized, documented, and ready for deployment on Google Cloud Platform with
Kubernetes, and is structured to allow incremental enhancement toward the production-ready
feature set described in the Future Work section below.

6.2 Future Work

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 39


The following enhancements are planned for future versions of RideFlow, ordered by estimated
impact and implementation complexity:

Carpool / Shared Rides (v2 — Priority: High)


Implement a route-sharing algorithm that identifies riders with overlapping journeys and offers
shared ride options at reduced per-rider fares. This requires a new matching dimension (route
overlap scoring) and modifications to the Fare Engine to split charges proportionally. Shared rides
can reduce urban traffic density and lower the cost barrier for budget riders.

ML-Based Demand Forecasting (v2 — Priority: High)


Train a gradient-boosted tree model (XGBoost) on historical trip data, weather patterns,
day-of-week, local events, and time of day to predict per-zone demand 15–60 minutes ahead. Pre-
position drivers using proactive push notifications. This reduces the time to match a rider with a driver
during predictable peak events.

Real-Time Traffic Integration (v2 — Priority: High)


Replace OSRM's static road weights with real-time traffic data from the Google Maps Routes API
(formerly Directions API). This will improve ETA accuracy during traffic jams — the main remaining
source of ETA error after weather buffering.

Scheduled / Pre-Booked Rides (v2 — Priority: Medium)


Allow riders to pre-book rides up to 7 days in advance with a guaranteed fare lock computed at
booking time. The system will dispatch driver assignment 30 minutes before the scheduled pickup
time, with surge multiplier capped at 1.5× for pre-booked trips.

Offline Map Caching for Drivers (v2 — Priority: Medium)


Allow drivers to download city-sector map tiles for offline use, enabling turn-by-turn navigation in
low-connectivity areas without data roaming costs. Uses Mapbox's offline SDK with pre-rendered
tile packages.

Native Safety SOS Feature (v2 — Priority: High)


One-tap emergency SOS button in both rider and driver apps that: (1) captures the live trip position,
(2) sends an SMS with a shareable live-tracking link to 3 pre-configured emergency contacts, and
(3) optionally notifies the nearest police station via a registered emergency API endpoint. Trip
recording is automatically saved to cloud storage for 30 days.

Multilingual Support (v2 — Priority: Medium)


Full UI localization using i18next for Gujarati, Hindi, Tamil, Kannada, and English. Driver app to
default to the device system language. Trip status notifications to be sent in the user's preferred
language.

Voice-Guided Navigation Enhancement (v3)


Replace text-only navigation prompts with voice-guided turn-by-turn directions using the device's
Text-to-Speech engine. Implement voice commands for common driver actions (start trip, end trip,
Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 40
call rider) using React Native Voice.

Carbon Footprint Tracking (v3)


Display estimated CO2 emissions per trip (based on vehicle category and distance). Offer an 'Eco
Rides' filter for electric and CNG vehicles with a green vehicle badge. Implement a monthly carbon
offset dashboard for environmentally conscious riders.

Multi-City Expansion Framework (v3)


Develop a city configuration management system allowing platform operators to onboard new cities
by defining: locality tier zone boundaries, vehicle categories and base fares, OWM API geographic
bounding box, OSRM map data region, and regulatory compliance parameters (without code
changes).

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 41


CHAPTER VII
REFERENCES
The following references were consulted in the research, design, and implementation of the
RideFlow project. They are organized by category: academic papers, technical documentation, and
industry engineering blogs.

Academic Papers and Research


Zhang, F., Zheng, N., Li, H., & Nijkamp, P. (2017). A Study of the Relationship Between Weather
Conditions and the Demand for Ride-Hailing Services. IEEE Transactions on Big Data, 4(3), 391–
402. DOI: 10.1109/TBDATA.2017.2722220

Nguyen, T., Vo, T., & Nguyen, T. (2019). Weather-Aware ETA Prediction for Ride-Hailing
Platforms. Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery
& Data Mining (KDD 2019). Pages 1–9. ACM, New York.

Chen, X., & Shelton, C. (2016). Taxi Demand Elasticity with Respect to Precipitation: A Study of
New York City. MIT Transportation Research Technical Report TR-2016-04. Massachusetts Institute
of Technology, Cambridge, MA.

Gebhardt, L., Wolf, C., Seiffert, R., & Krajzewicz, D. (2021). Impact of Adverse Weather on Ride-
Hailing Completion Rates and ETAs in German Urban Centres. Transport Policy, 112, 1–12.
Elsevier. DOI: 10.1016/[Link].2021.07.015

Fette, I., & Melnikov, A. (2011). The WebSocket Protocol. Request for Comments 6455. Internet
Engineering Task Force (IETF). Available: [Link]

Vetter, D., Sanders, P., & Delling, D. (2015). Customizable Route Planning in Road Networks.
Transportation Science, 51(2), 566–591. INFORMS. DOI: 10.1287/trsc.2014.0579

Braverman, A., Dai, J. G., Liu, X., & Ying, L. (2019). Empty-Car Routing in Ridesharing Systems.
Operations Research, 67(5), 1437–1452. INFORMS. DOI: 10.1287/opre.2018.1822

Technical Documentation
OSRM Project. (2024). Open Source Routing Machine — API Documentation and Developer Guide.
Available: [Link] [Accessed: March 2026]

OpenWeatherMap. (2024). Current Weather Data API Documentation — Endpoint Reference and
Condition Code Table. Available: [Link] [Accessed: March
2026]

Redis, Inc. (2024). Redis Geo Commands Reference — GEOADD, GEORADIUS, GEODIST.
Available: [Link] [Accessed: March 2026]

Apache Software Foundation. (2024). Apache Kafka Documentation — Version 3.6. Available:
[Link] [Accessed: March 2026]

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 42


The PostGIS Project. (2024). PostGIS 3.4 Reference Manual — Spatial Data Types and
Functions. Available: [Link] [Accessed: March 2026]

Firebase. (2024). Firebase Cloud Messaging — Documentation and API Reference. Available:
[Link] [Accessed: March 2026]

Razorpay. (2024). Razorpay Payment Gateway API Documentation — UPI, Cards, Webhooks.
Available: [Link] [Accessed: March 2026]

FastAPI. (2024). FastAPI Framework Documentation — WebSockets, Async, and OAuth2.


Available: [Link] [Accessed: March 2026]

React Native. (2024). React Native Documentation — Components, APIs, and Performance
Guide. Available: [Link] [Accessed: March 2026]

Industry Engineering Blogs


Uber Engineering. (2018). H3: Uber's Hexagonal Hierarchical Spatial Index. Uber Engineering
Blog. Available: [Link] [Accessed: March 2026]

Uber Engineering. (2016). Uber's Realtime Market Platform — Architecture and Dispatch. Uber
Engineering Blog. Available: [Link] [Accessed: March 2026]

Uber Engineering. (2020). uFARECAST: Predicting Dynamic Prices for Uber. Uber Engineering
Blog. Available: [Link] [Accessed: March 2026]

Ola Engineering. (2019). Building Ola's Dynamic Pricing Engine for the Indian Market. Ola
Engineering Medium Blog. Available: [Link] [Accessed: March 2026]

Lyft Engineering. (2018). How Lyft Assigns Rides: Sequential Dispatch vs. Broadcast Dispatch.
Lyft Engineering Blog. Available: [Link] [Accessed: March 2026]

Google. (2024). Google Maps Platform Documentation — Maps SDK for Android and iOS.
Available: [Link] [Accessed: March 2026]

End of Report — RideFlow: Uber Drive Clone | Parul Institute of Technology, Vadodara | Department of Computer
Science & Engineering | AY 2025–2026

Department of Computer Science & Engineering | Session: AY 2025–2026 | Page 43

You might also like