RackPilot is an AI-powered operations and business intelligence platform for clothing businesses.
For small clothing wholesalers, independent apparel brands and clothing retailers. It combines inventory management, order processing, physical stock tracking, fulfilment workflows, sales analytics and intelligent purchasing recommendations in one system. Two investigation modules sit on the same records: OrderTrace reconciles orders, invoices, payments and dispatches, and StockSleuth reconstructs stock movements to explain why recorded stock and the shelf disagree.
The aim is to move a clothing business from managing orders, spreadsheets, stockrooms and purchasing by hand to one system that understands its operations and helps it decide better.
- 1Orders arrive
Messages, voice transcripts, manual entry or an uploaded order sheet
- 2Inventory and fulfilment
Check stock, reserve items, locate garments, prepare pick lists
- 3Business intelligence
Sales, stockouts, slow-moving products and demand
- 4Smarter purchasing
What to reorder, in what quantity, and why
Demo sign-in, no password. Synthetic wholesaler in Gandhi Nagar, Delhi: 18 products, 220 size and colour variants, 150 days of trading.
One interface, one history of business events, three responsibilities.
RackPilot core
Products, variants, inventory, orders, reservations, locations, picking, dispatch, sales analytics and purchasing recommendations.
Open RackPilot coreOrderTrace
Connects each order with its stock allocation, invoices, payments and dispatch records, and traces exactly where they stop agreeing.
Open OrderTraceStockSleuth
Investigates missing stock, unexplained changes, wrong reservations and misplaced goods by replaying the stock ledger.
Open StockSleuthOperate: manage the business's orders and inventory.
Investigate: find discrepancies and reconstruct the events that caused them.
Optimise: use the resulting sales and stock data to decide what to buy.
Each record looks reasonable on its own. Together they disagree.
- Orders arrive in informal messages, not an order system.
- Products have many variants: size, colour, design, SKU, sometimes batch.
- Staff know a garment is somewhere in the stockroom, not where.
- Physical stock and recorded stock drift apart.
- Several orders compete for the last units.
- Owners can't easily see which sizes and designs sell and which sit.
- Purchasing runs on intuition rather than sales, commitments and lead times.
- Invoices, payments and dispatch notes live in separate tools and don't get cross-checked.
These are the problems RackPilot is built to address. How often and how badly each target customer has them still needs checking with real clothing-business owners.
Start narrow: a wholesaler or a small brand with enough orders for this to hurt.
Small clothing wholesalers
Many variants, repeat retailer orders, physical stock, frequent picking and packing. The main demo business, Saffron Thread Apparel, is one.
Independent apparel brands
Own designs, variants to manage, sell-through to watch, replenishment to decide. The second demo tenant, Indigo Lane, is one.
Clothing retailers
Accurate stock, fast product location, reliable fulfilment and better buying.
Every feature shares the same records, so each step improves the next.
- Step 1Stock is added
Variants registered, quantities and rack locations recorded.
- Step 2An order arrives
Products, sizes, colours, quantities and deadline extracted.
- Step 3Inventory is checked
Variants matched, availability validated, shortages named.
- Step 4Stock is reserved
The same units can't be allocated twice.
- Step 5Picked and dispatched
Location-aware pick list; fulfilment recorded.
- Step 6Performance updates
Sales and movements feed analytics.
- Step 7Purchasing is recommended
Shortages found; quantities proposed from data.
Nine capabilities, A to I, all working in the demo.
AI-powered order intake
Messages, voice-note transcripts and photos or PDFs of order sheets become structured lines. Ambiguous or unknown items ask you to choose; it never invents a SKU. A confirmation screen comes before anything is reserved.
Try itInventory and SKU management
Products, designs, brands, size and colour variants, cost and price, on-hand, reserved and available, supplier and history. Damaged and quarantined stock is excluded from sellable.
Try itPhysical rack and location tracking
Warehouse A → Rack R-12 → Shelf 3 → Bin 12. Search or scan to find a garment, pick by location, move stock between racks, record counts, and flag bins that need verifying.
Try itOrder fulfilment and reservations
Validate, reserve, pick by location, dispatch, invoice. Database constraints stop two orders taking the same units. Shortfalls are explained, and the owner chooses: backorder or ship what's there.
Try itStock alerts and exceptions
Running low, can't be fulfilled, orders competing for stock, bins to verify, deadlines at risk, count discrepancies, unsold stock. Each from an explicit rule that says what triggered it.
Try itSales and inventory analytics
Best sellers, fastest sizes and colours, trends, cover, stockout days, ageing, value at cost and margin. Gaps in the sales records are flagged, not read as dead stock.
Try itDemand forecasting and replenishment
Demand from what customers ordered, so stockouts don't hide it. The forecast is backtested against history and its error is shown.
Try itBudget-aware purchasing
“I've got ₹30,000.” A hard budget, supplier packs and minimums, customers waiting first, best margin per rupee next. Evidence, risks, assumptions and what not to reorder, all before the owner approves.
Try itNatural-language business assistant
Ask in ordinary words. Each question maps to a fixed query template; the database does the arithmetic; the answer says how it was computed.
Try itAn investigation, not another dashboard alert.
The missing two shirts
ORD-1042: 20 blue oxford shirts ordered, 20 allocated, 20 picked, SHP-501 ships 20, INV-2058 bills 18, the customer pays for 18 and the order is marked completed.
- Ordered
- 20
- Allocated
- 20
- Invoiced
- 18
- Dispatched
- 20
OrderTrace checks for another invoice, a credit note, a return and a backorder, finds none, and opens OT-001. StockSleuth confirms the 20 left the warehouse. Three hypotheses stay labelled as unverified.
Open OT-001Six tees have gone missing
BLK-TSH-M at Warehouse A → Rack R-12 → Shelf 3 → Bin 12: recorded 50, counted 44.
- 09:00Stock received · 50 on record
- 10:154 picked for ORD-1043 · booked here until dispatch
- 11:30TRF-0087: 2 sent to the showroom rail · never scanned in
- 12:40ORD-1043 cancelled · the picked reservation isn't released
- 14:00Physical count · 44 on the shelf
StockSleuth opens SS-004: open records could explain 6 of the 6 units, likely in the packing area and on the rail. The recommended next step is to recount before approving any adjustment.
Open SS-004OrderTrace rules
- OT-INV Order vs invoice — Dispatched quantities not billed, billing ahead of dispatch, or invoice lines the order doesn't have
- OT-SHP Order vs dispatch — More shipped than the order allows after cancellations
- OT-PAY Invoice vs payment — Overpayments, balances more than 30 days past due, and payments not allocated to an invoice
- OT-ALLOC Allocation vs dispatch — Picked or reserved units left behind once an order is dispatched or closed
- OT-DUP Duplicate records — Payments, invoices or shipments that look recorded twice
- OT-MATCH Customer / product mismatch — A linked shipment, invoice or payment naming a different customer or variant than the order
- OT-STATUS Unexplained status — An order marked complete while fulfilment, billing or payment is outstanding
StockSleuth rules
- SS-COUNT Physical vs recorded stock — A count that differs from the recorded on-hand quantity at that time
- SS-TRF Transfer imbalance — Stock sent from one location and not received at the other
- SS-DUP Duplicate movement — The same receipt, transfer or adjustment posted twice
- SS-NEG Negative inventory — Movements that, replayed in time order, take a balance below zero
- SS-STALE Stale reservations — Stock still held for orders that are cancelled or already closed
- SS-PICK Pick vs dispatch — Units marked picked that were neither dispatched nor put back
- SS-RET Return reconciliation — Resellable returns received but not restocked
- SS-ADJ Adjustment anomalies — Repeated or large manual adjustments with no count behind them
- SS-LOC Location mismatch — Stock counted at a location where none is recorded
- SS-LEDGER Ledger inconsistency — A stored balance that no longer equals its movement history or its reservations
The shared investigation engine
The invoice lists 18 units and the dispatch record lists 20.
The transaction may have an invoicing discrepancy.
The invoice may be missing a line item.
An authorised employee confirms the quantity and records the correction.
Lifecycle: detected → investigating → action required → resolved → closed. Outcomes include record corrected, goods located, adjustment approved, counting error, false positive, legitimate partial fulfilment and awaiting external confirmation. Each finding stores its rule and version, the expected and actual values, the calculation, the exceptions checked and its source records. Corrections are new, audited records, and a resolved finding never reopens the case.
An AI-enabled business system, not an LLM that controls everything.
| Task | Mechanism | In RackPilot |
|---|---|---|
| Extract order details from messages | LLM with structured output | Rules by default; Claude reads text, photos and PDFs into a fixed schema (optional) |
| Match a description to a product | Database search, AI-assisted if needed | Catalogue matcher scores product words; Claude may suggest a product code, the matcher still decides |
| Calculate stock availability | Database queries and business rules | Available = sellable on-hand − active reservations |
| Reserve inventory safely | Transactional backend logic | Row locks, one transaction per order, CHECK (reserved ≤ on_hand) |
| Find a garment's recorded location | Inventory database | Balances per variant and bin; search by SKU, barcode or description |
| Calculate sales and gross margin | SQL and validated financial calculations | Dispatch records × order price − unit cost; cross-checked two ways on the Measurements page |
| Forecast demand | Statistical models, evaluated on history | 28-day ordered rate, backtested weekly against a naive baseline |
| Explain a business result | LLM grounded in retrieved results | Claude rewords computed answers; any number or code not in the results is rejected |
| Answer questions about supplier policies | RAG over documents | Postgres full-text search over supplier terms and house policies |
| Produce a purchasing proposal | Rules plus validated business data | Priority funding within a hard budget, packs and minimum orders |
| Decide whether records reconcile | Deterministic rules, never an LLM | 17 OrderTrace and StockSleuth rules with versions and exceptions |
Next.js, a Node backend API, PostgreSQL, and one schema for all three modules.
- Next.js frontendDashboard, orders, inventory, pick lists, OrderTrace, StockSleuth, Investigation Centre, analytics, purchasing, assistant.
- Backend API (Next.js route handlers, TypeScript)Session, tenant scoping, zod validation, role permissions, workflow orchestration; the checks re-run after every write.
- PostgreSQLRun in-process by PGlite for the demo. Append-only ledger and audit trail enforced by triggers; CHECK constraints stop overselling.
- AI servicesClaude for extraction, routing and explanation, with structured outputs and grounding checks.
- Validated outputsStock numbers that rebuild from the ledger, traceable findings and recommendations, owner-approved actions.
The shared data model
businesses · users · suppliers · customers · products · product_variants · locations · inventory_balances · stock_movements · orders · order_items · reservations · pick_lists · invoices / invoice_items · payments · shipments / shipment_items · transfers · returns · purchase_orders / receipts · physical_stock_counts · investigations · investigation_findings · investigation_evidence · investigation_events · audit_events · recommendations · documents
Every business-owned row carries its business; the backend scopes every query to the signed-in user's business. Two tenants share the demo to show it.
Not that it uses AI, or that it manages inventory. Those exist.
Less manual work
Informal orders become structured operational records.
Operational accuracy
Every order, movement and reservation is reflected consistently, and checked.
Actionable intelligence
Traceable recommendations and evidence-backed investigations rather than static charts.
RackPilot connects everyday clothing-business operations with evidence-backed investigations into why recorded transactions and stock don't reconcile.
What is built, and what is next.
- Realistic clothing catalogue with sizes, colours and rack locations
- Message, voice-transcript and document order intake with confirmation
- Availability checks and safe reservations
- Location-aware pick lists
- Shortage and low-stock alerts
- Budget-aware replenishment from sample sales
- OrderTrace and StockSleuth rules, shared Investigation Centre, grounded explanation, authorised corrections with audit trail
- Dashboard showing the whole workflow
- Barcode or QR scanning with a device camera (today: keyboard-wedge scanners and SKU search)
- Fuller supplier and purchase-order management
- Returns to suppliers
- Multi-period reporting
- Real authentication (Supabase Auth) on the same role checks
- Configurable reorder rules
- WhatsApp and other channel integrations
- Camera-assisted intake
- Multiple warehouses
- Seasonal forecasting once a year of history exists
- Supplier lead-time learning
- Accounting and sales-channel integrations
Measured on the prototype, not claimed.
holdout 12/14; ambiguous lines asked 6/6; unknown variants refused 4/4
top 3: 11/12
naive baseline 72%; per variant 125%
demo scenario, ambiguous and unknown orders, insufficient stock, simultaneous orders, missing history, tenants, roles
Not yet measured: time to locate and pick (needs staff trials), usefulness of proposed quantities (needs owners), and the Claude reader's accuracy (needs a paid evaluation run).
RackPilot is an AI-assisted operations and business-intelligence platform for small clothing wholesalers and apparel businesses. It manages orders, stock, warehouse locations, fulfilment, sales analysis and purchasing decisions. Its OrderTrace module reconciles orders, invoices, payments and dispatch records to uncover transaction discrepancies. Its StockSleuth module reconstructs inventory movements to investigate stock variances, missing movement records, incorrect reservations and location inconsistencies. Both share an investigation engine that presents source-linked evidence, separates verified facts from hypotheses, recommends checks and records authorised resolutions.