CASE STUDYBuilt on SagUI
Sales Analytics: from signal to action.
A dashboard for a regional sales leader running 10 convenience stores. It finds the best and worst sellers, compares stores against target and watches stock — then turns what it finds into alerts with a recommended next step, and actions you can track to done.
- ROLE
- Product Designer & Design-Engineer (solo)
- STACK
- Next.js 16 · React 19 · TypeScript · SagUI · Vercel
- DATA
- MDM master data + two years of seeded daily sales
- LINKS
- Live demo ↗GitHub ↗
- Stores from MDM master data
- 10
- Alert types, each with a next step
- 6
- Days of seeded daily sales
- 730
- New components — all SagUI
- 0

One system, three layers
Sales Analytics is the third piece of one system. Each layer does one job, and each makes the next one possible.
- DATA
MDM
Governs the master data — stores, vendors, categories, products — behind a staging-and-approval gate.
- INTERFACE
SagUI
Provides every component, chart and token. Screens are assembled, not designed one by one.
- DECISIONS
Sales Analytics
Consumes MDM's data, is built from SagUI, and turns sales signals into tracked actions.
The problem
A regional leader’s day isn’t short of numbers. It’s short of decisions. Most retail dashboards answer “what happened?” with charts, then leave the leader to work out what to do, who to call, and whether anyone did it.
- 01
What needs my attention today?
Not every metric — the few things costing money right now.
- 02
What should I do about it?
A specific, sensible next step, not just a red number.
- 03
Did it get done?
A loop that closes, so the same problem doesn't quietly come back.
Built on MDM’s master data
Sales Analytics doesn’t invent its own stores and products. Its 10 stores, 10 vendors, 16 categories and 25 products come from the same convenience-store data set the MDM platform governs — and that pays off in the details.
- Alerts know who to callEach product carries its MDM vendor, so a stockout recommends “Reorder 900 units from Healthy Beverage Corp.” — not just “reorder”.
- Stores know their managerA falling store recommends asking its named manager for a recovery plan.
- Categories group the analysisThe category map, product filters and margins all roll up the MDM category tree.
On top of that master data, a seeded generator builds two years of daily sales and a stock snapshot — 244 store-product series × 730 days. The same seed always gives the same numbers, with planted scenarios so the product has a story to tell: an energy drink surging and out of stock at two stores, a salad in decline and overstocked, a store losing traffic, and the airport store as the busiest location.
MDM keeps the master data trustworthy. Sales Analytics shows what that data is worth.
Information architecture
Six areas, split into analysis and operations. Every analysis view shares one store filter and one period control (7 days, 30 days, 90 days, 12 months), and every metric is compared with the period before it.
| AREA | JOB | KEY VIEWS |
|---|---|---|
| Dashboard | Today at a glance | Revenue, units, margin, open alerts; revenue trend vs. the previous period |
| Products | What sells and what doesn't | Highest and lowest selling, biggest movers, category map; per-product detail |
| Stores | How each store tracks to target | Progress-to-target gauges, revenue ranking; per-store detail |
| Inventory | Where stock is wrong | Out of stock, below reorder point, overstocked, healthy |
| Alerts | What needs attention | An inbox by severity and type, each with a recommended next step |
| Actions | What's being done | Reorders, transfers, markdowns and follow-ups, with an activity timeline |







From signal to action
The core of the product is one loop: signal → alert → recommended step → action → resolved.
Six alert types, each with a default answer
| ALERT | RAISED WHEN | RECOMMENDED STEP |
|---|---|---|
| Stockout | A product is at zero on the shelf | Transfer from a store with surplus, else reorder from the vendor |
| Low stock | Below its reorder point | Reorder back to the shelf maximum |
| Overstock | Far more cover than it needs | Mark down 20% for two weeks, or transfer surplus |
| Falling sales | Sales dropping against the previous period | A 15% promotion and a shelf review with the vendor |
| Demand surge | Sales climbing chain-wide | A chain-wide order covering two weeks of new demand |
| Store decline | A store's revenue is down | Ask the store manager for a recovery plan |
Alerts carry their cost in plain language — “usually sells 30 units a day here, so every day out of stock loses about $99” — so severity is something a leader can feel, not just a colour.

One click from alert to action


- Evidence firstAn alert opens on the store, product, vendor and cost — then the recommended next step.
- Pre-filled actionTake action fills the type, store, product, quantity, due date, owner and note, so accepting the recommendation is one confirmation.
- A loop that closesCreating an action marks the alert actioned; completing it resolves the alert. Nothing disappears just because someone looked at it.
- Ready for an AI assistantCopy prompt hands the situation and recommendation to an AI assistant — to draft the vendor email or the note to a store manager.
Built entirely on SagUI
Sales Analytics is the proof case for SagUI: a real, data-dense product assembled from the design system rather than designed screen by screen.
- ComponentsApp shell, metric cards, sortable data tables, tabs, chip groups, segmented controls, selects, number fields, dialogs, drawers, alerts, badges, toasts, timelines, empty states, skeletons.
- ChartsLine, bar, donut, gauge, treemap, slope, waffle and activity heatmap — SagUI's own charts.
- TokensColour, type, radius and elevation from @sagui/tokens, so light and dark mode work everywhere.
- Shared shellThe same AppShell, sidebar and top bar as the MDM apps — two products that read as one family.

What this demonstrates
- 01
Systems thinking across products
Data, interface and decisions as three layers of one system, each doing one job.
- 02
Design for decisions, not displays
Every alert ends in a next step, and every step can be tracked to done.
- 03
A design system earning its keep
A six-area, data-dense product built without inventing a single new component.