DEV Community

Manish Datta
Manish Datta

Posted on

Architecting RoutePe Auto: Building a Scalable Transport Management Software with Laravel, React, Flutter and MySQL

Modern logistics is built on time-sensitive operations, yet traditional freight procurement suffers from friction. Legacy systems depend heavily on fragmented offline negotiations, opaque spot market prices, manual Lorry Receipt (LR) tracking, and coordination gaps between warehouse controllers and field drivers.To eliminate these operational bottlenecks, RoutePe Auto was engineered as a high-throughput Transport Management Software. The platform unites real-time spot bidding, pay-per-tender corporate procurement, vehicle discovery, automated freight billing, and live multi-point tracking into a unified ecosystem.

Here is an architectural breakdown of how RoutePe Auto was designed using Laravel on the backend, React on the web frontend, a native Mobile App, and MySQL for transactional integrity. Architecture Overview ┌──────────────────────────┐
│ React Web Dashboard │
│ (Shippers / Logistics) │
└────────────┬─────────────┘

REST / WebSockets

┌──────────────────┐ ┌────────────▼─────────────┐ ┌──────────────────┐
│ Mobile App │◄────►│ Laravel API Gateway │◄────►│ MySQL Database │
│(Drivers/Fleet) │ │ & Execution Core │ │ (ACID Transactions)
└──────────────────┘ └────────────┬─────────────┘ └──────────────────┘

┌──────▼──────┐
│ Redis Queue │
└─────────────┘
The system operates across three tiers:The Web App Layer: Built with React, offering enterprise shippers a dynamic workspace to broadcast loads, review bids, manage tenders, and monitor active routes.

The Field Execution Layer:
A dedicated Mobile App for drivers and fleet operators, streaming real-time location updates, uploading electronic Proof of Delivery (ePOD) signatures, and receiving job dispatches.

The Core Engine: A robust Laravel REST API backend handling business logic, asynchronous task dispatching, document generation, and balance ledger management against a relational MySQL store.Database Design in MySQLA core requirement for any Transport Management Software is strict transactional integrity.
Financial wallet debits, bidding locks, and document allocations cannot suffer from race conditions or partial writes. MySQL was chosen for its lock handling and reliable ACID compliance.Relational Schema HighlightsSQLCREATE TABLE wallets (
id CHAR(36) PRIMARY KEY,
user_id CHAR(36) NOT NULL UNIQUE,
balance DECIMAL(12, 2) NOT NULL DEFAULT 0.00,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB;

CREATE TABLE loads (
id CHAR(36) PRIMARY KEY,
shipper_id CHAR(36) NOT NULL,
origin VARCHAR(255) NOT NULL,
destination VARCHAR(255) NOT NULL,
payload_weight DECIMAL(8,2) NOT NULL,
status ENUM('draft', 'bidding', 'assigned', 'in_transit', 'completed') DEFAULT 'draft',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
INDEX idx_shipper_status (shipper_id, status)
) ENGINE=InnoDB;

CREATE TABLE bids (
id CHAR(36) PRIMARY KEY,
load_id CHAR(36) NOT NULL,
transporter_id CHAR(36) NOT NULL,
amount DECIMAL(10, 2) NOT NULL,
status ENUM('submitted', 'accepted', 'rejected') DEFAULT 'submitted',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (load_id) REFERENCES loads(id) ON DELETE CASCADE,
INDEX idx_load_amount (load_id, amount)
) ENGINE=InnoDB;

Using indexed foreign keys and composite indexes on common query pathways (idx_shipper_status, idx_load_amount) ensures microsecond lookup times even under heavy concurrent bidding pressure.Pay-Per-Use Bidding & Wallet Micro-DeductionsInstead of charging static software subscription tiers, RoutePe Auto operates on a pay-per-use transactional wallet architecture. Shippers pay a nominal micro-fee per broadcasted load or digital tender. To process these transactions without concurrency glitches (e.g., double-spending or parallel submissions bypassing balance limits), the backend relies on row-level database locking inside atomic Laravel database transactions.

Syncing Web App and Mobile App Operations
A frequent source of latency in logistics is asynchronous communication between dispatch office managers and drivers on the road. In RoutePe Auto, the web app also syncs with the mobile app in real time. Bi-Directional State Synchronization FlowDriver Side (Mobile App): Sends GPS telemetry bursts or triggers state changes (e.g., "Arrived at Warehouse" or "ePOD Signed"). Laravel Gateway: Authenticates incoming payload via JWT, commits execution state changes to MySQL, and dispatches a Redis-backed queue event.Web Socket Broadcast: Laravel Echo and Pusher/Soketi broadcast updates immediately to channel listeners.Shipper Side (React Web App): Web sockets update the state, instantly reflecting truck coordinates and job updates on the interactive control map.

Free Live Truck Discovery & Dynamic Document GenerationTo optimize spot-market dispatching, RoutePe Auto includes a Free Live Truck Discovery engine. Open transport vehicles broadcast location metrics, allowing shippers to filter nearby drivers geographically and initiate direct dispatch calls without broker markups.

Automated Billing & Document PipelinesFreight logistics demands rapid generation of compliance documents:
Lorry Receipts (LR)

Warehouse Loading Slips

Multi-Party Invoices

When a shipment moves to in_transit, Laravel queues a background task that compiles shipment metadata, generates cryptographically signed PDFs, writes document records into MySQL, and pushes instant download links to both the web dashboard and the Mobile App.

Performance Optimizations
Query Caching for Driver Coordinates: Raw GPS ping spikes from thousands of active Mobile App instances are cached in Redis memory before batch-updating MySQL every 30 seconds. This keeps database write-IOPS stable.

Component Granular Re-rendering in React: Dashboard components utilize atomic state containers to ensure live map streams do not trigger full UI re-renders during high-volume data pushes.

Indexed MySQL Views: Dashboard aggregation metrics (e.g., active loads count, pending bids, total monthly spending) use materialized summary patterns to bypass continuous table scans.

ConclusionBuilding modern Transport Management Software requires bridging web technology with field mobility. By pairing Laravel's event routing and security features with React's fast UI components, a responsive Mobile App, and MySQL's strict data consistency, RoutePe Auto provides a unified freight execution network built for modern supply chain scale.

Top comments (0)