Skip to content
Madsoft
HomeWorkCapabilitiesInsightsStudioPartnersContact
← All work
02Government2026

Port Clearance Platform

National port authority · West Africa

An AI-assisted platform that replaced paper weighing tickets and customs clearance end to end — web console, API and field mobile app.

INWEIGHSADOUTOCR
The system

A role-aware clearance pipeline spanning agents, customs officers, senior customs, finance, gate operations and exit control. OCR reads uploaded tickets, barcodes and QR codes carry each consignment through the yard, and SMS keeps hauliers informed. Over forty distinct operator screens, plus a dedicated API layer and a native field application for officers working away from a desk.

Outcomes

  • Forty-plus role-specific operator screens
  • OCR ticket capture with barcode and QR custody
  • Web console, API and native field app as one system

Stack

  • React
  • Next.js
  • React Native
  • PostgreSQL
  • OpenAI
  • OCR
  • Twilio
  • SendGrid

Engagement

Client named under NDA. Several engagements are active public-sector contracts, so we describe the mechanism rather than the customer.

Source, references and a walkthrough can be arranged for serious evaluation.

01The situation

Clearance ran on paper. A weighing ticket was printed, carried between offices by the driver or the agent, stamped by customs, checked by finance, and presented again at the gate. Every handoff was a queue, and every queue was an opportunity for a ticket to be altered, duplicated or lost. Disputes were resolved by whoever still had their copy.

02The hard part

The replacement had to work for six distinct roles with genuinely different jobs, on hardware ranging from an office desktop to a phone at a gate with intermittent signal — and it had to be adopted by people who had done the job on paper for years and had no reason to trust it.

03Decisions
  1. 01

    Digitise the ticket, not the process

    We kept the clearance sequence officers already knew and made the ticket itself the digital object. OCR reads the printed weighing slip on upload, so the first interaction is photographing something familiar rather than retyping it. Adoption was a design problem before it was a training problem.

  2. 02

    Custody as the data model

    Barcodes and QR codes carry each consignment through the yard, and every scan writes an attributable, timestamped custody event. The audit trail is not a report generated afterwards — it is the same records the workflow runs on, which is the only version an auditor can trust.

  3. 03

    A field app, because the gate is not a desk

    Gate and exit officers work standing up, outdoors, on a phone. Giving them a responsive web page would have meant giving them a worse tool than the paper it replaced, so they got a native application built for one-handed use and unreliable signal.

The technical dossier for this engagement

This page describes the shape of the work. The dossier describes how it was actually built — and goes to a named person at a named institution rather than onto a public URL.

  • System architecture, including the integration boundaries and why they were drawn there
  • The data model for the records the system is accountable for
  • Security posture: authentication, authorisation, audit trail and key handling
  • Deployment topology, failover behaviour and what happens during an outage
  • The measured before-and-after, where the client has cleared it for release
  • Named CVs for the engineers who did the work

Sent under a mutual NDA. Client names and locations are redacted unless that client has given written consent, which some have and some have not. Prepared individually — expect it within two working days, not instantly.

Next project

Customs Integration API

Start here

Bring us the problem
nobody has solved.

A 30-minute technical briefing. We will tell you what we would build, roughly what it costs, and honestly whether we are the right people for it.