Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
DDD practice - shipping

Use cases

Book new cargo

Shipping agent provides origin, destination and arrival deadline. Origin and destination as UN locode 1.

System assigns a unique tracking id. Tracking id should be unique and generated by the system.

Cargo is initially unrouted.

Route new cargo

Shipping agent provides the tracking id.

System proposes some itineraries matching the cargo's route specification.

An itinerary consists of legs. Each leg is covered by voyage (ship), that has load and unload locations and times.

The agent accepts one of provided routes.

Our company has an algorithm for route calculation but we consider using an external specialized service.

Register a cargo event (expected/unexpected)

When a cargo arrives at a port, handling agent denotes this fact.

He enters tracking id, voyage number and what happened with the cargo (received, loaded or unloaded).

Track cargo

Shipping agent wants to know how is delivery going:

  • what happened with the cargo, when and where
  • if it's misdirected (in a wrong location)
  • what should happen next (e.g. if it was loaded in Mumbai, it should be unloaded in Dubai according to the itinerary)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.