Mijay Cab Mobile API
The Miojay Cab API is a RESTful backend service developed to power the mobile and web experiences of a ride-hailing and fleet management platform in Kenya. Built with scalability and mobile-first integration in mind, the API provides endpoints for booking rides, managing drivers, tracking trips, and processing payments. It supports both direct consumer use and enterprise transport coordination, making it suitable for individual riders as well as organizations with fleet contracts. The backend is developed in PHP (Laravel) and leverages MySQL for persistent data storage. The system follows REST conventions, exposing secure, versioned endpoints (e.g., /api/v1/rides, /api/v1/drivers, etc.) and returns data in JSON format. Authentication is handled through JWT (JSON Web Tokens) or Laravel Passport, ensuring that both customers and drivers can interact with the platform via mobile apps without compromising security. The API includes role-based access control (RBAC), separating drivers, customers, and administrators. Drivers have access to endpoints for managing their profiles, starting and ending trips, and viewing earnings summaries. Customers can register, book rides, track ongoing trips, and rate drivers. Admin users can manage the entire system, including adding or verifying new vehicles, approving driver applications, monitoring active bookings, and handling customer support tickets. Geolocation and routing are integrated via the Google Maps API or OpenStreetMap, allowing the system to provide accurate pickup and drop-off point validation, fare estimation based on real distance, and real-time driver tracking. All coordinates are stored as latitude/longitude pairs in the database and indexed for efficient queries. The API also implements trip status tracking, with states such as pending, accepted, en route, arrived, completed, and cancelled. This enables the mobile frontend to render real-time status updates and progress indicators, improving the rider experience. For payments, the API supports M-Pesa STK Push for live collections and logs transaction confirmations via webhook callbacks for reliability.
Technologies: Laravel, MySQL, Firebase,
Visit Project Back to Projects