Dashboards in Production
KPI tiles, filters, live updates, loading, empty and error states, performance budgets, export, print and tests: a dashboard that can stay on the wall all day.
A chart that works in your editor is not yet a dashboard. A dashboard runs all day on a wall, updates itself, and is read by people who will not reload it. This phase is about everything that separates the two: what goes on the screen first, how filters work, how live data arrives, and what the page does when something goes wrong.
You learn to lay out KPI tiles, keep every filter in one place, take in live messages that arrive late or twice, give every box a loading, empty, error and stale state, set a performance budget and count leaks, export an SVG, a PNG and a CSV, print, and test the parts that can be tested.
At the end the Lumen Bikes dashboard becomes the live operations dashboard: key numbers with their changes, a live status box, every state handled, export buttons and a test suite.
Phase 16 · the story
Tomás, founder
“The board wants the dashboard on the wall all day, updating by itself, and I can't have a broken chart in front of them.”
Tomás has a board meeting on Thursday. He does not want a slide deck: he wants the Lumen Bikes dashboard on the big screen in the room, open all day, with the station numbers moving as bikes come and go.
Arjun tells him what that means. The page must update without anyone touching it. One failing request must not blank a chart. A tab that stays open for eight hours must not slow down. And if a number is old, the screen must say so, because a calm-looking old number is worse than a warning.
In this phase you give the dashboard those habits: a clear first screen, a live status box, a state for every way a box can fail, exports for the people who want the numbers, and tests that run before anything reaches the wall.
In this phase
You will learn
- Lay out KPI tiles, filters and charts so that the first screen answers the main question
- Take in live data that arrives late or out of order, and redraw at a steady pace
- Give every box a loading, empty, error and stale state, with retries
- Export SVG, PNG and CSV, print cleanly, and test scales, data shaping and marks
You write code in
In your Vite project lumen-dashboard/ (run npm run dev), and in the editor on this page
Files you touch
- src/parts/states.js
- src/parts/kpi.js
- src/data/live.js
- src/utils/export.js
- src/styles/production.css
- tests/scales.test.js
- src/App.jsx
- src/main.jsx
- package.json
Practise this phase
Hands-on exercises: write the code, see your page live, and press Check to have it tested automatically.