Skip to content
System design

How PartsIQ works

A durable, auditable pipeline. The language model reads and writes natural language; the database and code decide every fact โ€” compatibility, stock, quantity and approval.

The request pipeline

1Intake

Parse the enquiry; extract items, language, urgency.

2Identify

Resolve the machine + configuration from text/serial/photo.

3Search

Retrieve ONLY catalogue-compatible parts (lexical + BGE-M3).

4Choose

Rank candidates; bounded, read-only specialist tools.

5Plan

Allocate across warehouses; show shortfalls honestly.

6Draft

Model writes prose slots; code inserts every fact.

7Verify

Seven named code checks decide pass/fail.

8Review

A human approves the current revision before publish.

Services

FastAPI ยท public

gateway

The only public surface. Verifies the Supabase token, enforces roles/assignment, calls use cases. Never runs heavy work inline.

domain ยท read-only

search

Preserved legacy identification + compatible-set filtering + fulfilment planning, plus BGE-M3 semantic retrieval.

LangGraph ยท durable

orchestrator

The workflow + the deterministic verification gate + approval/revision transactions. Pass/fail decided in code.

jobs ยท fenced

worker

Nameplate OCR, approved-PDF export, catalogue import/publish โ€” behind leases with fencing tokens.

Next.js 16 ยท React 19

apps/web

Customer chat + demo, staff review workspace; bilingual (en/ar), theming, responsive.

Deterministic verification gate

Before a recommendation can reach a human, it must pass seven named, pure code checks. An LLM is never asked whether verification passed; a failed check surfaces to the reviewer, never silently treated as success.

current_revision โœ“catalogue_version โœ“candidate_membership โœ“configuration_membership โœ“source_evidence โœ“quantity โœ“allocation โœ“