What is App Courier?
App Courier is a modern, full-featured courier and package delivery management system built with Flutter. It provides a complete solution for managing package deliveries, tracking shipments, and coordinating between administrators, customers, and delivery drivers. The application streamlines the entire delivery workflow from package creation to final delivery, with real-time tracking, status updates, and comprehensive reporting capabilities.Key Features
Multi-Role System
Three distinct user roles (Admin, Customer, Driver) with role-specific dashboards and functionality
Package Management
Complete package lifecycle management from creation to delivery with status tracking
Real-time Tracking
Track deliveries in real-time with detailed status updates and history
Customer Portal
Self-service portal for customers to request shipments and track their packages
Driver Assignment
Intelligent driver assignment system with delivery history tracking
PDF Generation
Generate delivery receipts and reports with built-in PDF functionality
Architecture Overview
App Courier follows a clean, layered architecture pattern that separates concerns and ensures maintainability:Technology Stack
- Framework: Flutter 3.7.2+
- State Management: Provider pattern
- API Communication: Dio HTTP client
- Local Storage: SharedPreferences
- UI Components: Material Design
Core Architecture
Application Flow
Initialization
The app initializes with portrait-only orientation and sets up the API client with base URL configuration
Provider Setup
Multiple providers are initialized for state management across different features:
- AuthProvider: Authentication and session management
- CustomersProvider: Customer data management
- EncomiendasProvider: Package/shipment management
- SucursalesProvider: Branch/location management
- ConfiguracionesProvider: App configuration
- UsersProvider: User management
- MotorizadoProvider: Driver management
- DashboardProvider: Dashboard data and analytics
- SolicitudProvider: Delivery request management
Authentication
Users authenticate based on their role (Admin/Staff or Customer) through separate login screens
API Integration
The application communicates with a RESTful API backend for all data operations:Authentication Flow
The API client automatically handles JWT token authentication:- Tokens are stored securely in SharedPreferences
- Automatic token injection via Dio interceptor
- Automatic logout on 401 (Unauthorized) responses
The API client includes interceptors for automatic token management and error handling, ensuring seamless authentication across all API calls.
User Roles
Admin/Staff
Administrators have full access to:- Dashboard with analytics and metrics
- Customer management (create, edit, view)
- Package/shipment management
- Driver assignment and tracking
- Branch/location management
- System configuration
- Report generation
Customer
Customers can:- Register and manage their account
- Request new shipments
- Track active deliveries
- View delivery history
- Manage delivery addresses
- View delivery receipts
Driver (Motorizado)
Drivers have access to:- Assigned deliveries dashboard
- Delivery status updates
- Route information
- Delivery history
- Package details and recipient information
Key Dependencies
The application leverages several key Flutter packages:| Package | Purpose |
|---|---|
dio | HTTP client for API communication |
provider | State management |
shared_preferences | Local data persistence |
image_picker | Capture delivery photos |
fl_chart | Analytics and charts |
pdf & printing | Generate and print receipts |
permission_handler | Handle device permissions |
intl | Internationalization and date formatting |
pinput | OTP/PIN input for verification |
Next Steps
Quick Start
Get the app running in minutes
Installation
Detailed setup instructions