Carrier Mobile App
Relevant source files
The following files were used as context for generating this wiki page:
- README.md
- packages/carrier-mobile-ionic/package.json
- packages/carrier-mobile-ionic/src/app/app-routing.module.ts
- packages/carrier-mobile-ionic/src/global.scss
- packages/admin-web-angular/src/app/pages/+carriers/+carrier/carrier.module.ts
- packages/merchant-tablet-ionic/src/pages/+carriers/carriers.module.ts
- packages/admin-web-angular/src/assets/i18n/en-US.json
The Carrier Mobile App is a key component of the Ever® Demand™ platform, designed for delivery carriers, drivers, or service providers. Built as a hybrid Progressive Web App (PWA) for iOS and Android using Ionic and Angular, it provides the necessary tools for managing and executing on-demand deliveries. The app allows carriers to view available orders, manage their active deliveries, and track their status in real-time, integrating seamlessly with the broader platform ecosystem, which includes the Admin Website and Merchant Tablet App.
This application is a headless commerce client, consuming data from the platform's GraphQL, REST, and WebSocket APIs. It is responsible for the on-the-ground logistics, including real-time location tracking for on-demand orders, ensuring a transparent and efficient delivery process for merchants and customers.
Sources: README.md, packages/carrier-mobile-ionic/package.json
Technology Stack
The Carrier Mobile App is built on a modern web technology stack, primarily leveraging Angular and the Ionic framework for cross-platform mobile development. It uses Cordova to access native device features.
Sources: README.md, packages/carrier-mobile-ionic/package.json
This diagram shows the main technologies and libraries used in the Carrier Mobile App.
Key Dependencies
The package.json file outlines the core dependencies that power the application.
| Dependency | Version | Description |
|---|---|---|
@ionic/angular | ^5.8.4 | The primary framework for building the hybrid mobile application. |
@angular/core | ^13.1.0 | The core Angular framework for building the application's components and logic. |
@apollo/client | ^3.5.5 | GraphQL client for communicating with the backend API. |
socket.io-client | ^4.3.0 | Enables real-time, bidirectional communication with the server. |
rxjs | ^7.4.0 | Used extensively for reactive programming and managing asynchronous data streams. |
cordova-android | ^10.1.1 | The platform for building the Android version of the app. |
@ionic-native/geolocation | ^5.36.0 | Cordova wrapper for accessing the device's GPS location. |
@ionic-native/camera | ^5.36.0 | Cordova wrapper for accessing the device's camera. |
@ionic-native/call-number | ^5.36.0 | Cordova wrapper for initiating phone calls from the app. |
Sources: packages/carrier-mobile-ionic/package.json:71-109
Application Structure & Routing
The application's navigation is defined in app-routing.module.ts. It uses lazy loading to load feature modules on demand, which improves the initial startup time. The main routes handle authentication, the primary application interface, and order management.
This flowchart illustrates the navigation flow within the Carrier Mobile App.
Main Routes
The following table details the primary routes configured for the application.
| Path | Component/Module | Description |
|---|---|---|
login | LoginPage | Handles user authentication. |
main | MainPage | The main dashboard for the carrier after logging in. |
orders/available | AvailableOrdersPage | Displays a list of orders available for pickup. |
orders/my | MyOrdersPage | Shows the orders currently assigned to the carrier. |
order-info/:id | OrderInfoPage | Shows detailed information for a specific order. |
order-map/:id | OrderMapPage | Displays a map for an order, likely showing the route. |
profile | ProfilePage | Allows the carrier to view and edit their profile. |
settings | SettingsPage | Contains application settings. |
Sources: packages/carrier-mobile-ionic/src/app/app-routing.module.ts:10-34
Carrier Management in the Ecosystem
While the Carrier Mobile App is the primary tool for drivers, the creation and high-level management of carriers are handled in other parts of the Ever Demand platform, namely the Admin Web App and the Merchant Tablet App.
Admin Carrier Management
The Admin Web App contains a comprehensive module for managing all carriers on the platform.
- Module:
CarrierModuleinpackages/admin-web-angular/src/app/pages/+carriers/+carrier/carrier.module.ts - Features:
- Viewing and editing carrier information (
CarrierInfoComponent). - Monitoring real-time order status (
CarrierOrdersStatusComponent). - Viewing active orders (
CarrierOrdersComponent) and order history (CarrierOrdersHistoryComponent). - Tracking carrier location (
CarrierLocationModule).
- Viewing and editing carrier information (
- Services: It utilizes
CarriersService,GeoLocationOrdersService, andCarriersOrdersServiceto fetch and manage data.
Sources: packages/admin-web-angular/src/app/pages/+carriers/+carrier/carrier.module.ts:7-58
Merchant Carrier Management
The Merchant Tablet App provides merchants with tools to interact with carriers assigned to their orders.
- Module:
CarrierssPageModuleinpackages/merchant-tablet-ionic/src/pages/+carriers/carriers.module.ts - Features:
- A smart table to list carriers with details like image, status, and deliveries.
- Popups for adding new carriers (
AddCarriersPopupPageModule), editing (CarrierEditPopupModule), and tracking them on a map (CarrierTrackPopupModule). - The ability to view a carrier's assigned deliveries (
CarrierDeliveriesPopupPageModule).
Sources: packages/merchant-tablet-ionic/src/pages/+carriers/carriers.module.ts:4-48
This diagram shows how different platform applications interact with carrier data.
UI and Styling
The visual identity of the Carrier Mobile App is defined in global.scss. It establishes a consistent theme using brand colors and custom styles for Ionic components.
- Font: The primary font used is 'Roboto'.
- Color Palette: The theme is built around a dark color scheme, with
$brand-darken(#1f212a) used for page backgrounds and$brand-lighted(#353748) for other elements. - Custom Components: The file includes specific styles for modals (
order-info-modal,map-info-modal), popovers, and menu elements to ensure a cohesive user experience. - Layout: It uses flexbox utilities for alignment and defines helper classes like
.blur-filterfor visual effects.
Sources: packages/carrier-mobile-ionic/src/global.scss:22-120