The problem · What TrueTier does · The illusion, visualised · Confidence Lens · Key features · Metrics · Architecture · How a request flows · Roadmap · Quick start · API · Team
Companies judge supply-chain resilience by counting suppliers. But tier-1 suppliers often share hidden upstream dependencies, such as one wafer fab or one port, so "three suppliers" can really be one point of failure. The 2021 chip shortage showed automakers losing output to concentration they could not see.
TrueTier builds a multi-tier supplier network from procurement records, supplier disclosures and shipment data, exposes hidden common dependencies, and answers three questions:
- How independent are my suppliers, really? (EIC and FDS scores)
- What happens to inventory and production if something breaks? (day-by-day simulation, Monte Carlo P50/P90)
- What should I fix first? (actions ranked by ROI, with the evidence behind each)
Every link is tagged verified, reported or inferred, and the proof is one click away. The distinction is the product.
What procurement sees when only verified links are trusted, versus what the full evidence shows:
flowchart LR
subgraph V["Verified lens: looks diversified (EIC ≈ 3.0)"]
direction LR
N1["Nexa Semi"] --> A1(["Aurora Motors"])
O1["Orion Micro"] --> A1
H1["Helix Devices"] --> A1
end
subgraph F["All-links lens: the illusion (EIC ≈ 1.1)"]
direction LR
N2["Nexa Semi"] -->|verified| W["Hsinchu Wafer Works"]
O2["Orion Micro"] -.->|reported| W
H2["Helix Devices"] -.->|"inferred ?"| W
W ==> P{{"Port of Kaohsiung"}}
P ==> A2(["Aurora Motors"])
end
classDef risk fill:#3A1418,stroke:#FF4D4D,stroke-width:3px,color:#fff;
classDef buyer fill:#10151C,stroke:#E8ECF1,color:#fff;
class W,P risk;
class A1,A2 buyer;
Nominal vs effective supplier count per material (dataset design targets, All lens):
xychart-beta
title "Nominal vs effective independent suppliers"
x-axis ["Power MCU", "Li-ion cells", "Magnets", "Copper (control)"]
y-axis "Suppliers" 0 --> 4
bar [3, 2, 2, 3]
bar [1.1, 1.3, 1.2, 3]
Copper is the control: three genuinely separate chains, so the tool correctly says "diversified" and doesn't cry wolf.
| Lens | What the buyer sees | MCU effective independence |
|---|---|---|
| Verified only | Three independent chip suppliers | EIC ≈ 3.0 |
| + Reported + Inferred | All three funnel into one wafer fab and one port | EIC ≈ 1.1 |
Then close Port of Kaohsiung and watch the red wave propagate: MCU inventory hits zero and production halts around day 9.
| Edge class | Line style | Colour |
|---|---|---|
| Verified | solid | teal |
| Reported | dashed | amber |
| Inferred | dotted + "?" | violet |
Styles differ by pattern as well as colour, so the graph stays readable in grayscale and on a projector.
- Confidence Lens: switch between verified, +reported and all links; graph and hero metric animate.
- EIC / FDS scoring per critical material (Effective Independence Count, False Diversification Score).
- Evidence panel with contracts, disclosures, shipment records and geo-proximity behind every edge.
- Disruption simulation: four presets (typhoon, fab shutdown, rare-earth ban, compound shock) plus custom node disruption.
- Monte Carlo that models uncertainty in our own knowledge of the network.
- ROI-ranked recommendations (add supplier, buffer stock) with FDS before → after.
- Printable report via Jinja2 and browser print-to-PDF.
- Offline-first: the optional Claude API writes prose only; deterministic templates take over without internet.
EIC(m) = min(nominal, 1 / max_exposure(m)) # suppliers that are effectively independent
FDS(m) = 1 - EIC(m) / nominal(m) # 0 = diversified, → 1 = pure illusion
exposure(u, m) = 1 - availability(m | node u fails)
flowchart LR
A["FDS < 0.2"] --> B["diversified"]
C["0.2 ≤ FDS < 0.5"] --> D["partial"]
E["FDS ≥ 0.5"] --> F["illusion"]
style B fill:#12303A,stroke:#2DD4BF,color:#fff
style D fill:#3A2E12,stroke:#F5B942,color:#fff
style F fill:#3A1418,stroke:#FF4D4D,color:#fff
Full formulas are in plan.md §7.
flowchart LR
subgraph DATA["Data (seeded, synthetic)"]
D1[("graph.json")]
D2[("materials.json")]
D3[("scenarios.json")]
D4[("candidates.json")]
D5[("shipments.csv")]
D6[("disclosures.json")]
end
subgraph ENGINE["Engine (NetworkX + NumPy)"]
E1["Lens"]
E2["Exposure"]
E3["EIC / FDS"]
E4["Simulation"]
E5["Monte Carlo"]
E6["Recommend"]
E7["Inference"]
end
subgraph API["API (FastAPI)"]
A1["/graph"]
A2["/analysis"]
A3["/simulate"]
A4["/recommend"]
A5["/report"]
end
subgraph UI["Frontend (React + TS)"]
U1["Lens slider"]
U2["Graph canvas"]
U3["Evidence panel"]
U4["Charts"]
U5["Reco table"]
end
LLM["Claude API<br/>(optional, prose only)"]
DATA --> E1 --> E2 --> E3
E3 --> E4 --> E5
E4 --> E6
D5 --> E7
D6 --> E7
E7 -->|inferred edges| D1
ENGINE --> API --> UI
API -.->|narrative| LLM
classDef opt stroke-dasharray: 5 5;
class LLM opt;
Single process, in-memory, no database, deterministic (seed=42).
| Layer | Tech |
|---|---|
| Frontend | React 18, TypeScript, Vite, Tailwind, Cytoscape.js, Recharts, zustand |
| Backend | Python 3.11, FastAPI, Pydantic v2, NetworkX, NumPy, pandas, rapidfuzz |
| Report | Jinja2 + print CSS |
| Optional AI | Anthropic Claude API for narrative text only (never for numbers or rankings) |
sequenceDiagram
actor P as Procurement lead
participant UI as React UI
participant API as FastAPI
participant EN as Engine
P->>UI: Slide lens to "All"
UI->>API: GET /graph and /analysis?lens=all
API->>EN: apply_lens, analyze
EN-->>API: edges, EIC, FDS, shared nodes
API-->>UI: JSON
UI-->>P: Graph reveals shared fab and port, FDS animates
P->>UI: Click "Kaohsiung typhoon"
UI->>API: POST /simulate
API->>EN: simulate (+ Monte Carlo)
EN-->>API: inventory, production, loss, P50/P90
API-->>UI: series + narrative
UI-->>P: Red wave, stockout on day 9
P->>UI: Open recommendations
UI->>API: POST /recommend
API->>EN: recompute FDS and loss per action
EN-->>API: actions ranked by ROI
API-->>UI: before to after FDS, ROI
gantt
title METAVERSE 2.0 build timeline (hours from kickoff)
dateFormat HH:mm
axisFormat T+%H
section Foundation
Scaffold, contracts frozen :done, f1, 00:00, 1h
section P0 vertical slice
Dataset + engine v1 + lens :p1, 01:00, 7h
Simulation, charts, evidence panel :p2, 08:00, 4h
P0 demo path end-to-end :milestone, m1, 12:00, 0h
section P1
Monte Carlo, recommendations, report:q1, 14:00, 4h
section Polish and ship
Visual polish :s1, 18:00, 2h
Feature freeze :crit, milestone, m2, 20:00, 0h
Bug bash, backup video, README :s2, 20:00, 2h
Rehearse 3x and submit :s3, 22:00, 2h
timeline
title Product roadmap
Hackathon demo : Confidence Lens : EIC and FDS : Disruption simulation : ROI-ranked fixes
Next : CSV and ERP import : Scenario comparison : Map view with geo lines
Later : Live shipment and port feeds : Automated disclosure reading : Min-cut and SPOF view
Vision : Continuous monitoring : Supplier onboarding workflow : Board-ready risk reports
Prerequisites: Python 3.11+, Node 20+, npm.
git clone https://github.com/mohamedfadil12/TrueTier.git
cd TrueTier
.\tasks.ps1 setup
.\tasks.ps1 data
.\tasks.ps1 demoOpen http://localhost:5173 (API on localhost:8000).
If scripts are blocked: Set-ExecutionPolicy -Scope CurrentUser RemoteSigned.
Other commands: .\tasks.ps1 api · .\tasks.ps1 web · .\tasks.ps1 test
Optional LLM narration: copy .env.example to .env and set ANTHROPIC_API_KEY. Leave it empty to run fully offline.
| Method | Path | Purpose |
|---|---|---|
| GET | /api/graph?lens= |
Nodes, edges (filtered by lens), materials, buyer |
| GET | /api/analysis?lens= |
EIC, FDS, verdicts, shared nodes and paths |
| GET | /api/scenarios |
Disruption presets |
| POST | /api/simulate |
Day-by-day simulation (+ optional Monte Carlo) |
| POST | /api/recommend |
Ranked actions for a scenario |
| GET | /api/report |
Print-ready HTML report |
| GET | /api/health |
Health check |
contracts/ shared TS types and Pydantic models (source of truth)
data/ generated seeded dataset (committed so the demo runs instantly)
scripts/ generate_data.py
backend/ FastAPI app, engine/, golden tests
frontend/ React app
docs/ STATUS.md handoff log, pitch.md, img/
The demo uses a fictional, synthetic, seeded scenario: Aurora Motors, an EV maker with a Chennai plant. It is designed to contain real-world patterns (a shared wafer fab, a shared port, a regional dependency) plus a genuinely diversified control. No real company data is used.
| Member | Role | GitHub | |
|---|---|---|---|
| Ammar | Engine lead: exposure, EIC/FDS, simulation, Monte Carlo | @mdammar56 | |
| Fahadur | Data & API: dataset generator, FastAPI, report | @fahadur20git | |
| Rayyan | Frontend lead: graph canvas, lens, charts, evidence panel | @rayyanbasheer | |
| Fadil | Design, pitch & QA: visual language, deck, demo rehearsal | @mohamedfadil12 |
Simchi-Levi et al. (2015), Interfaces 45(5) · Ivanov & Dolgui (2020), Int. J. Production Research 58(10) · Pearl (1988), Probabilistic Reasoning in Intelligent Systems