Dev Update #5

We stopped designing.
We started operating.

Four sections shipped in one week. Clients, Production, Shipments, Orders — connected as one continuous system. Not pages. Not features. Flow.

April 8, 2026 · Phase 4: Trading OS Launch

EDMA Orders Kanban Board
Orders Board — kanban view with 13-state lifecycle, priority badges, and risk indicators
What Changed

We stopped asking "how should this work?" and started asking "what breaks when this is used every day?"

Last update, we had Products and Manufacturers running — the foundation. Everything looked clean. Made sense. But it wasn't a system yet. It was two sections that happened to live in the same database.

Since then, we built four more sections. And somewhere in the middle of wiring them together, something clicked. The product stopped being a collection of pages and started feeling like something you could actually run a trade business on.

The Moment Everything Clicked

If an order exists, everything else must follow automatically.

That sounds obvious. Almost no system actually does it. So we rebuilt around that idea.

When you create an order now: production demand appears. Products get assigned to manufacturers. Timelines start forming. Logistics becomes inevitable. It's no longer tracking. It's orchestration.

Orders

The hub that connects everything.

Orders are no longer just records. They drive the system. A 13-state lifecycle — from draft through client approval, deposit, production, QC, shipment, customs, delivery, to completion. Kanban board, timeline view, and list view. The operator sees every order and where it stands in under 5 seconds.

The order detail page is mission control. One scrollable page that shows: line items with manufacturer assignments, production lot status with QC results, shipment tracking with ETA, financial P&L with landed cost, and a document checklist auto-generated by Incoterm and destination. Every entity is clickable — manufacturer name opens their profile, production lot opens the QC record, shipment opens tracking. You never leave the order to find what you need.

EDMA Order Detail
Order Detail — mission control view with line items, production status, shipment tracking, and financial P&L on one page
13-State Lifecycle
Draft → Approval → Deposit → Confirmed → In Production → QC → Ready to Ship → Shipped → In Transit → Customs → Delivered → Completed. Each transition validated. Can't skip states. Can't go backward. Cancellation requires a reason.
Pipeline Conversion
When a deal is won in the client pipeline, one click creates a draft order pre-populated with client, products, and negotiated pricing. Zero re-entry. The CRM and the order system are one thing.
Document Checklist
CIF to EU? The system generates: commercial invoice, packing list, BOL, certificate of origin, EUR.1, CE certificate. FOB to US? Different list. Auto-generated by Incoterm and destination country. Missing documents flagged before shipment.
Order-Level P&L
Revenue minus manufacturer costs, freight, customs duties, insurance, inspection fees, rework costs. Actual landed cost margin — not the margin on paper. This is the number no one else computes at the order level.
Production

Where reality hits.

Production was messy at the beginning. Because in real life, production is messy. Factories delay. QC fails. Quantities shift. So instead of hiding that, we leaned into it.

We broke production into lots. Each lot belongs to an order, moves through 9 states, can fail, loop back for rework, restart. The QC rework loop was the design decision that changed everything — a lot can fail inspection, go back into production, get re-inspected, and the full history of every attempt is preserved on one record.

And one key rule: when a lot is released, it becomes real cargo. That's the handoff. That's where things stop being internal and start costing money.

EDMA Production Board
Production Board — lots tracked through 9 states with QC rework loop, yield analysis, and manufacturer grouping
Yield Tracking
Factory A started with materials for 200K gloves and delivered 192K. That's 96% yield. The 4% loss means your actual cost per unit is higher than quoted. We track this per lot and aggregate per manufacturer. Low yield shows up in performance scores.
AQL Sampling
ISO 2859-1 sampling tables built in. Lot size 35,000, AQL 1.5, Level II — the system tells the inspector: check 315 units, accept if 7 or fewer defects, reject if 8 or more. Pre-filled on every inspection form.
Shipments

Where things usually fall apart.

This is where we spent the most time. Because this is where most companies lose control. We kept asking ourselves: "If I had 10 containers on the water right now, can I answer where they are in 5 seconds?" At first, the answer was no. So we rebuilt it properly.

We didn't build a tracking page. We built a logistics control layer.

EDMA Shipments Tracking
Shipment Tracking — milestone timeline with planned vs actual dates, container status, and document readiness
Real Routing
Factory to port. Port to vessel. Vessel to destination. Destination to client. Each leg tracked separately. Each leg can fail separately. Planned vs actual at every milestone. Delays surface the moment they happen, not when someone checks email.
Container Intelligence
Nobody actually knows how full their containers are. So we built CBM calculation, container fill logic, and consolidation suggestions. Not sexy. But this is where margin lives. A half-empty container is money thrown in the ocean.
Document Readiness
Before: container delayed because BOL wasn't ready. Customs issue because certificate was expired. Now: missing documents flagged before departure. Required docs auto-generated from the order's Incoterm and destination. Exceptions are structured, not surprises.
Cost Tracking
Every shipment has a cost breakdown: freight, duties, insurance, port charges, customs fees. This feeds directly into the order's landed cost P&L. When finance asks "why did this order's margin drop?" — the answer is one click away.
Clients

The demand side — with a full CRM inside.

742 paragraphs of spec. The largest section in the platform. Five tabs: Directory, Pipeline, Pricing, Financials, Overview. This isn't a contact list — it's relationship intelligence for trade operators.

The pipeline tracks every deal from lead to close. Won deals convert to draft orders with one click — client, products, and negotiated pricing pre-populated. Deal rot detection flags stale opportunities. Lost deals can be re-opened. Revenue forecasting rolls up pipeline and historical data. Gmail integration with a proposal editor that styles per-section. AR aging shows who owes what and how late. Credit management prevents over-exposure. Payment behavior scoring separates the reliable payers from the risky ones.

Clients Directory
Client Directory — health scores, segmentation, compliance status, and revenue tracking
Clients Pipeline Funnel
Pipeline Funnel — conversion rates between stages, deal value, and where opportunities get stuck

The part that matters most: it's connected now.

Before: orders lived somewhere. Production lived somewhere else. Shipments were separate. Now: order is created → production lot appears → lot finishes QC → becomes a shipment → shipment moves → gets delivered. No re-entry. No duplication. No guessing. One flow, one data model, one source of truth.

What We Learned

Three things became very clear.

Trade is not linear
Everything loops. Production fails and restarts. Shipments delay and reroute. Orders change mid-way. So we stopped trying to make it clean. We made it truthful instead.
Visibility beats automation
Everyone wants automation. But what people actually need first is: "tell me what's going on." So we focused on clarity before automation. Automation comes next.
Make problems visible
Most systems hide problems. We did the opposite. Delays, cost overruns, missing documents, QC failures — surfaced immediately. Because that's what operators actually need.
The Safety Net

382 tests. Every push verified.

We hit a point where building fast without breaking things required a safety net. So we built one. 382 automated API tests across 17 files. A git pre-push hook that blocks any code push unless every test passes and the frontend compiles clean.

Not just happy-path tests. Tenant isolation — company B can't see company A's data. Cross-section integrity — manufacturer pricing flows correctly into product buy-prices. Edge cases — unicode characters, SQL injection attempts, invalid UUIDs, boundary values. Error handling — malformed requests, missing headers, wrong content types. Every endpoint, every error path, every data flow between sections.

By the Numbers

What's running right now.

6
Sections Live
79
Database Tables
120+
API Endpoints
382
Automated Tests
99
React Pages
34
Data Hooks
15
Backend Modules
17
Test Suites
What's Next

Finance. Then the system is operational.

One section left to complete the core trade lifecycle: Finance. Invoicing, payments, three-way matching, cash flow, profitability with landed cost, multi-currency, tax compliance. After that, the full chain is live — from product catalog to client order to factory production to shipping container to delivered goods to invoice paid.

Then we move into the enhancement layers: Tasks, AI Services, Automation, and Intelligence Feed. And then we start plugging this into the PoV system.

This wasn't a clean build.

We rewrote parts of it multiple times. We broke things. We simplified things. We removed things that looked good but didn't work. We debugged CSS for hours because a native dropdown can't be styled on macOS. We discovered that Fastify's error handler scoping means you have to register it before the routes, not after. We learned that Recharts containers with 100% height render at -1 pixels before the DOM paints. Every one of those problems made the product better. And now it's starting to feel like a system, not a project.

6 of 11 sections fully built5 sections remaining

Community Chat