The starting point
New freight offers appear on several load boards, and the brokerage works them under several accounts. The same offer often shows up on more than one board or account at the same moment, and an offer is only useful with a contact to call. Each one had to reach the brokerage's own load platform once, and stay current there while it was still open.
What we were responsible for
We designed and built the automation end to end: the supervisor, one adapter per load board, the coordination between accounts, the control dashboard and the hand-off to the brokerage's load platform.
What we built
-
One process per account
A supervisor starts a separate browser process for every enabled account, so a crash takes down one account, not the fleet. It keeps them inside working hours and watches their heartbeats.
-
One adapter per board
Each load board is a small adapter that only knows its own pages — login, reading rows, opening an offer. Claims, heartbeats, re-login and the event log live once in a shared loop. Three boards are connected.
-
One account claims each offer
A single atomic database claim decides which account handles an offer. Claims are short leases, so if a process dies mid-way another account takes the offer over. The other accounts skip an offer that is already claimed.
-
Live dashboard and settings
A dashboard shows every account and new loads as they arrive, streamed with gap-free catch-up after a reconnect. Changed settings restart only the accounts they affect.
-
Hand-off to the load platform
Every few minutes, new offers with a contact are posted to the platform's ingest API, and offers that are still open are re-sent so the platform knows they are current.
Why it was hard
-
Overlapping boards and accounts
Several processes see the same offer at once; only one may handle it.
-
Crashes are normal
Browsers hang and sessions expire, so recovery is built in — expiring leases, re-login and a stall watchdog — instead of a manual restart.
-
The database is the only coupling
The processes coordinate only through PostgreSQL. There is no message bus to run, and every state can be inspected in one place.
The result
One command brings up the database, migrations, the supervisor and the dashboard. Three load boards are connected, and loads are forwarded into the brokerage's platform during working hours.
- Offer appears One of several accounts sees it on a load board.
- Claimed once An atomic claim picks one account; the others skip it.
- Details collected Company, cargo and contact details read from the offer.
- Shown live The dashboard updates as the load is saved.
- Sent to the platform Posted to the ingest API and refreshed while open.
A process crashes mid-way Its lease expires and another account takes the offer over.