Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CargoFlow Stark MVP

CargoFlow is a complete Minimum Viable Product (MVP) logistics platform designed for cargo transportation. The system consists of two Android applications (for Clients and Drivers) and a unified FastAPI backend, providing a seamless experience for managing freight orders, tracking, and communication.

Features

  • Dual Android Applications: Native Android apps built with Kotlin and Jetpack Compose for both Clients (cargo owners) and Drivers (carriers).
  • FastAPI Backend: A robust Python backend handling authentication, order management, status tracking, and real-time messaging.
  • Order Lifecycle Management: Complete status machine for shipments (Confirmed → Driver to Pickup → At Pickup → Cargo Loaded → In Transit → At Destination → Delivered).
  • Driver Offers System: Drivers can view available orders and submit competitive price/ETA offers.
  • Real-time Chat: Integrated messaging system between clients and drivers for specific orders.
  • Incident Reporting: Mechanism for drivers to report incidents or issues during transit.
  • Sandbox Provider Architecture: Modular adapter pattern for SMS, Payments, Maps, Push Notifications, Storage, KYC, and Insurance, allowing easy switching between local sandbox and production providers.
  • Modern UI/UX: Material 3 design system with glass-morphism effects and holographic backgrounds.

Architecture

The project is structured as a multi-module Android project sharing a core module, connected to a Python backend.

Component Technology Stack Description
Client App Kotlin, Jetpack Compose Android application for cargo owners to create orders, review offers, and track shipments.
Driver App Kotlin, Jetpack Compose Android application for carriers to view orders, submit offers, update statuses, and communicate with clients.
Core Module Kotlin Shared module containing UI components, API client, themes, and animations used by both apps.
Backend Python, FastAPI, SQLite RESTful API handling business logic, database operations, and notifications.

Installation & Setup

Prerequisites

  • Android Studio (latest version recommended)
  • JDK 17
  • Android SDK 35 and Build Tools 35.0.0
  • Python 3.x (for the backend)
  • A physical Android device or emulator for testing

Quick Start (Windows)

The project includes batch scripts to automate the setup process. Ensure your Android device is connected via USB with USB debugging enabled.

  1. Extract the repository to your local machine.
  2. Open the root folder in your preferred IDE (e.g., VS Code or Android Studio).
  3. Run the main launcher script:
    .\START_ALL.bat
    This script will check dependencies, start the FastAPI backend, configure ADB reverse port forwarding, build both APKs, install them on the connected device, and launch the Client application.

Manual Setup

  1. Start the Backend:

    .\START_BACKEND.bat

    The backend will be accessible at http://127.0.0.1:8000 (Swagger UI at /docs).

  2. Build the Applications:

    .\BUILD_BOTH.bat

    APKs will be generated in the respective build/outputs/apk/debug/ directories.

  3. Install & Run: Use ADB to install the generated APKs on your device or emulator.

Sandbox Testing

The system operates in a local sandbox mode by default (configured via .env).

  • Payment: Use the sandbox card 4242 4242 4242 4242.
  • SMS/Maps/Push: Handled by deterministic local mock implementations.

Tech Stack

  • Android: Kotlin 2.0.21, Jetpack Compose, Material 3, Coroutines
  • Backend: Python, FastAPI, SQLite, Pydantic
  • Build System: Gradle (Kotlin DSL), AGP 8.7.3

Security Considerations for Production

Before public launch, the following security measures must be implemented:

  • Replace demo authentication with OTP and refresh tokens.
  • Hash and rotate tokens; move secrets to secure storage.
  • Implement PostgreSQL migrations and transaction boundaries.
  • Configure HTTPS, reverse proxy, CORS allowlist, and rate limits.
  • Add payment webhooks with signature verification.
  • Implement audit logs, RBAC, and an admin console.

License

This project is licensed under the MIT License.

About

Complete MVP logistics platform for cargo transportation with Client/Driver Android apps and FastAPI backend

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages