
Shipping Workspace (From To & Nafeza ACID)
Integrated partner freight desk providing tariff-backed cargo quotes, PKCE account linking, 19-digit ACID pre-clearance, and real-time tracking.
📌1. Executive Purpose & Role in Platform
Exportica natively integrates From To Shipping (FTS) inside /shipping using a secure first-party PKCE/consent bridge. Approved companies view their negotiated tariffs, book 5 cargo categories idempotently, track container milestones with transactional outbox reconciliation, and link Nafeza 19-digit ACID identifiers to shipments.
🧭2. Annotated Screen Architecture Blueprint
1Partner Connection & Entitlement Strip (/shipping/connect)
Shows linked FTS company identity, consent status, and exclusively approved tariff tiers.
25-Category Multi-Modal Quote Request Form
Capture origin/destination, cargo weight/dimensions, cold-chain reefers, air/sea/land lanes, and ACID ref.
3Decimal-Safe Quote Review & Idempotent Booking Guard
Displays itemized fees as exact decimal strings with review-before-reserve safety and stable idempotency keys.
4Real-Time Shipment History & Outbox Reconciliation Feed
Auto-refreshes carrier status events every 30s without resetting in-progress forms; shows delayed sync alerts.
⚙️3. Detailed Inside-Page Capabilities
1Explicit Company-Bound Consent & PKCE Linking
Zero-Trust BridgeEvery access verifies current Exportica session, active company membership, and non-revoked consent — never loose email matching.
2Approved Tariff-Backed Freight Quotes
Exact TariffsNo invented discounts or fake promises — pricing derives exclusively from published current tariffs for the company cohort.
3Idempotent Reservation & Recovery
Resilient OpsNetwork timeouts or double clicks never double-book shipments or duplicate payment records thanks to durable idempotency keys.
4Signed Event Pull & Worker Reconciliation
Outbox PatternMonotonic revision tracking and persistent outbox queues ensure zero lost status transitions even during partner downtime.
🔄4. End-to-End Execution Workflow
Grants consent on /shipping/connect to link FTS workspace
→ Active company-bound token
Requests 5-category cargo quote and reviews final decimal fee breakdown
→ Reviewed freight offer
Confirms booking idempotently & tracks container milestones live
→ Delivered consignment trail
🛡️ 5. Sovereign Guardrails & Security
- Protected headers disable cross-frame embedding (X-Frame-Options: DENY) and sensitive referrer leakage.
- Strict Decimal string serialization preserves exact cent/piastre freight figures.
- Permission checks execute on every request; withdrawing consent immediately blocks partner sync.
🚀 6. Quick Start & Connected Routes
- Visit /shipping?lang=en (or ?lang=ar) and verify FTS link status.
- Select cargo category, ports, weight, and request a tariff quote.
- Review quote lines, confirm once, and monitor automatic tracking updates.