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.
- 📍 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.
| 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. |
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
- Clone the repo and navigate to root.
- Create a virtual environment:
python -m venv venv source venv/bin/activate - Install dependencies:
pip install -r requirements.txt
- Setup
.envfile with your API Keys (Google Maps, Sheets ID). - Run the server:
uvicorn app.main:app --reload
- Navigate to
/mobile. - Install dependencies:
npm install
- Run on device/simulator:
npx expo start
Developed as a solution to modernize logistics for local distributors (e.g., Dairy/Gas industries), focusing on UX and robustness against network failures.