Analytics · Simple example
Sales dashboard specification example
A dashboard built from uploaded order data. The specification ties every metric and chart to source rows, defines invalid-data handling, and keeps drill-down part of the core experience.
spec.md Requirements and edge cases
Every dashboard number remains traceable to the imported rows behind it.
# Sales dashboard — spec ## Requirements - [ ] A user uploads a CSV of orders with date, product, region and amount. - [ ] The dashboard shows total revenue, order count and average order value. - [ ] A line chart shows revenue per day for the last 30 days. - [ ] A bar chart shows revenue per region. - [ ] Clicking a number lists the orders behind it. ## Edge Cases - A CSV row with a missing or negative amount → skipped and listed in an upload report. - A day with no orders → shown as zero, not left out of the chart. - A second upload → replaces the first after the user confirms.
tasks.md Build order
The import and validation path comes before derived numbers and visualisation.
# Sales dashboard — tasks ## Build order - [ ] Data model: uploads and orders - [ ] CSV upload with validation and an upload report - [ ] Headline numbers: revenue, orders, average order value - [ ] Charts: revenue per day, revenue per region - [ ] Drill-down from any number to its orders