// Semantic Layer & Modeling — business glossary, KPI catalog, relationships, data warehouse. const GLOSSARY = [ { term: "Sales Amount", def: "Net value of a confirmed order after discounts & taxes.", map: "SUM(tbl_sales.sale_amt)", owner: "Finance BI", status: "Certified" }, { term: "GeM Procurement Value", def: "Total awarded order value on the GeM portal in a period.", map: "SUM(gem_transactions.order_value)", owner: "Procurement", status: "Certified" }, { term: "Vendor", def: "A registered supplier/bidder with a unique GeM seller ID.", map: "vendor_master.vendor_id", owner: "Vendor Mgmt", status: "Certified" }, { term: "L1 Bidder", def: "Lowest-priced technically-qualified bidder for a tender.", map: "MIN(tender_bids.bid_value) WHERE qualified", owner: "Procurement", status: "Certified" }, { term: "Scheme Beneficiary", def: "An individual/entity receiving a central-scheme disbursement.", map: "scheme_disbursement.beneficiary_id", owner: "Rural Dev.", status: "Review" }, { term: "Fiscal Quarter", def: "Indian FY quarter (Q1 = Apr–Jun).", map: "date_dim.fiscal_qtr", owner: "Data Governance", status: "Certified" }, { term: "MSME Vendor", def: "Vendor flagged as Micro/Small/Medium per Udyam registration.", map: "vendor_master.msme_flag = true", owner: "Vendor Mgmt", status: "Draft" }, ]; const KPI_CATALOG = [ { name: "Revenue Collection", formula: "Σ receipts_amount", unit: "₹ Cr", grain: "day · state", cert: "Gold", used: 42 }, { name: "GeM Procurement", formula: "Σ order_value", unit: "₹ Cr", grain: "day · dept", cert: "Gold", used: 68 }, { name: "Scheme Utilization", formula: "disbursed / allocated", unit: "%", grain: "month · scheme", cert: "Gold", used: 24 }, { name: "Vendor Concentration", formula: "Σ (share²) (HHI)", unit: "index", grain: "category", cert: "Silver", used: 12 }, { name: "Days Payable", formula: "avg(paid_date − invoice_date)", unit: "days", grain: "dept", cert: "Silver", used: 18 }, { name: "Fill Rate", formula: "delivered / ordered", unit: "%", grain: "sku · month", cert: "Gold", used: 31 }, ]; function Entity({ x, y, title, fields, w = 130, highlight, kind = "dim" }) { const head = kind === "fact" ? "var(--primary)" : kind === "highlight" ? "var(--accent-2)" : "var(--panel-3)"; const headText = kind === "fact" ? "white" : "var(--ink)"; const h = 22 + fields.length * 15 + 6; return ( {title} {fields.map((f, i) => ( {f.key ? '⚷ ' : ' '}{f.n} ))} ); } function Rel({ x1, y1, x2, y2 }) { const mx = (x1 + x2) / 2; return ; } const SEM_TABS = [ { id: "glossary", label: "Business Glossary", icon: "scale" }, { id: "kpi", label: "KPI Catalog", icon: "target" }, { id: "rel", label: "Relationships", icon: "link" }, { id: "warehouse", label: "Data Warehouse", icon: "layers" }, ]; function SemanticScreen() { const [tab, setTab] = useState("glossary"); return (
Semantic Layer & Modeling
Business-friendly names over raw tables · 142 terms · 68 governed KPIs · single source of truth for every dashboard & AI query
{SEM_TABS.map(t => ( ))}
{tab === "glossary" && (
{GLOSSARY.map((g, i) => ( ))}
Business TermDefinitionTechnical MappingOwnerStatus
{g.term}
{g.def} {g.map} {g.owner} {g.status}
)} {tab === "kpi" && (
{KPI_CATALOG.map((k, i) => (
{k.name}
grain: {k.grain}
{k.cert}
Formula
{k.formula}
Unit · {k.unit} Used in {k.used} dashboards
))}
)} {tab === "rel" && (

Entity Relationship Model

Auto-discovered via knowledge graph · ⚷ = key · click to inspect joins
AI-inferred
)} {tab === "warehouse" && (

Star Schema — Procurement Mart

Kimball star · 1 fact · 5 conformed dimensions
{[ { icon: "layers", t: "Storage model", v: "Lakehouse · Apache Iceberg", s: "Delta + Parquet on MinIO" }, { icon: "database", t: "Query engine", v: "Trino + ClickHouse", s: "MPP · columnar · 12.4B rows" }, { icon: "refresh", t: "Refresh", v: "Micro-batch · 5 min", s: "Incremental via CDC" }, { icon: "shield", t: "Modeling standard", v: "Star + Data Vault 2.0", s: "SCD Type-2 on dimensions" }, ].map((c, i) => (
{c.t}
{c.v}
{c.s}
))}
)}
); } window.SemanticScreen = SemanticScreen;