A state-of-the-art, role-governed ecosystem designed to command, track, and analyze modern logistics operations in real-time.
Version React Node.js PostgreSQL Prisma
FleetFlow modernizes the way businesses track vehicles, handle complex delivery workflows, monitor volatile expenses, and command dispatching logic. With a completely custom-built architecture boasting live bidirectional web socket events, predictive AI fuel analytics, and a flawlessly segmented role-based UX, FleetFlow brings clarity to the chaos of the road.
Secure, isolated operations with custom dashboards tailored to exactly what each employee needs to see:
- 🧑💼 Manager: Executive KPI dashboard, user lifecycle control, macro financial reports, fuel anomaly clearance, and God-view live map.
- 🎧 Dispatcher: High-velocity interface for dispatching assets, mapping trips, and manually verifying drivers' proofs of delivery.
- 👷 Safety Officer: Workflow gatekeeper. Mandates specific vehicle compliance & driver vetting checkpoints before approving any trips for dispatch.
- 🚚 Driver: A bespoke Mobile-First portal. Receive push-trips, capture E-Signatures, upload photographic proof of delivery, log route expenses instantly, and trigger one-touch SOS alerts.
- 📈 Financial Analyst: Complete statistical visibility. Tracks granular ROI by vehicle, monitors maintenance spends, and exports operational cost data.
Every drop counts. FleetFlow calculates every vehicle's expected fuel consumption against its strict factory baseline (Km/L). If a driver logs fuel that exceeds the mathematical expectation by >15%, the system throws a silent alarm, auto-generating a FuelAnomaly record and flashing a webhook priority alert exclusively to the Manager Dashboard for review.
Say goodbye to the refresh button.
- 🏎️ Live Trip Toggles: Watch a trip swap from
DRAFTtoAPPROVEDtoON_TRIPon your dispatch board the precise second a driver processes it. - 🚨 SOS Overrides: When a driver triggers an SOS, emergency broadcast sockets push live GPS coordinates across the entire Manager grid instantly.
- 📦 Delivery Verifications: Dispatchers are pinged in real-time when a driver submits photographic proof and a client E-Signature.
Built-in EmailJS mechanics. The exact moment a Manager provisions a new staff member's account, the system auto-generates a secure, temporary password and inherently maps all routing variables, securely emailing the login dossier directly to the employee.
Frontend Architecture: React (Vite), Framer Motion (Fluid 60fps animations), Lucide React (Vectors), Recharts (SVG Analytics), Axios, Socket.IO-client.
Backend Architecture: Node.js, Express.js REST API, Socket.IO (Live PubSub events).
Database & Structuring: PostgreSQL, Prisma ORM (Type-safe migrations and seeding).
Security Layers: Bcrypt (Deep hashing), strict JSON Web Tokens (JWT), Custom Express Pipeline RBAC Middleware guards.
Ensure a PostgreSQL instance is running on your machine. Create your backend/.env file:
PORT=5000 DATABASE_URL="postgres://user:password@localhost:5432/fleetflow" JWT_SECRET="generate_a_strong_secret_key"
cd backend npm install npx prisma generate npx prisma migrate dev # Generates the test schema + default users + base analytics: npm run seed npm start
Create your frontend/.env variables (e.g. VITE_API_URL=http://localhost:5000/api).
cd frontend
npm install
npm run devIf you successfully executed the npm run seed command, your database is locked and loaded with active trips, varied vehicle classes, expense logs, and 4 core administrative accounts perfect for verifying the RBAC systems.
| Role | Login Email | Universal Access Password |
|---|---|---|
| Manager | manager@fleet.com |
manager123 |
| Dispatcher | dispatcher@fleet.com |
dispatch123 |
| Safety Officer | safety@fleet.com |
safety123 |
| Financial Analyst | analyst@fleet.com |
analyst123 |
(💡 Pro Tip: Look for the active Driver entities established by the seed data if you wish to mock mobile-first endpoints on the frontend!)