Smart fleet. Real-time control.
A multi-tenant transport management platform for truck fleets: vehicles, drivers, customers, shipments and trips with a lifecycle the software enforces rather than trusts, a drag-and-drop dispatch board, a live-tracking feed, and the whole upkeep side — fuel, maintenance, workshop jobs, tyres and parts. Built on a NestJS API and a Next.js console over PostgreSQL and PostGIS, with tenant isolation enforced at four layers so one company's data cannot reach another's. Thirty-six API modules are in — including a finance tier where every invoice, payment, expense and payroll run posts a balanced double-entry journal, a driver app and customer portal, public tracking, and a command centre with analytics and a plain-language assistant. Route planning was the last placeholder in the console and it is now in, alongside circular geofences matched by haversine, single-sign-on through Plutox ID, and three shells — a .NET desktop window for the office and driver and owner apps for background GPS and push — that wrap the same console rather than reimplementing it.
Built for Trucking companies, logistics operators and freight brokers running their own fleets — from a dozen trucks to several hundred across branches
- 68
- Prisma models
- 195
- API endpoints
- 38
- API modules
- 8 / 8
- Phases shipped
- 45
- Capabilities

Dashboard
Utilisation, 30-day trip trend and six-month revenue
At a glance
- Multi-tenant by design — tenant isolation enforced at four layers
- Trip lifecycle validated against a transition map, not trusted
- Conflict detection dry-runs an assignment before it is committed
- Driver assignment over a time window, so history survives reassignment
- Shipment totals derived from cargo lines, never typed twice
- 190 granular permissions across 15 groups and nine seeded roles
- A drag-and-drop dispatch board that refuses to double-book a truck
- Fuel, maintenance, workshop, tyres and parts, all against the vehicle
- Double-entry accounting where debits equal credits, enforced three ways
- A driver app with proof of delivery, and public tracking with no login
- A command centre and a plain-language assistant over live data
- Postgres row-level security, verified across 59 tables, not just described
- Overdue is derived from today's date, never stored and never stale
- Per-tenant numbering that survives two concurrent dispatchers
- Vendor kill switch that revokes every live session for a company
Every module, in detail
45 capabilities across 7 areas
Operations6
- Vehicles
- Full records with plan-limit enforcement, a status lifecycle that refuses to move a truck mid-trip, soft delete that releases the driver and blocks while trips are open, and a per-vehicle count of documents expiring inside 30 days.
- Drivers
- Assignment to a truck over a time window rather than a foreign key, so "who was driving on the 14th" survives every later reassignment. One primary driver per truck, enforced by a partial unique index, and expired licences surfaced on the list.
- Customers
- Contacts, credit limit and payment terms, with deletion blocked while shipments are in progress.
- Shipments
- Cargo lines with concurrency-safe numbering and an opaque public tracking code minted at creation. Header weight and value are derived from the lines — a header that disagrees with its items is the classic source of billing disputes.
- Trips
- Stops, shipment links, rate and advance, with an append-only event timeline. Every status move is applied with its side effects in one transaction: the truck, the driver, every shipment on board and the timeline entry all move, or none do.
- Conflict detection
- Dry-runs an assignment and reports overlapping trips, unavailable trucks, drivers on leave and licences expiring mid-trip. Conflicts block assignment unless an override reason is supplied — and the reason is recorded.
Dispatch, tracking & upkeep8
- Dispatch board
- Trips laid out in lanes — needs a truck, scheduled, at pickup, in transit — with trucks and drivers down the side. Drag one onto a trip, or select the trip and use the assign buttons, which keeps the whole board usable from the keyboard.
- Live tracking
- Position, speed, heading and staleness per truck, with a 15-minute silence threshold and filters for moving, idle and stale. The table is the feed the map draws from, so it stays useful before a Mapbox token is configured.
- Fuel
- Fill-ups logged against the vehicle and the trip, so consumption is measurable per truck rather than as one monthly invoice.
- Maintenance
- Service schedules and jobs by vehicle, tracked against odometer and date so a due service surfaces before it becomes a breakdown.
- Workshop
- Job cards through the workshop — what is in, what it needs, who is on it and what it cost.
- Tyres
- Tyre history per axle position, with a partial unique index enforcing one tyre per position so a fitting cannot be recorded twice.
- Parts inventory
- Stock levels for parts and consumables with reorder points, drawn down by workshop jobs rather than counted separately.
- Running costs
- Cost per kilometre assembled from fuel, maintenance, tyres and trip expenses — the figure that decides whether a rate is worth accepting.
Finance & accounting6
- Invoices
- Raised against trips, with tax credited to a liability rather than revenue — the carrier collects it for the state, and booking it as income overstates earnings and understates what is owed at filing. Overdue is derived from today's date, so it is never stale.
- Payments
- Receipts allocated against invoices without touching revenue, which was recognised when the invoice issued. Crediting it again on receipt is the double-count that reports twice the income.
- Expenses
- Costs booked against a trip, a vehicle or the business, feeding both the P&L and the per-kilometre running cost.
- Payroll
- Runs that expense the gross and treat an advance as money owed back rather than salary, so the same rupee is not billed twice. Recovery is capped at a share of gross — clawing back a whole balance in one run is arithmetically correct and operationally ruinous.
- Double-entry ledger
- Every financial act posts a balanced journal, enforced three deliberately overlapping ways: a check that refuses an unbalanced draft with a named rule, posting inside the caller's transaction because the constraint is deferred to commit, and a database trigger that makes an unbalanced journal impossible even from psql.
- Accounting reports
- Trial balance, profit and loss, and receivables ageing — checkable precisely because the ledger balances, so a wrong figure is a posting rule to fix rather than a number nobody can trace.
Outside the office5
- Driver app
- A driver's own trips on their phone, with status updates and proof of delivery captured where the handover actually happens rather than re-keyed at the depot that evening.
- Customer portal
- A customer signs in and sees their own shipments, documents and invoices — which removes the phone call that was previously the only way to answer "where is my load".
- Public tracking
- An opaque code minted at shipment creation opens a tracking page with no login at all, and an invalid code says so plainly rather than leaking whether it ever existed.
- Proof of delivery
- Signature and photo captured against the stop, attached to the trip and visible to the customer through the portal.
- SOS
- A driver-side panic path that reaches the operator immediately, because a truck in trouble cannot wait for the next status poll.
Analytics & command centre5
- Command centre
- The whole operation on one screen — trips in flight, exceptions, and what needs a decision now, rather than five tabs an operator has to correlate by hand.
- Analytics
- Utilisation, cost and margin sliced by vehicle, driver, customer and lane, so an unprofitable lane is visible before the quarter closes.
- Reports
- Operational and financial reports over the same figures the dashboard shows, exportable rather than screenshotted.
- Assistant
- Ask the fleet a question in plain words and get an answer drawn from live data, which is a shorter path than knowing which report holds it.
- Alerts & notifications
- Licences, vehicle documents and services falling due, surfaced before they expire rather than discovered at a checkpoint.
Platform & tenancy6
- Multi-tenancy
- Four enforcement layers: the tenant comes from the signed JWT only, AsyncLocalStorage carries it through the request, and a Prisma extension injects it into every read, stamps it on every write and throws if a scoped query runs without one. The scoped-model set is derived from the schema at boot, so a model added later is protected the day it exists.
- Authentication
- Registration with automatic tenant provisioning, argon2id hashing, rotating refresh tokens with family-wide revocation on reuse, TOTP two-factor with single-use recovery codes, phone OTP for drivers, and rate limits on every credential endpoint.
- RBAC
- 190 permissions in 15 groups across nine seeded roles, with wildcard expansion, a global guard and cache-backed resolution — so a revoked role takes effect immediately rather than when the token expires.
- Platform console
- The vendor's own account: suspend a company to revoke every live session and block both sign-in and tenant switching, reactivate, extend the period after payment, change plan, or enter a company through the audited switch-tenant path.
- Branches & users
- Multiple branches per company, user management, invitations and per-branch scoping.
- Audit log
- Append-only at the database level via a trigger, so history cannot be quietly rewritten from the application tier.
Data & integrity9
- Schema
- 68 Prisma models covering all eight phases, so later features slot into a schema that already anticipated them instead of forcing a migration of live data.
- Constraints Prisma cannot express
- A hand-authored SQL layer: check constraints (a geofence is a circle or a polygon, never both; a ledger line is a debit or a credit), partial unique indexes, and a deferred constraint trigger asserting that every journal balances.
- Row-level security
- The fourth tenancy layer, applied to every table carrying a tenantId and derived from the system catalogue rather than a hand-kept list — one forgotten entry would leave a table unprotected with nothing looking wrong. The API connects as the table owner, so behaviour is unchanged; what it stops is every other route in, psql and BI tools included, which see nothing until they declare a tenant. Verified across 59 tables rather than asserted.
- Boot guard
- The API refuses to start in production while any placeholder secret survives, and refuses if the two JWT secrets match — sharing one lets a stolen access token be replayed as a refresh token, turning a 15-minute exposure into a 30-day one. A warning in a log is not a control.
- CI & verified backups
- Typecheck, tests, lint and build on every push, then a real Postgres, migrate, seed, verify RLS and seven live smoke suites — because every defect this project has actually shipped was invisible to a typechecker. Backups run dump, restore and verify, the last restoring into a scratch database and counting rows, since an untested backup is a hope.
- Spatial & search indexes
- PostGIS geography columns with GiST indexes for tracking, BRIN indexes for time-series telemetry, and trigram indexes so search stays fast as the tables grow.
- Numbering
- A per-tenant sequence incremented by one atomic upsert, allocated inside the creating transaction. MAX(number) + 1 races under two concurrent dispatchers, and a unique violation on trip creation is a terrible way to find out.
- Shared contracts
- The permission catalogue, role definitions, status enums, the legal trip-transition map, the GPS packet contract and the Zod schemas all live in one package used by API and console alike, so a status string cannot drift between tiers.
- Dashboard
- Real fleet, driver, trip and shipment tallies, month-to-date revenue, expenses and profit, on-time delivery over 30 days, a daily trip trend and a six-month revenue series.
Delivery roadmap
8 of 8 shipped
- Phase 1
Foundation
Monorepo, 68-model schema, authentication, multi-tenancy, RBAC, the design system and the app shell.
- Phase 2
Operational core
Vehicles, drivers, customers, shipments, trips with an enforced lifecycle, and a dashboard on real tenant data.
- Phase 3
Dispatch & live tracking
Dispatch board, live-tracking feed, circular geofences with crossing detection, alerting and route planning with named lanes — all in.
- Phase 4
Fleet upkeep
Fuel, maintenance schedules, workshop job cards, tyre positions and parts inventory — all five in, each tied to the vehicle rather than kept in a separate book.
- Phase 5
Finance
Invoices, payments, expenses, payroll and a double-entry ledger, all in — debits equal to credits, enforced at the service, in the transaction and by the database.
- Phase 6
Portals & driver app
Driver app with proof of delivery and SOS, a customer portal, and public tracking on an opaque code — all in.
- Phase 7
Analytics & command centre
Command centre, analytics, reports, notifications and a plain-language assistant over live data — all in.
- Phase 8
Hardening & launch
Row-level security applied as the fourth tenancy layer and verified across 59 tables, a boot guard that refuses to start on placeholder secrets, CI that runs seven live smoke suites against a real Postgres, and backups whose restore is actually verified. The load test and a containerised deploy are the two items still outstanding.
Languages
- TypeScript
- TSX
- SQL
- CSS
Built with
- TypeScript
- NestJS
- Next.js 15
- Prisma
- PostgreSQL 16
- PostGIS
- Redis
- Docker
Packages & pricing
3 plans
Billed monthly per company. Limits are enforced server-side, so a plan is a real ceiling rather than a suggestion.
Starter
PKR 15,000/ month
15 vehicles · 10 users · 1 branch
- Trips, tracking, fuel and maintenance
- 30 days of GPS retention
- One branch
Growth
most takenPKR 55,000/ month
100 vehicles · 50 users · 5 branches
- Everything in Starter
- Workshop, parts inventory and the finance tier
- Customer portal
- 90 days of GPS retention
Enterprise
PKR 180,000/ month
Effectively uncapped · 500 branches
- Everything in Growth
- AI-assisted dispatch and the command centre
- API access and white-labelling
- 365 days of GPS retention
Prices are what Fleet Flow bills today and exclude hardware, on-site installation and data migration — those are quoted per outlet once we know what you already have.
Want Fleet Flow running in your transport & logistics?
Tell us how you trade today and we will tell you which package fits, what the hardware costs and how long the rollout takes — before you commit to anything.


