Skip to content

rodrigope12/smart-logistics-vrp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚚 Smart Last-Mile Logistics System (VRP Optimization)

A full-stack logistics platform designed to optimize delivery routes for small-to-medium businesses. It solves the Vehicle Routing Problem (VRP) with real-world constraints (security waypoints) and features an Offline-First mobile application for drivers.

Tech Stack

🎯 Key Features

  • 📍 Intelligent Route Optimization: Uses Google OR-Tools to calculate the most efficient delivery sequence, minimizing distance and time.
  • 🛡️ Security Constraints: Implements hard constraints (e.g., Mandatory Security Checkpoints in high-risk zones like Huichapan) directly into the routing algorithm.
  • 📶 Offline-First Mobile App: React Native app capable of syncing data seamlessly. Drivers can complete deliveries and capture proof-of-delivery even without internet access.
  • 📊 Dynamic Dashboard: Real-time visualization of orders, prospects, and routes using Google Sheets as a flexible, zero-cost database.
  • 🧾 Automated Invoicing: Generates PDF receipts and WhatsApp logs automatically upon delivery completion.

🛠️ Technology Stack

Component Tech Description
Backend Python, FastAPI High-performance API handling VRP logic and data sync.
Optimization Google OR-Tools Constraint programming solver for complex routing logistics.
Mobile App React Native (Expo) Cross-platform driver application with background sync.
Database Google Sheets API Cloud-native, user-friendly database for easy client management.
Geospatial Google Maps API Places, Directions, and Distance Matrix for precise navigation.

🚀 Architecture

graph TD
    A["Mobile App (Driver)"] <-->|"Sync / Offline"| B("FastAPI Backend")
    B <-->|"Read / Write"| C["Google Sheets DB"]
    B -->|"Calculate Matrix"| D["Google Maps API"]
    B -->|"Solve VRP"| E["OR-Tools Engine"]
    
    subgraph "Optimization Engine"
    E -->|"Optimized Route"| B
    end
Loading

📦 Installation & Setup

Backend

  1. Clone the repo and navigate to root.
  2. Create a virtual environment:
    python -m venv venv
    source venv/bin/activate
  3. Install dependencies:
    pip install -r requirements.txt
  4. Setup .env file with your API Keys (Google Maps, Sheets ID).
  5. Run the server:
    uvicorn app.main:app --reload

Mobile

  1. Navigate to /mobile.
  2. Install dependencies:
    npm install
  3. Run on device/simulator:
    npx expo start

💡 About the Project

Developed as a solution to modernize logistics for local distributors (e.g., Dairy/Gas industries), focusing on UX and robustness against network failures.

About

Sistema de logística de última milla con optimización de rutas (VRP) y sincronización offline

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors