An interactive map of the freight platform: the architecture, the flows, the money, the deployment, and the code. Click tabs. Hover nodes for detail. Watch packets flow. Built from the live repo + Coolify deploy on srv2137043.
One platform for a road-freight brokerage run by one person. A board of loads and trucks, a book of who owes whom, and a desk that answers on WhatsApp/Telegram. One Postgres database holds the business. Everything — browser, desk, outbox — goes through the same API and the same matching rules.
Loads & trucks posted, matched, bid on, tracked through trips, paperwork (LR/POD/e-way), khata, hires, invoices, commissions.
Integer paise ledger (khata_entries.amount_paise). Whole rupees for postings/rates. The two never share a column.
AI bot on WhatsApp + Telegram posts loads/trucks, negotiates rates (flat ₹150/side = ₹300/load), charges commission. Never invents a rate.
freight-mcp: 50 MCP tools — city/equipment normalisation, inclusion rules, score. Same engine for browser and phone.
One database for the business. The platform, WhatsApp desk, Telegram desk and outbox all read/write the same freight Postgres. GoClaw keeps its own goclaw DB for agent runtime.
Major applications, services, APIs and data stores, and how they call each other.
Traefik routes by Host header. Coolify manages lifecycle. GoClaw has its own DB (goclaw). Platform shares freight DB with mcp/sweep.
app/(platform)/* 30+ routeslib/*.ts 70+ modules (money, audit, matches, auth, desk, khata, board)lib/*.test.ts 13+ unit testsscripts/migrate.mjs applies 14 SQL migrationssrc/tools.js 196K — 50 MCP toolssrc/server.js Streamable HTTP /mcpdb/migrations/ 24 SQL files (001-024)src/migrate.js auto-applies on bootsweep.js delivers queued notificationssrc/index.js guard/extract/intents/templatesbridge/bridge.py MCP stdio→HTTP (SSRF bypass)workspace/AGENTS.md desk rulesworkspace-india/watch/watch.py lane watcher (no-AI)skills/ freight-match, india-forwardingdocker-compose.yml portable stackdocker-compose.host.yml Coolify overlaygoclaw/coolify-compose.yml gateway stacktraefik/*.yml proxy rulesThe life of a load from a shipper's message to commission collected.
Negotiation ≤3 rounds. After 3 rounds or >15% gap after round 2 → escalate to ops. Commission flat ₹150/side read from get_config.
Postings and rates are whole rupees (posts.rate_amount, commissions.amount). The book is integer paise (bids.amount_paise, trips.freight_paise, hires.billed_paise, khata_entries.amount_paise). The two never meet in one column.
posts.rate_amount — posted ratecommissions.amount — agency earningbids.amount_paisetrips.freight_paisehires.billed_paisekhata_entries.amount_paiseWho owes whom. Every trip creates khata entries. Statements per counterparty, printable + shareable. Invoices: draft → sent → approved → paid. Commissions tracked separately until money + UTR in hand.
Four Coolify services on one VPS 189.72.146.117. Traefik owns :80/:443, issues Let's Encrypt certs by Host header.
Coolify renames containers *-lepy.... Volumes named lepy..._postgres-data. Shared net freight (legacy host compose) vs isolated Coolify nets.
All private, owner iamcoolvivek007, migrated from srv2043063. Total 1.2 GB (images dominate).
WhatsApp + Telegram via GoClaw. The desk reads/writes the freight DB through freight-mcp (MCP tools). Outbox (freight-sweep) delivers queued messages over GoClaw WebSocket.
bharath-trucks-telegrambridge.py — MCP stdio→HTTP (SSRF bypass)freight netwatch.py polls engine, no-AI, queues alerts only on new matcheswatches.json