Mindgraph TMS
Logistics — Multi-Tenant Export TMS
Multi-tenant transport management for container exporters: shipments, per-container sales orders, truck legs, customs, documents and charges, with 5 roles and row-level isolation.
One drop zone per shipment: an LLM names each paper (8 types) and proposes values for 23 fields, which the person accepts or rejects. Tenant isolation is enforced in Postgres with forced row-level security.
Fields read from papers: 23 per shipment
23 / LOGISTICS / MULTI-TENANT EXPORT TMS
Multi-tenant transport management for container exporters: shipments, per-container sales orders, truck legs, customs, documents and charges, with 5 roles and row-level isolation.
Client: Native product
Tags: Logistics · Document AI · LLM · OpenRouter · pypdf · Celery · FastAPI
Problem
Every export shipment produces a stack of papers: commercial invoice, packing list, shipping bill, bill of lading, certificate of origin, phytosanitary and insurance certificates. Staff read each one and retype invoice numbers, dates, vessel, voyage, container numbers, seals and weights into the TMS, field by field and container by container. No check sits between the paper and the record.
Our Solution
A transport management system that reads the papers and fills its own fields. One drop zone per shipment takes every paper at once. Each paper is recognised and filed in its empty document slot. Values for 16 shipment fields (invoice, shipping bill, booking, vessel, voyage, ETD, ETA, BL, ports) and 7 container fields (number, seals, box count, weights) come back as proposals. Where a value differs from the record, the record stays unless the person picks the new one. Around it sits the full TMS: shipments, per-container sales orders, truck legs, customs, charges and closing.
Technical Details
Master Lists
Customers and parties, products with HS codes, stuffing points, payment terms, shipping lines, forwarding agents, transporters, trucks, drivers, customs brokers and container types (6 ISO types to start). 17,600+ UN/LOCODE seaports and 251 countries load at startup.
Container Records
ISO 6346 check digit on every container number. Agent and customs seals, box count, gross, net and tare weight, packing and loading dates, pickup yard, and truck, driver and transporter per leg. Charges in any currency, totalled per container.
Document Intake
Drop PDFs, photos, spreadsheets or Word files. An LLM names the paper (8 types) and proposes values for 23 fields, each checked before it is stored. Document text reaches the prompt only through an injection guard.
Tenant Isolation
org_id on every tenant table, composite (org_id, id) foreign keys and forced row-level security per transaction. The app connects as a non-superuser role; rate limits at the edge and in the backend.
Platform + Reports
FastAPI, Postgres 18.6, Celery, RustFS file storage, React + TypeScript + Vite. Reports: by status, truck trips, missing documents, charges.