Demonstration

Logistics control tower

A demonstration of a control tower for a mid-size shipper: carrier events normalized into one model, shipments tracked through an explicit state machine, exceptions surfaced with SLA timers, and every operator action recorded for audit.
Demonstration · fictional data
ReactTypeScriptGoKafkaPostgreSQL + PostGISRedisAWS
Type
Demonstration · fictional data
Domain
Logistics
Problems
Operational visibility, Exception handling, System integration
Year
2026

This is a demonstration, not client work. It was built for this portfolio with fictional companies and data to show how I approach this kind of system. Outcomes below are illustrative targets, not achieved results.

01Interactive preview

Try it. Everything here works.

A working product preview with fictional data. State changes, events and edge cases are simulated in your browser; nothing is sent anywhere.
Demohalden-ops · Logistics control tower

0 open exceptions · 0 of 6 delivered

HAL-24085 · Milan → Munich

Alpina Transport · Road · 8 pallets

SLA 17:00 · ETA 17:00

  1. Picked up

  2. In transit

  3. At hub

  4. Out for delivery

  5. Delivered

SCHEMATIC NETWORK · NOT TO SCALEATLANTICChicagoTorontoMontrealManchesterImminghamRotterdamOsloGöteborgHamburgFrankfurtGdańskMunichInnsbruckLyonMilan

Event history · by event time

  1. Arrived at hub · Innsbruck

    12:10 · received 12:11 · Alpina webhook

  2. Picked up · Milan

    08:00 · received 08:01 · Alpina webhook

No open exceptions on this shipment.

Exception queue

response SLA 60 min
  • Nothing yet. Advance the clock to let carrier events arrive.

Audit log

0 events
  1. State changes and operator actions will appear here.

02Context & constraints

The situation

A fictional outdoor-equipment shipper, Halden Outdoor Co., moves pallets and parcels through four carriers across Europe and North America. Its operations team tracks shipments across carrier portals, email and a shared spreadsheet.

The goal is one screen that answers three questions: what is at risk right now, why, and what should we do about it?

Role

A self-initiated demonstration, not client work. In a real engagement I would own event ingestion, the shipment state model, the exception engine and the operator interface.

  1. Carrier and EDI ingestion adapters
  2. Canonical event model and deduplication
  3. Shipment state machine
  4. Exception rules and SLA timers
  5. Operator console and audit trail
  6. Alerting and on-call runbooks

Constraints

  • Inconsistent carrier data

    Each carrier reports different event codes, time zones and levels of detail. Some send webhooks; others only drop batch files.

  • Duplicates and late events

    Carriers resend events and deliver them out of order. The system must converge on the correct state regardless.

  • Time-critical exceptions

    Temperature-sensitive and customs-bound shipments need attention within minutes, not at the next spreadsheet refresh.

  • Auditability

    Every operator action (reroute, customer notification, escalation) must be recorded with who, when and why.

03Architecture & data flow

Follow the data, one step at a time.

Pick a flow and step through it, or press play. Each step highlights the connection involved and explains what happens there and why.

Step 1 / 5

Scroll sideways to see the whole diagram →

Architecture diagram: Logistics control towerComponents: Carrier APIs, EDI / SFTP, Ingest adapters, Event stream, Normalizer, Shipment state, PostgreSQL + PostGIS, Exception engine, Redis, Operator console, Notifications. Highlighted path: Carrier event to shipment state, step 1 of 5: Carrier event received.INGESTION · AT-LEAST-ONCECarrier APIsWebhooks · pollingEXTEDI / SFTPBatch filesEXTIngest adaptersPer-carrier parsingJOBEvent streamKafka · per shipmentQUEUENormalizerCanonical · dedupeSVCShipment stateState machineSVCPostgreSQL + PostGISHistory · auditDATAException engineRules · SLA timersSVCRedisTimers · live viewsDATAOperator consoleReact · live updatesUINotificationsEmail · SMSEXT

Carrier event to shipment state

How a raw carrier message becomes a trustworthy state change, even when it is late or duplicated.

Carrier event to shipment state, step 1 of 5: Carrier event received. A webhook or poll returns a status message in the carrier's own format and time zone.

04Engineering decisions

Decisions, with their costs.

Written as short decision records: what was chosen, what it costs, and what else was considered.

ADR-01

Explicit shipment state machine

Decision
Shipments move through defined states (booked, picked up, in transit, at hub, out for delivery, delivered, exception) with allowed transitions. Invalid transitions are rejected and logged.
Trade-off
More upfront modeling than storing the latest carrier status, but impossible states can't occur and every transition is explainable.
Alternatives considered
Storing the last carrier status string, which makes reporting and automation unreliable.

ADR-02

Event time, not arrival time

Decision
Each event keeps the carrier's timestamp and the ingestion timestamp. State is computed by event time, so late events slot into history correctly.
Trade-off
Slightly more complex state computation in exchange for correct history when carriers report late.
Alternatives considered
Processing in arrival order, which corrupts state whenever events arrive late.

ADR-03

Rules first, models later

Decision
Exceptions start as transparent rules (dwell time, missed scan windows, temperature thresholds) with plain-language reasons. Predictive ETA models come once enough labeled history exists.
Trade-off
Rules are less clever than machine learning but explainable to operators from day one.
Alternatives considered
Starting with an opaque ETA model that operators don't yet trust.

ADR-04

A partitioned stream for carrier events

Decision
Events land on a Kafka topic partitioned by shipment ID, which preserves per-shipment order and allows replay to rebuild state.
Trade-off
Kafka adds operational weight, so a managed service (Amazon MSK or Confluent Cloud) is assumed.
Alternatives considered
SQS FIFO queues: simpler to run, with lower throughput ceilings and limited replay.

05Implementation

Where the details live

Deduplication and ordering

Events are deduplicated by a deterministic fingerprint and applied under a per-shipment lock, so two workers can never interleave updates to the same shipment.

Applying a carrier event to shipment state (simplified)Go
func (s *Service) Apply(ctx context.Context, ev CarrierEvent) error {
	fp := ev.Fingerprint() // carrier + tracking number + code + event time
	seen, err := s.store.MarkSeen(ctx, fp)
	if err != nil || seen {
		return err // duplicates are a no-op
	}

	return s.store.WithShipmentLock(ctx, ev.ShipmentID, func(sh *Shipment) error {
		next, err := sh.State.Transition(ev.Code, ev.OccurredAt)
		if err != nil {
			return s.exceptions.Raise(ctx, sh, ErrInvalidTransition, ev)
		}
		sh.Record(ev, next) // history ordered by event time, not arrival
		return nil
	})
}

SLA timers

When a shipment enters a state with an expected next event, a timer is scheduled. If the expected event doesn't arrive in time, an exception is raised automatically, with the rule that fired written into the reason.

Operator actions as commands

Reroute, notify and escalate are commands with validation and an audit record. The console shows the outcome of each command and keeps its history attached to the shipment.

06Deployment

Running it for real

Proposed topology for a production version of this design.
Runtime
Go services on Kubernetes (Amazon EKS) with autoscaling driven by consumer lag.
Streaming
Managed Kafka (Amazon MSK) with retention long enough to rebuild state from history.
Data
PostgreSQL with PostGIS for locations and geofences; Redis for timers and live views.
Delivery and operations
GitOps deployments with Argo CD; alerts on consumer lag, exception backlog age and carrier feed silence.

07Outcomes & lessons

What this shows, honestly labeled.

Nothing below is a client result. These are the capabilities the demonstration exercises and how success would be measured in a real engagement.
  • What the demo shows

    Illustrative — not a client result

    A shipment board driven by a simulated clock, an exception queue with SLA countdowns, and operator actions that change state and write to an audit log.

  • How success would be measured

    Illustrative — not a client result

    Time from exception to operator action, the share of exceptions caught before a customer reports them, and carrier feed freshness.

  • What is simulated

    Illustrative — not a client result

    Carrier events and time are simulated in the browser from a fixed fictional dataset.

Design notes

  • Show provenance: operators trust a status more when they can see which carrier event produced it, and when.
  • Silence is an event. A carrier feed that stops sending is often the first sign of trouble and deserves its own alert.
  • Exceptions need owners and due times; otherwise the queue becomes a second inbox.

Next step

Tell me what you’re building. I’ll tell you how I’d approach it.

Send a short brief. You’ll get a written reply from me within two business days — either a few clarifying questions, a suggested first step, or an honest “I’m not the right fit” with a pointer elsewhere.

Parth Patel

Senior full-stack engineer