<!-- example:sales-dashboard -->
# Sales dashboard specification example

A sales dashboard built from uploaded order data, with every number traceable to its source rows.

- [HTML version](https://specifica.org/examples/sales-dashboard/)
- [Specifica format](https://specifica.org/format.md)
- [Editable Playground](https://playground.specifica.org/): choose Sales dashboard and Simple

## spec.md

### 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

- [ ] 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

Optional workflow reference: metric, validation and traceability rules can be evaluated on each change while data-definition decisions remain human-owned. [Cognium Autonomous Loop](https://cognium.net/how-it-works/).
