Build guide
Building your own taxi dispatch system, step by step
In short
A taxi dispatch system is three products on one live back end: a dispatcher console, a driver app and a passenger app. The hard parts are real-time job state, server-side fares and location policy. A focused senior team can ship a usable first version in roughly 14-20 weeks.
Who this is for
Founders and operators who run a cab or private-hire business and are weighing a custom dispatch build against renting a SaaS.
What the product has to do
- Dispatcher consoleA web app with a job editor, live map, job queue and board, so staff can create, assign and re-assign jobs in seconds.
- Driver appReceives job offers, shows the queue, runs a live taximeter and lets the driver talk to the passenger or office.
- Passenger appBooks a ride, shows the car on a map and keeps the passenger informed until pickup and drop-off.
- Live state layerPushes every change to the console and the apps over sockets so nobody works from a stale screen.
- Pricing and commission engineCalculates fares and driver commission on the server in one code path, so no client can invent a price.
- Scheduler and background jobsHandles recurring and pre-booked trips, reports and notifications outside the request cycle.
- Fleet and tenant administrationDrivers, vehicles, tariffs, users and roles, kept separate for each company if you serve more than one.
- Billing and paymentsCard payments for rides and, if you sell the system as a product, subscriptions for each company.
- Monitoring and operationsError reporting, health checks and tested backups, because a dispatch system that is down stops a business.
The stack, and why
| Layer | Choice | Why |
|---|---|---|
| API | Node.js with AdonisJS 6 and TypeScript, Lucid ORM, VineJS validation | One typed language across the server and portal, with validation and migrations built in. |
| Database | MariaDB | Relational data suits jobs, drivers, vehicles and tariffs, and the team already ran it in production. |
| Jobs and cache | Redis with BullMQ | Retries, schedules and delayed work stay out of the request path. |
| Live updates | Socket.IO | Keeps dispatchers and drivers looking at the same state. |
| Dispatcher portal | Next.js and React, shadcn/ui, TanStack Query, Google Maps | A dense, data-heavy console that needs fast tables, forms and a map. |
| Mobile apps | Flutter with BLoC and Cubit, get_it, Dio, go_router | One codebase per app for Android and iOS, with predictable state handling. |
| Voice calls | WebRTC with CallKit on iOS | In-app calls between driver and passenger without exposing phone numbers. |
| Hosting | Ubuntu servers with nginx, PM2, Docker and Redis | Predictable running cost and full control. Today I would still start here for a small fleet, and move to managed containers once several fleets depend on it. |
What ships first, and what waits
Version one
- Dispatcher console with job creation, assignment and a live map
- Driver app with offers, accept and reject, and job status steps
- Server-side fares from a single tariff model
- Roles for dispatcher, driver and admin
- Error reporting and a tested backup routine
Later
- Passenger app with live tracking
- In-app voice calls
- Pre-booked and recurring trips
- Multiple companies on one installation, with billing
- Multiple interface languages
Build order and timeline
- 1-2 weeksDiscovery and data modelJob lifecycle, tariff rules, roles and an agreed first-release scope.
- 5-7 weeksBack end and consoleAPI, live state, dispatcher console and fare engine working against test data.
- 4-6 weeksDriver appOffers, job steps and meter, tested on real devices with real GPS.
- 2-3 weeksPilot with real dispatchersA small live fleet, with fixes from real use and monitoring in place.
- 3-5 weeksPassenger app and store releaseBooking and tracking app submitted to the stores.
Want a number for your own scope? The app cost calculator turns platforms and features into an estimate.
Rules you cannot skip
- Location in the driver app
Google Play allows background location only when it is core to the app, and requires an in-app disclosure before the permission prompt plus a declaration in Play Console. Request the narrowest access you can; a driver app that tracks only while on shift usually fits this.
Official source - Location on iOS
Apple requires location use to be directly relevant to the app's features, with clear user consent and a stated purpose.
Official source - Paying for rides inside the apps
Google Play lists transportation among services that should not use Google Play billing, and Apple says services consumed outside the app use other payment methods such as cards.
Official source - Personal data of drivers and passengers
If you handle personal data of people in the EU, the GDPR principles of purpose limitation, data minimisation and storage limitation apply. Keep trip history only as long as you can justify.
Official source
Where these projects go wrong
- Prices calculated on the phone
If fare logic lives in an app, it can be tampered with or drift between versions. TaxiDex works fares and commission out on the server in one code path.
- Stale screens during a busy shift
Dispatch fails quietly when the console and the driver app disagree about a job. Design the live state layer first, not as an add-on.
- Over-collecting location
Tracking drivers off shift is a privacy and store-review problem. Track only while a driver is available or on a job.
- Running it yourself without discipline
Self-hosting is cheap but needs backups before every production change, health checks and error reporting. Without them one bad deploy stops the fleet.
- Building a SaaS when you need a tool
Multi-tenancy, billing and onboarding add real scope. If you run one fleet, leave them out of version one.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Found a mistake? Tell me.
Problems you will meet on this stack
The "middleware" file convention is deprecatedUpgrading to Next.js 16: middleware becomes proxy, and the other things that breakWould you like to use the recommended Next.js defaults?create-next-app keeps creating a TypeScript projectError: EACCES: permission denied, mkdir '/usr/app/node_modules/.cache'EACCES permission denied when a container creates node_modules/.cachesh: next: not foundThe Next.js container starts with docker run but Compose fails with next: not foundError: connect ECONNREFUSED 127.0.0.1:3306Node.js in Docker Compose cannot reach MySQL on 127.0.0.1:3306Unable to resolve path to module 'react'. import/no-unresolvedESLint says it cannot resolve a path to a module that does exist