Directly connecting manufacturers and truck drivers β eliminating the middleman, maximising earnings, and bringing transparency to India's βΉ14 lakh crore freight industry.
Overview Β· Problem Β· Solution Β· Architecture Β· ML Layer Β· Getting Started Β· Roadmap
Truxify is an open-source, broker-free freight marketplace that connects manufacturers directly to truck drivers across India's national highway network.
India has 1.4 crore registered trucks. Most drive back empty after every delivery. Most drivers earn subsistence wages after brokers take 30β40% of every booking. Most small manufacturers still find trucks through a chain of phone calls that takes 6+ hours.
Truxify fixes all three problems simultaneously β with a platform that is open source, self-hostable, and built for the people every existing solution has ignored.
graph TD
Customer[Customer Flutter App]
Driver[Driver Flutter App]
API[Node.js + Express API]
Supabase[(Supabase)]
ML[FastAPI ML Engine]
Customer --> API
Driver --> API
API --> Supabase
API --> ML
For the complete system architecture, data flows, infrastructure layers, and service responsibilities, see:
π docs/architecture.md
Manufacturer -> Broker -> Sub-Broker -> Truck Owner -> Driver
β
πΈ πΈ πΈ π
By the time money reaches the driver, 30β40% is already gone.
| Pain Point | Who Suffers | Scale |
|---|---|---|
| 30β40% broker commission on every trip | Truck drivers | 1.4 crore trucks |
| 6+ hours to find a truck via phone chains | Manufacturers | Millions of SMEs |
| Drivers return empty after every delivery | Drivers + environment | βΉ30,000+ lost per empty trip |
| Zero live tracking once truck is moving | Manufacturers | Every single shipment |
| Payment delayed 30β60 days | Drivers | Destroys cash flow |
| Fake documents, fraud, no accountability | Both sides | Industry-wide |
BlackBuck, Vahak, Rivigo digitised the broker without eliminating them. They serve large fleet operators and MNCs. The single truck owner driving 2 trips a week has nobody. Truxify is built for that driver.
Manufacturer ββββββββββββββββββββββββββββ Driver
TRUXIFY
ML Matching Β· Secure Escrow
Voice AI Β· Live Tracking Β· n8n
| Feature | BlackBuck / Vahak | Truxify |
|---|---|---|
| Open Source | β Proprietary | β Fully open, self-hostable |
| Target user | Large fleets, MNCs | Single truck owners, small manufacturers |
| ML matching | Basic | 10-model bilateral matching + VRP |
| Deadhead elimination | Not active | Pre-trip + live mid-trip reoptimisation |
| Voice AI | None | Whisper + LLM + ElevenLabs |
| Payment | 30-day delay | Instant UPI escrow on delivery |
| Commission | Platform takes cut | Transparent, minimal, driver-first |
Truxify is built in distinct layers, each solving a specific trust or efficiency problem:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FLUTTER APPS β
β Customer App Driver App β
ββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββ
β REST + WebSockets
ββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββ
β NODE.JS + EXPRESS (Main API) β
β Auth Β· Bookings Β· Payments Β· WebSocket Server β
ββββββ¬βββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββ
β β
ββββββΌβββββ ββββββββΌβββββββ
β FASTAPI β β SUPABASE β
β ML β β PostgreSQL β
β Models β β + PostGIS β
ββββββ¬βββββ ββββββββ¬βββββββ
β β
ββββββΌβββββ ββββββββΌβββββββ
β OSRM β β MONGODB β
β Routing β β GPS Logs β
βββββββββββ βββββββββββββββ
| Layer | Technology | Purpose |
|---|---|---|
| Customer App | Flutter | Place orders, live tracking, voice AI, milestone tracker |
| Driver App | Flutter | Find loads, active trip, en-route load suggestions |
| Main API | Node.js + Express | REST API, WebSocket live tracking, orchestration |
| ML Engine | FastAPI + Python | 10 models β matching, prediction, optimisation |
| Automation | n8n (self-hosted) | Dispute pipeline, ML retraining trigger |
| Voice AI | WebRTC + Whisper + LLM + ElevenLabs | Customer shipment query assistant |
| Live Tracking | OSM + Leaflet + WebSockets | Real-time truck map inside customer app |
| Route Display | Google Maps deep link | Driver multi-stop navigation, zero API cost |
Detailed design decisions for the backend application layer β service decomposition, repository pattern, order lifecycle orchestration, validation workflow, timeline management, and notification/OTP workflow β are documented as Architecture Decision Records:
10 connected models running on FastAPI:
| # | Model | Type | Purpose |
|---|---|---|---|
| 1 | Two-Sided Bilateral Matcher | Optimisation | Pairs loads + trucks so both sides maximise gain |
| 2 | Driver Profit Predictor | Regression | Net earnings after fuel, toll, time β shown before accept |
| 3 | 3D Bin Packer + VRP | Combinatorial | Packs multi-customer loads, sequences stops |
| 4 | Behavioural Collaborative Filter | Collab Filtering | Personalises truck recommendations from past behaviour |
| 5 | Dynamic Price Forecaster | Time-Series | Fair price ranges per route using seasonal + fuel trends |
| 6 | ETA Predictor | Regression | Accurate delivery time from traffic, route type, speed history |
| 7 | Trust & Risk Scorer | Classification | Classifies drivers/customers from behavioural patterns |
| 8 | Deadhead Eliminator | Matching | Scans return loads before driver finishes current trip |
| 9 | Demand Heatmap | Forecasting | Live + 48hr forecast of high-demand zones |
| 10 | Live Mid-Trip Reoptimiser | Real-Time ML | When space opens mid-trip, instantly rescans for new loads |
Retraining: Weekly batch via n8n trigger β validated against accuracy benchmark β auto-rollback if worse. Cold start: Synthetic realistic booking data. Inference: Milliseconds (models loaded in memory).
Two critical n8n workflows:
Dispute Resolution β Unconfirmed delivery triggers auto-flag β escrow payment frozen β GPS trail + OTP logs packaged as evidence β both parties notified β unresolved in 24h escalates to arbitration β resolution releases funds accordingly.
ML Retraining β Weekly data volume check β threshold met triggers Python training pipeline β new model accuracy validated β better model deployed, worse auto-rolled back β team notified with performance report.
Customer speaks naturally β no app navigation needed:
| Query | Response |
|---|---|
| "Where is my package?" | Fetches live GPS β speaks current location + road name |
| "When will it reach?" | Pulls ETA predictor β speaks estimated arrival |
| "Is my payment released?" | Checks payment state β confirms or explains hold |
Stack: WebRTC (free, no Twilio) β Whisper β LLM β ElevenLabs
One of Truxify's most powerful features:
| Scenario | Outcome |
|---|---|
| Cancel before driver starts | Full refund released back |
| Cancel after driver en route | ML calculates distance covered β proportional penalty |
| Change drop location | New route + cost β cost adjusts β auto call to driver |
| Drop change frees space | ML instantly finds new loads to fill truck |
| Driver cancels | Trust score penalised β ML finds replacement instantly |
| Screen | Purpose |
|---|---|
| Home | Active shipments, quick stats, recent routes, book CTA |
| Find Trucks | ML-powered search with dimensions, goods type, price estimate |
| Truck Results | Matched trucks ranked by ML β price, ETA, rating, space |
| Orders | Active orders with milestone tracker, history |
| Live Tracking | OSM map, moving truck marker, Voice AI, call driver |
| Order Detail | Timeline, price breakdown, digital receipt, rebook |
| Profile | Stats, payment, documents, language, settings |
| Screen | Purpose |
|---|---|
| Home | Current trip status, today's earnings, demand heatmap |
| Active Trip | Route, stops, delivery OTPs, open Google Maps |
| Available Loads | Browse loads matching route, profit shown upfront |
| En-Route Loads | ML suggestions for loads pickable along current route |
| Past Trips | History, earnings breakdown, driver rating |
| Profile | Truck details, documents, availability toggle |
| Layer | Technology |
|---|---|
| Mobile Apps | Flutter |
| Auth + Push | Firebase Auth + FCM |
| Main API | Node.js + Express |
| ML Inference | FastAPI + scikit-learn + PyTorch |
| Primary DB | PostgreSQL + PostGIS (Supabase) |
| GPS + Event Logs | MongoDB Atlas |
| Cache | Upstash Redis |
| Automation | n8n (self-hosted) |
| Voice AI | WebRTC + Whisper + LLM + ElevenLabs |
| Live Map | OSM + Leaflet.js |
| Route Engine | OSRM + OpenStreetMap |
| Document Verification | Digilocker API |
| Storage / CDN | Cloudflare R2 + CDN |
| Monitoring | Sentry |
| Hosting | Render + UptimeRobot |
| CI/CD | GitHub Actions |
| Feature | Solution | Cost |
|---|---|---|
| Customer live tracking | OSM + Leaflet inside app (WebSockets) | Free |
| Driver navigation | Google Maps deep link (pre-planned by ML) | Free |
| ML route calculation | OSRM + OpenStreetMap (self-hosted) | Free |
Having problems with local setup or development?
π Read the Local Development Troubleshooting Guide
Note: Truxify is in active development (Phase 2). The core platform features are the current focus.
- Flutter SDK
>= 3.19.0 - Node.js
>= 20.x(LTS) - Python
>= 3.11.x - Docker Engine and Docker Compose
- Git
These versions match the contributor setup requirements in CONTRIBUTING.md.
git clone https://github.com/KanishJebaMathewM/Truxify.git
cd Truxify/apps/customer # or Truxify/apps/driver
flutter pub get
flutter runcp .env.example .env
docker compose up --buildThe Compose stack overrides the cloud MongoDB and Redis placeholders from .env inside the API container:
MONGODB_URI=mongodb://mongo:27017
MONGODB_DB_NAME=truxify_telemetry
REDIS_URL=redis://redis:6379This lets the backend use the local mongo and redis services without editing .env away from production-style values.
The backend lives in backend/api. Use the following steps to set it up locally:
cd backend/api
npm install
cp .env.example .env
npm run devnpm run devstarts the backend in development mode with auto-reload.npm startstarts the production server.npm testruns the backend test suite.
Run the test suite for the component you changed before opening a pull request. From the repository root:
cd backend/api
npm testcd apps/customer
flutter pub get
flutter analyze
flutter testcd apps/driver
flutter pub get
flutter analyze
flutter testcd backend/ml
pip install -r requirements.txt
python -m pytest tests/ -vFor CI-reproducible lint checks, see the linting commands in CONTRIBUTING.md.
The backend uses backend/api/.env.example as the template for local configuration. Copy it to .env before running the service and fill in the required values for your environment.
This project may require configuration for Supabase, PostgreSQL, MongoDB, Redis, Firebase, and routing services. Keep sensitive values such as API keys, private keys, and service account JSON out of version control.
Do not commit secrets to the repository. Treat .env as a local-only file and update .env.example when new configuration values are needed for onboarding.
Run the full local stack with:
docker compose up --buildThis starts the following services:
| Service | Description |
|---|---|
| api | Backend API running from backend/api on port 5000 |
| db | PostgreSQL/PostGIS database on port 5432 |
| mongo | MongoDB event/log storage on port 27017 |
| redis | Redis cache on port 6379 |
The api container is configured to use the local db, mongo, and redis services so you can work with a complete development environment without connecting to external infrastructure.
Once the stack is running, you can reach the local services here:
- API: http://localhost:5000
- PostgreSQL: localhost:5432
- MongoDB: localhost:27017
- Redis: localhost:6379
- Verify that
backend/api/.envexists before starting the backend or Docker Compose services. - Run the component-specific tests documented above before opening a pull request.
- Prefer Docker Compose when you want the full local development environment with API, PostgreSQL/PostGIS, MongoDB, and Redis together.
| Metric | With Brokers | With Truxify |
|---|---|---|
| Driver earnings | 60β70% of freight value | 90β95% of freight value |
| Time to find truck | 4β6 hours | Under 2 minutes |
| Empty return trips | ~40% of all trips | Near zero |
| Payment delay | 30β60 days | Instant on delivery |
| Document fraud | Rampant | Digilocker-verified |
| Supply chain visibility | Zero | Full real-time tracking |
- Customer app frontend (Flutter)
- Driver app frontend (Flutter)
- Backend API skeleton (Node.js)
- Database schema design
- User authentication (Firebase)
- Load posting and bidding
- Basic ML matching
- Live tracking (WebSockets + OSM)
- Full 10-model ML pipeline
- FastAPI inference service
- Dynamic pricing
- Deadhead elimination
- Polygon smart contracts
- UPI escrow integration
- Digilocker document verification
- On-chain reputation
- n8n dispute pipeline
- ML retraining trigger
- Voice AI integration
- Multi-language support (English, Hindi, Tamil)
- Security audit
- Load testing
- Open source deployment guide
- State government partnership pilot
Truxify welcomes contributors of all skill levels. See CONTRIBUTING.md for guidelines.
# Fork β Clone β Branch β Commit β PR
git checkout -b feature/your-feature-name
git commit -m "feat: add profit predictor model"
git push origin feature/your-feature-nameThanks to all contributors β€οΈ
MIT License β Truxify is intentionally open source so any state transport department, NGO, or logistics cooperative can self-host it for free.
Built with β€οΈ for India's 1.4 crore truck drivers
β Star this repo if you believe freight should be fair