All work

Clover Cars, a London private-hire operator that holds council transport contracts. 2023

Council transport routes, put out to bid among vetted drivers

Clover Cars, a London private-hire firm, gives its council transport routes to self-employed drivers and passenger assistants. I was the main feature developer on its Laravel portal: admins build a route from postcodes, drivers bid once all their compliance documents are on file, and the winner gets a text in one click.

Documents on file before a driver can bid
7
Most bids a driver can place on a route
3
Versions of the bidding rule, May to October 2023
5

How the route bidding works

The problem

Council routes to hand out, and drivers to vet

The firm runs passenger transport for local councils and gives each route to a self-employed driver, sometimes with a passenger assistant on board. Every driver needs their compliance documents on file first. The portal gives the firm one place to post routes, collect bids and tell the winner.

Step one

A route, built from postcodes

I built the route builder. An admin enters a pickup, any number of via stops and a drop-off by postcode, and Calculate mileage sends each leg to the Google Distance Matrix API. The total is the sum of the legs, and the admin can still correct it by hand. A route also carries a vehicle type, a price band, an expiry time, start and end dates, a contact and the council’s terms.

Step two

No documents, no bid

I wrote the bidding rules on the server. A driver can’t bid until all 7 required documents are uploaded: PCO licences, MOT, insurance, DBS, driving licence and V5. A bid has to sit inside the route’s price band, each driver gets at most 3 bids on a route, and drivers see only their own bids and their position. A driver can name a passenger assistant, picked from those who applied to that route.

Step three

The winner hears by text

Admins see every bid, lowest first. I made telling the winner one click: Notify driver sends a TextMagic SMS, with the UK number put into +44 form, and records the time and the result on the bid. The driver and the admins get an in-app alert, and if the SMS fails, admins get one asking them to check the number. A separate console command queues one email per driver about the routes added in the last day.

Over the project

Five versions of the bidding rule, May to October 2023

How bids work changed with the client as the project went on: lower bids only in May 2023, then a minimum price in June, a cap of 3 bids per route in July, higher bids only in August and, from October, the price band. I kept the bidding rules in one service class, and each change was made there.

A teammate built the deploy pipeline and the browser tests, and later refactored the routes list I had built. A certificate check for passenger assistants was the last thing written, and it stayed on the development branch.

How it fits together

One route, start to finish

  1. AdminBuilds the routeFrom postcodes, with miles per leg, a price band and an expiry time
  2. Passenger assistantAppliesTo live routes that need an assistant
  3. DriverBidsOnly with all 7 documents on file, inside the band and up to 3 times, optionally naming an assistant who applied
  4. AdminCompares the bidsEvery bid on the route, lowest first
  5. AdminNotifies the winnerAn SMS, a record on the bid and in-app alerts

What each role sees

Admin

Routes list
Every live route
Price on a route
The latest bid
Bids
Every bid, lowest first
Can
Build routes and notify winners

Driver

Routes list
Every live route
Price on a route
The starting price
Bids
Only their own, with their position
Can
Bid up to 3 times a route, once all 7 documents are in

Passenger assistant

Routes list
Live routes that need an assistant
Price on a route
The assistant’s fee
Bids
Those where a driver named them
Can
Apply to a route, or withdraw

The work

Client
Clover Cars, a London private-hire operator with council passenger-transport contracts
Role
Main feature developer, April to November 2023
My part
The route builder, bidding rules, document gate, assistant pairing, SMS alerts and the first routes list. A teammate built the deploys and browser tests.
  • Laravel
  • PHP
  • MySQL
  • jQuery
  • Bootstrap
  • Google Distance Matrix
  • TextMagic