7
Back to Problem Dungeon

Ride Sharing System

hard

Step 1: Requirements

Requirements

Questions to ask

  • How many ride types? (economy, premium, pool)
  • How is driver matching done? (nearest, rating-based, pool-aware)
  • Do we need surge pricing?
  • What ride states exist? (requested, matched, en-route, in-progress, completed, cancelled)
  • Do we need real-time location tracking?
  • How do cancellations work? (penalties, time-based)

Functional requirements

  1. Rider requests a ride with pickup and destination
  2. System matches the closest available driver
  3. Driver accepts/rejects the ride
  4. Track ride states from request to completion
  5. Calculate fare based on distance, time, and demand
  6. Support ride cancellation with penalty rules

Non-functional requirements

  • Driver matching < 30 seconds
  • Location updates every 5 seconds during active ride
  • Fare calculation consistent and auditable
  • Handle concurrent requests for the same driver

1 / 7 — Requirements