All work

A freight accounting system: from the order to the client invoice

The whole shipment passes through the system — orders, air and sea delivery, consolidation, tariffs, invoices, credit limits, agent commissions. Processes are described in configuration, so they change without a release.

Context

The system carries shipments end to end: orders, air and sea delivery, cargo consolidation, tariffs, invoices, client credit limits, agent commissions. Plus process automation, so that managers do not move statuses by hand.

How the work was done

Tests are written before the code: 584 test files. Build, tests and coverage are checked automatically on every change. Around twenty engineering documents sit next to the code rather than in somebody’s head.

How it is built

Layers of the shipment management system, from client applications to the database; processes are described in settingsWebsites, widgets and the client areatake rates, statuses and invoices from the systemAPI layerGraphQL · authentication · access rightsOrders and shipmentsair and sea · consolidationRates and invoicescalculation · issuing · paymentLimits and commissionscredit limits · agentsProcess enginestatuses and transitions described in settings · schema-checked · changed without a releaseBackground jobsschedules · retries on failurePostgreSQL + PostGISdata and geodataLayers of the shipment management system, from client applications to the database; processes are described in settingsWebsites, widgets and the client areatake rates, statuses and invoices fromthe systemAPI layerGraphQL · authentication · access rightsOrders and shipmentsair and sea · consolidationRates and invoicescalculation · issuing · paymentLimits and commissionscredit limits · agentsProcess enginestatuses and transitions described insettingsschema-checkedchanged without a releaseBackground jobsschedules · retries on failurePostgreSQL + PostGISdata and geodata

Why this way — processes in configuration rather than in code

In logistics the process changes more often than the system ships. The order of approvals, the set of statuses, the conditions for moving between stages are edited at a client’s request, not on the development plan.

If processes live in the code, every such edit turns into a ticket, a review, a release and another round of testing. Development becomes the bottleneck of ordinary work: the business waits a week for a change that is, in substance, a setting.

So processes are described in configuration files. A change ships without a new version.

The price: mistakes in configuration surface at runtime rather than at build time — the compiler will not catch a typo. Hence schema validation of the configuration as a mandatory part of the solution, not a nice extra.

Other case studies

Case studies and personal projects