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.