How akankshagulekar/ridesharingsystem works
This is a C++ ride-sharing backend simulation. The main workflow is a client sending REST requests to register or add wallet funds, book a ride, and advance its lifecycle; booking finds a route and driver, estimates time and fare, then persists the ride and payment state. The README documents additional authentication, safety filtering, escrow-style payment, and admin reporting. Service internals are partly unsampled, so links beyond the shown calls are included only where the README documents them.
Main entry points: main.cpp REST routes · RideSystem.cpp Booking and matching · Storage.cpp File persistence · Graph.cpp Road graph
Components 13
API and access
- REST routes
src/main.cpp
Ride services
- Accounts and wallet
src/RideSystem.cpp - Booking and matching
src/RideSystem.cpp - Ride lifecycle
src/RideSystem.cpp - Admin reports
src/RideSystem.cpp
Routing and pricing
- Road graph
src/Graph.cpp - Map file
data/map.txt - Fare strategies
include/Fare.h - ETA calculator
include/Eta.h
Domain and persistence
- Ride and payment models
include/models.h - File persistence
src/Storage.cpp - Persisted records
data/store
Other components
- API client
Connections 17
- API client → REST routes: sends requests
README.md - REST routes → Accounts and wallet: calls account APIs
src/main.cpp - REST routes → Booking and matching: calls booking API
src/main.cpp - REST routes → Ride lifecycle: calls ride APIs
src/main.cpp - REST routes → Admin reports: requests report
src/main.cpp - REST routes → Road graph: loads map
src/main.cpp - Booking and matching → Road graph: finds routes
README.md - Booking and matching → Fare strategies: selects fare
README.md - Booking and matching → ETA calculator: calculates ETA
README.md - Road graph → Map file: loads network
src/Graph.cpp - Booking and matching → Ride and payment models: creates ride records
README.md - Ride lifecycle → Ride and payment models: updates ride payments
README.md - Accounts and wallet → File persistence: persists changes
README.md - Booking and matching → File persistence: persists booking
README.md - Ride lifecycle → File persistence: persists transitions
README.md - Admin reports → Ride and payment models: summarizes records
README.md - File persistence → Persisted records: reads and writes
src/Storage.cpp