Case Study

Transport Dispatch, Freight Rating and Invoice Management

This freight management software case study ties a rated shipment to its billing and settlement records.

A shipment charge keeps the calculation that produced it. The platform ties that rated shipment to its dispatch, invoice groups and settlement records. Staff read the commercial work beside the stops, drivers and equipment.

The challenge

Today's tariff may no longer explain a charge that the system worked out at an earlier time. Billing also has partial states, where one invoice group finishes while another fails. The platform has to keep the original pricing evidence and resume the unfinished billing, without posting completed work a second time.

What we built

Tariff rules, conditions and lookup tables set each shipment charge. Rating saves the bill, the calculation trace and the lookups behind it. Reviewed proposals become billable invoice groups. A group that cannot be billed keeps its reason, while the valid groups move ahead.

Planning and assignment records connect to these workflows. Driver and carrier settlement, accounting records and document integrations support the work around the shipment.

One evaluator for previews and rating

The Rust tariff engine is compiled to WebAssembly for both browser and server. Editing previews and server runs use that same engine. Each run draws on the shipment context, the rule programs and the lookup tables. The pricing workflow checks the shipment's locked state before it reprices.

A completed group stays completed

Invoice runs commit one group at a time. Repeating a commit on a completed run returns the invoices it already produced. An interrupted run resumes from the first group that lacks an invoice.

The financial update, the journal write and the queued accounting sync share one database transaction at posting. A source idempotency key keeps the journal safe from a duplicate posting.

Apply organisation scope at the database

Each transaction carries signed tenant-scope information. PostgreSQL checks that signature and its expiry. Forced row-level security then applies the organisation and business-unit boundaries to the tenant tables. This protects the scope even when an application query leaves its own filter out.

Agent actions run under configured permission limits. Money-related operations also need their amount checks. Actions shaped by external content can be held back for someone to approve.

Project success

Staff can examine the working behind a charge even after the tariffs change. The invoice records show the completed groups, the unfinished work and the reason a group could not be billed. Those records support both continuation and review. Journal posting stays tied to the financial update, and the organisation boundaries hold alongside the application permissions.

Technology stack

Backend

Go, Gin, gqlgen, Uber fx

Rules and document processing

Rust, WebAssembly, wazero

Frontend

React, Vite

Database

PostgreSQL, PostGIS, pgvector

Supporting services

Temporal, Redis, Meilisearch, MinIO

Recognize the pattern?

If one of these looks like your situation, the discovery call is where we find out how close.