ride/data

Implement ride data operations and JSON-to-entity mapping for /ride endpoints.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It centralizes and standardizes the ride feature's data layer, removing repetitive boilerplate for network calls, JSON parsing, and error-to-failure mapping so the application can reliably fetch and persist ride-related information.

Core Features & Use Cases

  • Model Mapping: Defines models that extend domain entities with fromJson/toJson for consistent serialization and deserialization.
  • Remote Datasources: Specifies network operations to getEstimates, bookRide, cancelRide, getRideDetail, and getRideHistory against the /ride API endpoints.
  • Repository Integration: Implements a repository that injects the remote datasource and translates exceptions into failure objects for use by higher layers.
  • Use Case: When a user requests a price estimate then books a ride, the app calls the datasource endpoints, maps responses into domain entities, and the repository surfaces success or structured failure to the UI.

Quick Start

Ask the ride/data skill to implement the remote datasource methods for estimates, booking, cancellation, ride details, and history and map JSON responses into domain entities.

Frequently Asked Questions about ride/data

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

FAQPage Schema
How do I map JSON responses to domain entities for a Flutter ride-hailing app?

To map JSON responses to domain entities in a Flutter ride-hailing app, you use data models that extend domain entities and implement fromJson and toJson methods for consistent serialization and deserialization.

How do I implement remote datasources for ride booking and cancellation in Dart?

Implementing remote datasources for ride booking and cancellation in Dart involves specifying network operations to POST and GET interactions against /ride API endpoints, then converting responses into domain models.

What is the best way to handle API exceptions in a Flutter repository layer?

The best way to handle API exceptions in a Flutter repository layer is to inject the remote datasource and translate network exceptions into structured failure objects consumed by higher layers.

Does this ride-hailing data layer support fetching ride history and price estimates?

Yes, the ride-hailing data layer supports fetching ride history and price estimates by defining remote datasource methods for getRideHistory and getEstimates against the /ride API endpoints.

When do I need to implement model mapping for mobile ride-hailing client workflows?

You need to implement model mapping for mobile ride-hailing client workflows when you want to centralize data operations and remove repetitive boilerplate for network calls and JSON parsing.

What endpoints are required to book a ride and retrieve ride details in a mobile client?

To book a ride and retrieve ride details in a mobile client, you need to enforce POST and GET interactions with /ride endpoints covering bookRide and getRideDetail operations for data retrieval.