Layers
- Silver — cleaned, normalized source data (dimensions and conformed entities) produced by ingestion.
- Gold — business-ready analytics: facts, snapshots, summaries, trends, forecasts, and AI decision data. This is what dashboards, KPIs, search, alerts, and recommendations read.
Browse any of these tables directly in the
datasets explorer (filter, paginate, export).
Gold layer
Facts (transactions)
| Table | Holds |
|---|---|
fact_sales_lines | Individual sales transactions. |
fact_order_lines | Purchase/order lines. |
fact_movement_lines | Stock movements (receipts, transfers, adjustments). |
Stock
| Table | Holds |
|---|---|
stock_ledger | Historical stock movements with running balances. |
stock_snapshot | Current stock by shop/variant (point-in-time). |
Dimensions
| Table | Holds |
|---|---|
dim_products | Product master. |
dim_product_variants | Variant master. |
dim_inventory_items | Product × shop inventory identity. |
dim_brands | Brand master. |
dim_shops | Shop master. |
Summaries
| Table | Holds |
|---|---|
dim_product_summary | Per-product aggregates. |
dim_variant_summary | Per-variant aggregates. |
dim_brand_summary | Per-brand aggregates. |
dim_shop_summary | Per-shop aggregates. |
Analytics, trends & AI
| Table | Holds |
|---|---|
product_shop_analytics | Pre-aggregated product × shop metrics. |
brand_shop_analytics | Pre-aggregated brand × shop metrics. |
sales_trends | Sales trend analysis. |
stock_trends | Stock trend analysis (feeds stock-out risk). |
sales_forecasts | Predicted sales by variant/shop/date. |
decision_vector | AI scores per variant/shop (stock-out & overstock risk, restock/transfer urgency, recommended discount, surplus/deficit). |
Silver layer
| Table | Holds |
|---|---|
brands, products, product_variants | Conformed catalog dimensions. |
shops, suppliers, collections, countries | Reference dimensions. |
inventory_items | Conformed inventory identity. |
taxonomy, brand_taxonomy, product_taxonomy, variant_taxonomy | Classification hierarchies. |
Reading these in the app
The app references gold/silver columns through typed constants (undersrc/constants/datasetColumns/{gold,silver}/) so SQL stays in sync with the schema — a
column rename surfaces as a TypeScript error rather than a silent bug. You don’t query these
tables directly via the public API; instead, the dedicated endpoints (analytics, search,
risks, forecasts) read them for you — see API recipes.
These are read-only analytics tables, populated by the data platform. App-managed
data you create (plans, rules, alerts, tags…) lives in the operational database — see
Data model.

