- Documentation
- /
- Coast 09 Cartage
- /
- 00 — Overview
00 — Overview
Demonstration prototype. coast_09_cartage is a reference application and part of the Coastal Shipping series (catalogue SHP-09, Stage 2). It holds no real cargo, tariff, container, contractor or customer data — everything in the demo is fictional and illustrates the data model only.
What the Inland Transport & Cartage Manager is
Contractor rates, cartage jobs, dispatch, milestones, proof of delivery and approved contractor costs — the road leg between the port and the customer's door.
Its central question:
Who carried this cargo, can we prove it arrived, and what did the contractor cost us — once?
The rules the model is built around
- Two rates, two owners. The customer's door-to-door cartage price stays in coast_05_rating (a job only points at it, or is explicitly marked non-billable). This application owns the contractor purchase rate and never overwrites or bills the customer rate. Pack scenario: customer PGK 120 per trip, contractor PGK 80 per trip.
- Job → dispatch → milestones → POD → approved cost. A job is assigned (an active contractor and an unambiguous approved rate), dispatched (vehicle, driver and, for full cargo, a current release authority), picked up, delivered (a verified POD whose quantity reconciles) and closed (costs reconciled).
- The yard's gate fact is evidence only.
yard.gate_recordedcreates an OBSERVED milestone andtracking.movement_acceptedconfirms it; this application never moves a container and never infers a pickup or delivery from an unconfirmed gate fact. - Approved once. A contractor cost is approved against a verified POD by someone other than its preparer, with its supplier invoice line key unique; an approved cost is immutable and corrected only by an exact negative reversal. A line already carried as a port cost (coast_08) is a DUPLICATE_COST exception, never a second payable.
- Independent verification. A POD is verified by someone other than its recorder; a shortage or damage raises an exception and the original POD is kept.
- Cross-application links are strings.
consignment_canonical_ref,port_call_canonical_ref,cargo_release_canonical_ref... withcid+refpairs where the owner is a canonical entity; every record has a hiddencanonical_ref.
The 14 models by area
| Area | Models |
|---|---|
| Cartage Jobs | CartageJob · CartageJobEquipment · CartageDispatch · CartageMilestone · CartageProofOfDelivery · CartageException |
| Contractor Rates & Costs | CartageContractorRate · CartageContractorCost |
| Audit & Network | CartageAudit · CartageExternalSnapshot |
| Reference Copies | CartageContractor · CartageDeliveryLocation · CartagePort · CartageCustomer |
Model names are unique across the whole fleet (hence the Cartage prefix), because network tests load many applications into one process.
The pack's per-app outbox and inbox models were dropped: the integration runtime provides them. CartageExternalSnapshot keeps the pack's versioned projection of what other applications published (voyage, port call, effective cargo, cargo-to-call mapping, agent appointment, release authority and port-cost invoice lines).
The demo scenario
Voyage V26-014 ex Lae, the same consignments, containers and references as the rest of the series:
| Job | What it shows |
|---|---|
| CJ-26-0001 | Lae: an empty 20GP delivered to the customer by Lae Haulage — gate-out GT-26-0003 observed and confirmed by tracking, POD verified, cost CC-26-0001 approved (carrier-paid), job CLOSED |
| CJ-26-0002 | Lae: the full container picked up and returned to the yard — gate-in GT-26-0004 confirmed; a wrongly located POD rejected and kept, a corrected POD verified; cost CC-26-0002 approved, then reversed by CC-26-0003 as a duplicate of a port cost (agent-paid); job DELIVERED awaiting a corrected cost |
| CJ-26-0003 | Port Moresby: DEMU1000002 delivered to the consignee on release authority RA-26-0001, contractor PGK 80 per trip (customer rate cart:pom-02), DISPATCHED, awaiting the yard gate-out; a draft cost CC-26-0004 is prepared |
| CJ-26-0004 | Port Moresby: the excavator on a lowbed, ASSIGNED but not dispatchable: release authority RA-26-0002 is suspended after the line 3 correction |
| CJ-26-0005 | A cancelled draft: the customer collected the empty with its own transport |
How to read it
- Start from the first menu group; it holds the records people work in.
- Reference copies (ports, customers, contractors, delivery locations) are this application's own local copies, matched by business code.
- Quantities and measures are
Decimal(amounts to 2 places, rates to 4, quantities to 3).