Ride-Hailing Backend API

Move smarter.
Ride faster.

CSC is a robust, real-time ride-hailing API platform connecting clients, drivers, and administrators — built on Laravel 10 with WebSockets, Firebase, and smart journey orchestration.

3
User Roles
40+
API Endpoints
RT
Real-Time Events
OTP
Phone Verification
GPS
Route Tracking

Everything a ride-hailing
platform needs

From OTP onboarding to real-time journey tracking — every feature built-in.

📱

OTP Phone Verification

Secure onboarding for clients and drivers via SMS-based one-time passwords with validation flow.

Real-Time Events

WebSocket broadcasting via Laravel Reverb & Pusher keeps every party updated instantly during a journey.

🗺️

GPS Route Encoding

Polyline encoding for efficient storage and transmission of GPS paths between origin and destination.

🔔

Firebase Push Notifications

Driver offers, journey status changes, and alerts delivered instantly through Firebase Cloud Messaging.

💬

WhatsApp Messaging

Integrated Green API client to send WhatsApp messages for critical journey and driver notifications.

🛡️

Role-Based Access Control

Granular permissions via Spatie Laravel Permission ensuring every endpoint is properly guarded.

📊

Activity Logging

Full audit trail of user and admin actions powered by Spatie Activity Log for traceability and compliance.

🖼️

Media Management

Driver and car photos handled by Spatie Media Library with on-the-fly serving via signed storage routes.

🤝

Driver Offer System

Drivers can bid on nearby journeys; clients review offers and approve or reject with a single API call.

Three roles.
One seamless platform.

Purpose-built API groups for every participant in the journey lifecycle.

👤

Client

Passengers who request, track, and rate rides through a clean, secure API.

  • Register & verify phone number
  • Estimate journey cost & distance
  • Find & approve nearby drivers
  • Track ride in real-time
  • View journey history
  • Save favourite journeys
🚘

Driver

Registered drivers who accept journeys, track routes, and manage their profiles.

  • Browse available journeys
  • Place & manage offers
  • Confirm passenger arrival
  • View & end active journey
  • Manage car & profile
  • View scheduled slots
⚙️

Admin

Operators who manage the platform, oversee journeys, and control all entities.

  • Manage drivers & cars
  • View journey stats & tracks
  • Configure journey settings
  • Moderate users (ban/unban)
  • View ratings overview
  • Manage driver schedules

Clean, structured REST API

Every endpoint is guarded by Sanctum authentication and fine-grained permissions.

👤 Client — Journey
POST/client/journey/estimate
POST/client/journey/nearby-drivers
POST/client/journey/approve-driver/{id}
GET/client/journey/active
GET/client/journey/history
POST/client/journey/end/{id}
🚘 Driver — Journey
GET/driver/journey/(available)
POST/driver/journey/make-offer/{id}
GET/driver/journey/here/{id}
GET/driver/journey/current
GET/driver/journey/on-going
POST/driver/journey/end/{id}
⚙️ Admin — Management
GET/admin/journey/stats
GET/admin/journey/track/{id}
POST/admin/driver/{id}
DELETE/admin/driver/{id}
POST/admin/client/ban/{id}
POST/admin/cars/{car}
🔧 Admin — Settings & Cars
GET/admin/journey/setting
POST/admin/journey/setting/update
GET/admin/cars/(index)
POST/admin/cars/(store)
GET/admin/rating/(index)
GET/admin/schedules/(index)

Built with modern technology

Laravel 10
Laravel Sanctum
Laravel Reverb
Firebase FCM
WhatsApp API
Pusher
Spatie Permissions
Spatie Media Library
Spatie Activity Log
PHP 8.1+
Polyline Encoding
Guzzle HTTP