feature/ride — Ride Booking

Manage ride bookings, fare estimation, and real-time driver tracking via BLoC.

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/Vantoan252003/Mozi --skill feature-ride-ride-booking
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: feature/ride — Ride Booking
Source: https://github.com/Vantoan252003/Mozi/tree/main/lib/features/ride
Command: npx skills add https://github.com/Vantoan252003/Mozi --skill feature-ride-ride-booking

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a complete client-side implementation for booking, estimating, and tracking on-demand rides so users can quickly request transportation, see real-time driver location, and complete payments without manual coordination across components.

Core Features & Use Cases

  • Fare estimation and service selection: estimate fares for motorbike, 4-seat, and 7-seat services with surge pricing applied.
  • Booking lifecycle and management: book rides, cancel orders, fetch ride details and history, and handle payment and voucher application.
  • Real-time tracking and UX: socket-driven driver location updates, camera auto-follow behavior, and a RideStatusBar to reflect state transitions from pending to completed.
  • Architecture & rules: Clean Architecture with domain entities, use cases, data sources, and presentation layers (BLoC + cubit); RideBloc is injectable and DriverEntity must not be persisted.

Quick Start

Open the RideHomePage, select a destination, request an estimate, choose a service and payment method, then confirm booking to start ride tracking.

Frequently Asked Questions about feature/ride — Ride Booking

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a Flutter ride-hailing app with real-time tracking and fare estimation?▼

You can implement a complete ride-hailing client by using BLoC for state management, socket-based connections for real-time driver tracking, and domain entities to handle fare estimation with surge pricing logic.

How does surge pricing work when estimating fares for different ride services?▼

Surge pricing applies multipliers to base fares during high-demand periods, calculating adjusted estimates across motorbike, 4-seat, and 7-seat service types before a user confirms a ride booking.

Can I use BLoC and cubit together for managing ride booking lifecycles in Flutter?▼

Yes, the architecture supports both BLoC and cubit patterns across presentation layers, managing the complete order lifecycle from booking and cancelling rides to fetching ride details and history.

Do I need to persist driver location data locally when tracking rides in real-time?▼

No, you should not persist ephemeral driver state locally; DriverEntity updates arrive via socket connections and are handled in-memory to reflect real-time location without local storage.

What is the best way to handle ride state transitions from pending to completed in a Flutter app?▼

Implement a RideStatusBar widget driven by BLoC state changes to reflect order lifecycle transitions, updating the UI automatically as the ride progresses from pending through completion.

How do I structure domain entities and use cases for a ride booking system using Clean Architecture?▼

Structure domain entities like DriverEntity and RideEntity with use cases for booking, fare estimation, and history retrieval, keeping remote datasources and presentation layers decoupled via dependency injection.