
🚢 Maritime, Ports & Shipping · State Machine
The states a shipping container goes through in an export journey, from empty pick-up to delivery at the destination.
Drawing diagram…
State machine for a container: EmptyPickedUp from the depot, Stuffed at the factory, GatedIn at the origin terminal, CustomsCleared, Loaded on the vessel, InTransit, Discharged at the destination port, OnHold if customs inspects, Released, Delivered to the consignee, EmptyReturned to the depot.
stateDiagram-v2 [*] --> EmptyPickedUp EmptyPickedUp --> Stuffed: Loaded at factory Stuffed --> GatedIn: Enters export terminal GatedIn --> CustomsCleared GatedIn --> OnHold: Customs inspection OnHold --> CustomsCleared: Inspection passed CustomsCleared --> Loaded: On vessel Loaded --> InTransit InTransit --> Discharged: Arrives at destination Discharged --> Released: Import clearance done Discharged --> OnHold: Import inspection Released --> Delivered: At consignee Delivered --> EmptyReturned: Back at depot EmptyReturned --> [*]
A port community system that connects shipping lines, terminals, customs, freight forwarders and truckers on one platform, so documents are shared once instead of emailed many times.
The journey of an import container from unloading to leaving the port: discharge, customs filing, duty payment, delivery order and gate out.
How ships are tracked worldwide: AIS signals picked up by coastal stations and satellites, cleaned, matched to voyages and used for arrival predictions.
Where a container terminal's systems run: the terminal operating system in the data centre, equipment control on cranes and yard vehicles, and gates with automation.
Tables for an ocean freight booking platform: shippers, bookings, containers, voyages, bills of lading and tracking events.
How a port handles an arriving ship: pre-arrival notice, berth allocation, pilot boarding, tug assistance and berthing.