AutoDispatch is a comprehensive transport management and automated dispatch system. It provides a robust backend API for managing logistics and a cross-platform mobile/desktop application for users, drivers, and administrators.
The project is split into two main components:
- AutoDispatchApi: A high-performance Ktor-based backend with a PostgreSQL database.
- AutoDispatchApp: A Kotlin Multiplatform (KMP) application targeting Android, iOS, and Desktop (JVM), built with Compose Multiplatform.
- Framework: Ktor 3.4.0 (Netty engine)
- Database & ORM: PostgreSQL with Exposed ORM
- Migrations: Liquibase
- DI: Koin
- Messaging: RabbitMQ (via Ktor RabbitMQ plugin)
- Security: JWT Authentication
- Documentation: Swagger UI & OpenAPI
- Reports: Apache POI (Excel) & OpenPDF (PDF generation)
- Email: Simple Java Mail
- Framework: Kotlin Multiplatform (KMP)
- UI: Compose Multiplatform
- Networking: Ktor Client (Content Negotiation, Logging, Auth)
- DI: Koin (with Compose & ViewModel support)
- Navigation: AndroidX Navigation (Multiplatform)
- Storage: DataStore (Preferences)
- Images: Coil 3
- Coloring: MaterialKolor (Dynamic Material 3 colors)
AutoDispatch/
├── AutoDispatchApi/ # Backend Ktor Server
│ ├── src/main/kotlin/ # Kotlin source code (Domain, Service, Repository, Route layers)
│ ├── src/main/resources/ # Configuration files (application.yaml, database migrations)
│ ├── docker-compose-*.yaml # Docker deployment configurations
│ └── build.gradle.kts # Backend build script
├── AutoDispatchApp/ # Multiplatform Client App
│ ├── composeApp/ # Shared UI and logic (commonMain, androidMain, iosMain, jvmMain, mobileMain)
│ ├── androidApp/ # Android-specific entry point
│ ├── iosApp/ # iOS-specific entry point (SwiftUI)
│ └── build.gradle.kts # Multiplatform build script
└── README.md # This file
- Auth: Secure user registration and login using JWT.
- Request Management: Creation and tracking of transport requests.
- Delivery Workflow: Core logic for automated dispatch and delivery status tracking.
- Driver & Vehicle: Management of driver profiles, vehicle assignments, and availability.
- Documents: Automated generation of invoices and reports in PDF and Excel formats.
- Statistics: Real-time monitoring and historical data analysis.
- Notifications: Integration with RabbitMQ for asynchronous task processing and notifications.
- JDK 17+ (JDK 21 recommended)
- Android SDK (for Android App)
- Xcode (for iOS App, macOS only)
- Docker & Docker Compose (for Backend/Database)
- Navigate to the API directory:
cd AutoDispatchApi - Configure your environment in
src/main/resources/application.yamlor set environment variables. - Run with Gradle:
.\gradlew.bat run(Windows) or./gradlew run(Unix). - Access Swagger UI at
http://localhost:8084/swagger-ui.
- Navigate to the App directory:
cd AutoDispatchApp - Android:
.\gradlew.bat :androidApp:assembleDebug - Desktop:
.\gradlew.bat :composeApp:run - iOS: Open
iosApp/iosApp.xcodeprojin Xcode or use the KMP plugin in IntelliJ/Android Studio.
The backend is container-ready with a multi-stage Dockerfile and several Docker Compose configurations for different environments:
docker-compose-debug.yaml: Optimized for local development and debugging.docker-compose-release.yaml: For production-like deployment with Nginx as a reverse proxy.
To start the entire stack in release mode (API, PostgreSQL, RabbitMQ, Nginx):
cd AutoDispatchApi
docker compose -f docker-compose-release.yaml up --buildTo start for debugging:
cd AutoDispatchApi
docker compose -f docker-compose-debug.yaml up --buildTo build only the API image:
cd AutoDispatchApi
docker build -t autodispatch-api .