Online sales on a semantic layer
Cube + TremorAbout this project
A sales dashboard for an online shop, built without a BI tool: revenue, profit, orders and margin, the monthly trend, the top five categories or countries, and sales by channel.
The data sits in a Postgres star schema. A Cube semantic layer defines each measure once, and every chart asks Cube for it, so two charts can't disagree on what "margin" means. Margin is recomputed from summed revenue and profit at every level, never summed itself.
The page queries Cube on the server, three queries and 240 rows, and draws the charts with Tremor on React. The browser never sees the database or Cube's credentials. Results are cached for a day: governed numbers, not a live feed.
The data is synthetic, a generated sales history, so no client figures are shown.