FabricIQ Docs

Fabric IQ documentation

Fabric IQ Doc 2 — Gaps & What We Can Add

Audience: Product + eng deciding what a garment factory owner still needs, and what to pull from FactoriQ. Companion: 01 Code & flows · 03 Plan · Index


0. Two-line summary

FactoryTracking is a strong shop-floor visibility pilot but incomplete as a sellable garment ERP/SaaS (no hard billing, no real WhatsApp, no GST, no POs, not production-hardened). FactoriQ already has Buy / Demand / Risk IQ, WhatsApp Cloud, inventory depth, and GST invoice patterns — those should be ported into Fabric IQ on top of a rebuilt MES.


1. Who feels the gap (personas)

PersonaTwo-line pain todayWhat “complete” looks like
Factory ownerCannot see buying + floor + billing in one place; trial software feels demo-ish.One login: buy fabric → make garments → invoice brand → pay ₹5k SaaS.
Production managerKnows batch stages but not capacity plan or WhatsApp alerts.Line targets, bottleneck alerts on phone, delay risk.
Cutting / stitching operatorUses web UI; QR works; no chat commands.Scan + move on phone; WhatsApp status optional.
Store / purchaseReorder is manual wa.me draft; no PO document.Buy IQ draft PO + vendor score + WhatsApp to mill.
Brand / buyerThin portal; status via phone calls.Portal + WhatsApp “batch ready” + GST invoice PDF.
You (SaaS operator)No reliable deploy, soft gate, secrets in git.xyz.fabriciq.ai, Razorpay hard gate, clean ops.

2. FactoryTracking — gap catalogue

2.1 Production-readiness (must-fix for any paid customer)

GapTwo-line explanationSeverity
Monolith app.py~7.4k lines / 103 routes — hard to test, review, or scale a team on.High
SQLite defaultFine for demo; weak for concurrent floor phones + SaaS multi-tenant write load.High
Postgres path untesteddb.py + SQL file exist; comments admit no real PG validation.High
Secrets tracked in git.env with API keys was committed; rotate before any public demo.Critical
Broken deploy artifactsrender .yaml, requirements .txt (spaces); Actions YAMLs not under .github/workflows/.High
Almost no automated teststest_db.py is a dump script, not a suite.High
Soft subscription gateExpired trial still uses full MES — you cannot sell honestly.Critical
No confirmed live deployTemplates only; treat as local reference.High

2.2 Shop-floor / MES gaps

GapTwo-line explanationSeverity
Fixed six stages only (practically)Pipeline is configurable in factory_stages but product assumes garment six; no job-work / subcontractor stage model.Medium
No capacity / line schedulingDaily targets + delay ML ≠ load balancing across lines/machines.Medium
No piece-rate / attendanceWage calculation for operators not in scope of current code.Medium (later)
No machine maintenanceDowntime / PM not tracked.Low for MVP
Cutting room CAD / markerNo marker efficiency, lay planning, or fabric yield %.Medium
Multi-plantOne company_id ≠ multi-factory hierarchy.Medium (later)

2.3 Materials / buying gaps

GapTwo-line explanationSeverity
No formal Purchase OrderSuppliers + message drafts only — mills expect PO numbers.High
No MRP explosionBOM + reserve list ≠ full material requirements across open orders.High
No fabric roll / shade / lot / width / GSMApparel fabric waste and shade continuity are invisible.High for fabric-heavy plants
WhatsApp not automatedwa.me opens chat; does not send via Meta Cloud or track replies.High
whatsapp_settings.html orphanTemplate references Twilio flags that are not wired in app.py.Medium

2.4 Commercial / finance gaps

GapTwo-line explanationSeverity
No GST tax invoice / IRN / e-wayFactory→buyer invoicing still happens outside the app.High for “ERP” claim
No challan / packing list legal docs depthPacking sheets exist; not full India compliance pack.Medium
Costing shallowStage labor rates + material unit cost only.Medium
Buyer portal thinList + stage view; no claims, tech packs, approvals.Medium
SaaS invoices to you as vendorNo GST invoice from Fabric IQ Pvt Ltd to the factory for ₹5k.Medium (Phase 4)

2.5 Product / UX gaps

GapTwo-line explanationSeverity
Flask/Jinja UIFunctional, not “beautiful screens” marketing bar.High for positioning
No native mobile appResponsive web + camera QR only.Medium (PWA OK for MVP)
No subdomain tenancySingle host; company via session only.High for SaaS packaging
AI models version skewPickles may warn against current sklearn — risk of bad predictions.Medium

3. FactoriQ — what we can add (module by module)

Two-line summary

FactoriQ is a general manufacturing ops + AI layer (not garment-native). Reuse its patterns and modules for Buy/Demand/Risk, WhatsApp, inventory depth, and GST; do not expect garment cut-sew MES from it — that comes from FactoryTracking.

3.1 Buy IQ

Two-line: Turns “we need fabric/trims” into scored vendor choice and issueable POs, with email/WhatsApp channels. Where: FactoriQ FE /dashboard/requisitions, /dashboard/orders; BE purchase-order + auto-issue services; AI vendor_selection. Maturity: Strongest IQ module (production-leaning). Fabric IQ use: Fabric/yarn/trim buying with MOQ, lead time, mill score. Add garment fields: GSM, width, composition, shade card, mill name.

3.2 Inventory intelligence (ops, not a named “Inventory IQ”)

Two-line: Locations, transfers, soft reservations, GRN in / delivery out, low-stock notifications — deeper than FT’s single ledger. Where: /dashboard/inventory, locations, transfers, receipts. Fabric IQ use: Store rooms + floor buffers; later roll barcodes. Still missing even in FactoriQ: fabric roll/shade/width ontology — new work.

3.3 Demand IQ

Two-line: Forecast / reorder / safety stock from history; feeds planning. Where: /dashboard/iq/demand, BE iq-modules + MRP hooks. Maturity: Partial (heuristics/LLM; docs call MRP weakest). Fabric IQ use: Seasonal fabric demand + trim reorder from consumption + order book.

3.4 Risk IQ

Two-line: Supplier risk signals from internal OTD/quality; external scan largely stub. Where: /dashboard/iq/risk. Maturity: Partial / demo. Fabric IQ use: Mill reliability from your own late deliveries & defect rates first.

3.5 WhatsApp (critical for India garment)

Two-line: FactoriQ has Meta Cloud API + Baileys (WhatsApp Web) + alert templates + inbound webhooks; FT only has deeplinks. Capabilities to port:

CapabilityTwo-lineFabric IQ target phase
Outbound Cloud textSend approved template/alert to supervisor or mill.Phase 1
Alert templateslow_stock, po_approval, shop_floor_update, daily_brief.Phase 1–2
Inbound floor commandsText like BATCH-123 move stitching / WO progress (Baileys or Cloud).Phase 2
Vendor quote threadsRFQ/negotiation over WhatsApp.Phase 2
Invoice pingSend invoice summary link to buyer.Phase 3

Prerequisite: Meta Business verification + template approval — start week 1 of build.

3.6 Customer invoicing + GST (India)

Two-line: FactoriQ sell-side has AR invoices, GSTIN fields, e-invoice IRN and e-way (mock or live NIC). Fabric IQ use: After DISPATCH, generate tax invoice PDF + optional IRN; e-way for shipments. Maturity: Partial/demoable — plan mock first, live NIC when factory has creds.

3.7 InvoiceIQ (vendor bills)

Two-line: Extract vendor invoices, 3-way match, anomaly flags. Fabric IQ use: Mill fabric invoices against PO + GRN. Phase: 2–3 optional.

3.8 Other FactoriQ IQ (selective)

ModuleTwo-linePriority
IntakeIQNL → requisition lines (WhatsApp/email fabric asks).Nice Phase 2
SupplierIQ / TenderIQ / ContractIQQualify mills, tenders, contract renewals.Phase 3+
Tally connectorAccounting stays in Tally; push vouchers.Phase 4
Firebase multi-tenant authProven tenancy; optional if email/password MVP.Optional

3.9 What FactoriQ does not give you


4. Combined “value loops” we should sell

4.1 Make loop (from FT — already exists)

Buy order → create batch → QR → move/receive → QC defects → pack → dispatch → reports.

4.2 Buy loop (from FactoriQ — to add)

Low stock / Demand IQ → requisition → Buy IQ vendor score → PO → WhatsApp to mill → GRN → inventory.

4.3 Talk loop (WhatsApp — to add)

Stage move → template to supervisor group; buyer gets “Ready”; mill gets PO; floor can reply status.

4.4 Money loop (GST + SaaS — to add)

Dispatch → GST invoice to brand; factory pays Razorpay ₹5k/mo → hard access to xyz.fabriciq.ai.

flowchart LR
  subgraph make [Make today]
    B[Batch] --> M["Move and receive"]
    M --> D[Dispatch]
  end
  subgraph buy [Buy port]
    R[Requisition] --> PO[PO]
    PO --> GRN["GRN stock"]
  end
  subgraph talk [WhatsApp]
    WA[Alerts]
  end
  subgraph money [Billing]
    GST["GST invoice"]
    SaaS[Razorpay] --> Access["Hard gate"]
  end
  GRN --> B
  M --> WA
  PO --> WA
  D --> WA
  D --> GST

5. Prioritized backlog for Fabric IQ (gap → feature)

PriorityFeatureCloses which gapSource
P0Postgres + modular API + testsProd readinessNew
P0Hard subscription gate + RazorpaySoft billingNew (+ FT ideas)
P0Rebuild MES stages/QR/move/receiveCore productFT domain
P0Subdomain tenancySaaS packagingNew
P1WhatsApp outbound alertsOps automationFactoriQ
P1Inventory ledger + BOM (hardened)MaterialsFT + FQ
P1Beautiful Next.js UIPositioningNew UI
P2Buy IQ + formal POsBuying gapFactoriQ
P2Fabric item fields / rolls startFabric domainNew
P2WhatsApp inbound floor/vendorOps automationFactoriQ
P3Demand IQ + Risk IQIntelligence storyFactoriQ
P3GST AR invoicesFinance gapFactoriQ
P3Buyer portal polishBrand experienceFT + new
P4Yearly plan UX, SaaS GST to customer, Tally, PWAScaleNew / FQ

6. Explicit non-goals (v1–v3)

Do not block Fabric IQ launch on: full payroll, CRM, IoT OEE, CAD/marker suite, multi-country tax beyond India GST, autonomous no-touch negotiation at enterprise depth, or migrating every FactoriQ marketing “Plan/Make/Move/Grow” label.


7. Two-line takeaway

Close P0 production + MES + billing first so a factory can pay and run cut→dispatch; then add WhatsApp + Buy IQ, then Demand/Risk + GST. That sequence turns FactoryTracking’s demo into Fabric IQ without boiling the ocean.

Next: 03 Fabric IQ plan — architecture, subscription E2E, shop-floor E2E target, timeline.