Trade Container
A web platform for posting shipment requests, declaring available capacity, bidding, and coordinating container trips, with KYC, subscriptions, chat, documents, and role-based administration.

Core stack
The challenge
The main challenge was turning an existing base into a self-hosted product coordinating different rules for the client, the carrier, and the administrator: KYC eligibility, subscription-based access, usage quotas, shipment requests, available capacity, bids, selecting a single partner, conversations, operational statuses, documents, reviews, and disputes. Migrating from Supabase to Express and PostgreSQL moved responsibilities such as authentication, session rotation, schema and migrations, storage, webhooks, notifications, and periodic maintenance into the application itself.
The solution
The TypeScript backend separates domains into routes for authentication, profiles, shipments, search, trucks, bids, conversations, messages, documents, KYC, reviews, subscriptions, Stripe, disputes, notifications, settings, and administration. Zod validates the API contracts, PostgreSQL enforces enums, foreign keys, uniqueness, and indexes, and short-lived JWTs are complemented by hashed refresh tokens and per-device sessions. The Next.js frontend provides role-specific dashboards, the logistics form for ports and stops, search and filtering, bid management, and navigation to chat after acceptance. Socket.IO and emails propagate important events, and scheduled jobs handle the expiration of old bids and requests as well as missing status updates.
Notable complexity
Trade Container connects companies that have containers to transport with carriers and fleet operators. The client builds a request starting from the pickup port and terminal, the destination as a port or an address, operational dates, container type and count, cargo, budget, and optional stops for customs, weighing, loading, or unloading. Carriers can publish their availability by route and period, with equipment, accepted containers, capacity, and rate, then search for shipments and place bids with price, availability, estimated duration, message, and validity term.
Accepting a bid associates the carrier with the shipment, moves the trip into the confirmed state, rejects the alternatives that are still pending, and initializes the dedicated conversation. The client is directed to the chat, and participants can communicate in real time and track the trip through the pending, offer_received, confirmed, picked_up, in_transit, delivered, completed, disputed, or cancelled states. The interfaces bring together the route, cargo, accepted bid, uploaded documents, notifications, and the post-completion review, and disputes can be reviewed by an administrator.
Business rules are applied differently by role. The client needs approved KYC and an active or trial subscription to post shipments, while the carrier needs approved KYC to submit bids. Stripe is used for the platform subscription — checkout, billing portal, and webhook synchronization — while transport payment is negotiated and settled directly between companies; the current flow does not implement escrow or payouts. For client plans, the shipment quota is atomically claimed before insertion and refunded if saving the request fails.
The product starts from a Next.js/Supabase base that was extended and migrated to a proprietary Express and PostgreSQL backend. The current implementation handles JWT authentication, hashed refresh tokens and per-device sessions, API contracts validated with Zod, Socket.IO, local files, SMTP emails with a Resend fallback, and node-cron jobs for expirations and reminders. The Next.js frontend uses httpOnly cookies and a shared store that coordinates session refresh between HTTP requests and the realtime connection. The demonstrated deployment runs the frontend and backend as separate PM2 processes.
Key results
- 3 confirmed operational surfaces: client/shipper, carrier, and administrator, with distinct navigation, dashboards, and permissions
- Shipment form with pickup port and terminal, port or address destination, up to 10 stops, containers, cargo, dates, budget, and instructions
- Truck-availability registry with route, period, equipment, accepted containers, capacity, and rate
- Search and filtering for shipments and transport capacity by route, date, container, transport type, and price
- Unique bid model per carrier and shipment, with price, availability, duration, message, validity, and operational states
- Accepting a bid updates the shipment, rejects the still-pending alternatives, and initializes the conversation between the two companies
- Real-time text chat per shipment, conversation list, unread count, and marking messages as read
- Operational flow for shipments: pending, offer_received, confirmed, picked_up, in_transit, delivered, completed, disputed, and cancelled
- KYC with document upload, pending/submitted/approved/rejected statuses, and administrative approval or rejection
- 30-day trial and Stripe plans with shipment quotas, checkout, billing portal, and webhooks for the subscription lifecycle
- Atomic claiming of the shipment quota before insertion, with compensation if saving the request fails
- Upload and listing for logistics and KYC documents, with image/PDF formats and a 10 MB limit
- Reviews with overall score, logistics criteria, review responses, and aggregation of the carrier's rating
- Disputes tied to trips and administrative resolution, with an audit trail for critical admin actions
- Transactional emails via SMTP with a Resend fallback for account, KYC, bids, messages, statuses, and subscriptions
- Scheduled jobs for expiring old bids and shipments and for status-update reminders
- Per-device sessions, refresh-token rotation, individual revocation, and coordinated concurrent refresh in the frontend
- History of completed trips for client and carrier, with totals and filtering by month, quarter, year, or the entire period
Related projects
- GrileAMGA training ecosystem for nursing assistants: courses, multiple-choice questions, exam simulations, statistics, and tests distributed by teachers, across web, iOS, and Android, with subscriptions, AI, and editorial administration.
- Risa TimeA digital ecosystem for picking up a customer's car, transporting it to a partner car wash, and returning it safely, coordinated through separate customer and driver apps, an operations panel, and real-time tracking.
- MixboxA multi-vendor marketplace for local products, with a single cart spanning multiple stores, separate apps for customer, merchant, and courier, flexible payments, and an advanced system for importing and managing supplier catalogs.
Want something similar?
Start with the estimate wizard — answer a few questions and get a realistic price range and timeline.