Delivered remotely for a business based in Atlanta, United States. Names withheld by agreement.
Project Overview
Freight hubs anchored in Atlanta coordinate massive volumes of dry-van, refrigerated, and LTL freight moving along Southeast interstate corridors every hour. Yet many growing brokerages still bridge the gap between quoting, carrier dispatch, and back-office accounting with manual rate-confirmation PDFs, inbox-driven detention approvals, and nightly batch imports into disconnected accounting packages. Those manual handoffs introduce margin leakage, delayed carrier payouts, and compliance blind spots whenever an unverified carrier picks up high-value cargo.
We engineered a comprehensive Transportation Management System (TMS) built on Java, Spring Boot, and React. Designed as a unified quote-to-cash platform, it orchestrates shipper load intake, automated carrier vetting and tendering, live shipment milestone tracking, and auditable double-entry customer invoicing and carrier settlement.
Brokerage & Settlement Bottlenecks
Modernizing multi-party freight coordination required eliminating four systemic points of failure:
- Protocol fragmentation across partners: Enterprise shippers mandated strict X12 EDI 204/214/210 exchanges while regional carriers relied on email rate confirmations, portal clicks, or custom REST APIs.
- Double-brokering and compliance risk: Checking FMCSA operating authority, cargo insurance expiration dates, and safety ratings manually before dispatching time-sensitive loads slowed carrier coverage and invited fraud.
- Accessorial margin leakage: Detention, layover, and lumper fees submitted days after delivery often missed customer billing cutoffs, forcing the brokerage to absorb unbilled carrier costs.
- Brittle financial state: Editing load weights or split-stop rates after initial invoice generation frequently caused AR/AP mismatches when accounting systems lacked immutable ledger trails.
Architectural Strategy
We structured the TMS around a modular Java 21 and Spring Boot backend communicating asynchronously over Apache Kafka while keeping core transactional boundaries strictly ACID inside PostgreSQL. Every shipment follows an explicit finite-state machine—from QUOTED and TENDERED through DISPATCHED, IN_TRANSIT, DELIVERED, and SETTLED—where illegal state jumps are rejected at the domain layer.
Financial postings follow strict double-entry ledger semantics rather than mutable invoice totals. Rate adjustments or approved accessorials append offsetting credit/debit entries tied to supporting document references in AWS S3, guaranteeing clean audit reconciliation at month-end close.
Core Capabilities
- Multi-Stop Load & Lane Management: Supports FTL, partial, and multi-stop consolidations with live margin previews, historic lane rate references, and equipment-specific requirements.
- Automated Carrier Vetting & Tendering: Verifies active authority, insurance coverage thresholds, and W-9 packet completeness via Redis-cached compliance checks before unlocking electronic rate confirmations.
- Canonical EDI & API Orchestration: Translates bidirectional EDI 204 tenders, 990 responses, 214 status updates, and 210 invoices seamlessly alongside modern REST carrier integrations.
- Document-Matched Settlement Queue: Pairs OCR-assisted Bills of Lading (BOL) and lumper receipts stored in AWS S3 against tendered rates, flagging weight or accessorial variances for fast exception approval.
- High-Density React Load Board: Equips Atlanta broker desks with keyboard-navigable multi-column filtering, instant carrier lane matching, and real-time shipment status alerts.
Technical Architecture
Inbound shipper orders arrive through REST APIs, React UI entry, or AS2/SFTP EDI gateways processed by Spring Integration. Validated shipments persist atomically in PostgreSQL using the transactional outbox pattern, guaranteeing Apache Kafka receives domain events (LoadTendered, CheckCallRecorded, PodUploaded) reliably without dual-write drift. Downstream Spring Boot consumers update settlement readiness, refresh carrier scorecards, and push real-time status notifications to connected React sessions.
Flow: Shipper EDI / REST & React Workbench → Spring Boot Load & Compliance Services → PostgreSQL Outbox Ledger + AWS S3 Document Vault → Apache Kafka Event Bus → EDI / Carrier Notification Adapters + Settlement Engine → React Ops & Finance Workspace
Using the transactional outbox inside PostgreSQL prevents phantom Kafka messages if a database rollback occurs during tender validation.
Technology Stack
| Category | Technology detail |
|---|---|
| Core Domain Services | Java 21 and Spring Boot microservices managing load lifecycle, tendering, and billing workflows |
| Operations Portal | React and TypeScript workbench with virtualized load boards, lane pricing tools, and audit views |
| Transactional & Ledger DB | PostgreSQL storing shipment orders, stop schedules, rate confirmations, and double-entry AR/AP ledgers |
| Domain Event Backbone | Apache Kafka streaming tender acceptances, tracking milestones, and invoice-ready triggers |
| Session & Lock Cache | Redis caching carrier safety ratings, active lane quotes, and distributed optimistic locks |
| EDI & Carrier Gateway | Spring Integration adapters translating X12 EDI 204/214/210 messages and modern carrier REST APIs |
| Document Vault | AWS S3 storing signed Bills of Lading, lumper receipts, rate confirmations, and carrier packets |
| Search & Indexing | PostgreSQL full-text and trigram indexing powering sub-second reference, PRO, and BOL lookups |
Engineering Trade-offs & Solutions
| Engineering Challenge | Solution & Trade-off |
|---|---|
| Distributed microservices risk split-brain inconsistencies between dispatch and billing | Kept core shipment state and financial ledger tables co-located in PostgreSQL using Spring @Transactional boundaries and outbox-fed Kafka events, trading independent DB-per-table isolation for rock-solid financial consistency. |
| EDI X12 partner dialects vary subtly across large shippers | Built versioned partner mapping profiles inside Spring Integration translating dialects into one canonical Java domain schema, trading initial adapter setup time for clean downstream domain code. |
Brokers scanning thousands of active loads trigger slow OFFSET SQL pagination |
Replaced offset queries with cursor/keyset pagination backed by composite indexes and React row virtualization, trading arbitrary page-number jumping for consistent speed. |
| Large PDF BOL uploads and invoice packet generation stall HTTP request threads | Streamed documents directly to AWS S3 via pre-signed URLs and offloaded PDF rendering to background Kafka consumers, trading synchronous download readiness for responsive UI saves. |
Security, Compliance & Auditability
Freight brokerage systems sit directly in the path of wire-fraud and cargo-theft vectors. Every user and external carrier portal identity authenticates via OAuth2/OIDC with fine-grained role permissions separating broker dispatch actions from bank-account and ACH settlement approvals.
Changes to carrier remittance details or banking profiles require multi-step verification and emit immutable audit-log records in PostgreSQL. Documents uploaded to AWS S3 enforce server-side KMS encryption and MIME validation, while EDI endpoints validate partner certificates and HMAC signatures before admitting load mutations.
Throughput & Operational Stability
Morning load surges and Friday afternoon settlement runs exert very different pressures on the platform. Redis caches hot carrier compliance snapshots and common lane-rating lookups so dispatch boards stay crisp under heavy concurrent broker filtering.
Meanwhile, Apache Kafka partitions shipment events by load ID, preserving strict chronological ordering for check-calls and status transitions while allowing horizontal worker scaling during bulk EDI batch arrivals or end-of-week invoice runs.
Operational Outcomes
Consolidating dispatch execution, partner EDI integration, and double-entry billing inside one Java and React TMS stabilized brokerage operations end to end:
- Tighter carrier compliance control: Automated authority and insurance checks block ineligible carriers before rate confirmations ever issue.
- Clean quote-to-cash reconciliation: Linking S3-stored Bills of Lading and accessorial receipts directly to immutable ledger entries eliminates surprise billing disputes.
- Unified partner visibility: Real-time check-calls and EDI 214 status streams flow automatically from carrier integrations to shipper dashboards without manual broker copy-pasting.
- Faster broker throughput: Keyboard-first React load boards and instant lane matching let dispatch desks cover freight confidently during peak market swings.