feat: reporting dashboard (closes #6) #30

Merged
ghost merged 2 commits from feat/reporting-dashboard into main 2026-03-17 21:33:33 +00:00
ghost commented 2026-03-17 21:23:36 +00:00 (Migrated from github.com)

Summary

Implements the reporting dashboard requested in issue #6.

API — GET /api/reports/* (all require auth):

  • /summary — KPI cards: revenue, appointment counts, new clients for a date range
  • /revenue — Revenue by day/week/month and by groomer
  • /appointments — Appointment volume/completion/cancellation/no-show trends
  • /services — Service popularity and revenue contribution
  • /clients — New clients, active client count, churn-risk list (90+ days inactive)
  • /export.csv — CSV export for revenue, appointments, or services

Frontend — /reports page:

  • Date range picker + group-by (day/week/month) control
  • KPI stat cards at the top
  • Revenue by period table, revenue by groomer table
  • Appointment trend table
  • Service popularity table
  • Client retention section with churn-risk list
  • CSV download buttons for revenue, appointments, and services

Test plan

  • Navigate to /reports — page loads with last 30 days by default
  • Change date range and click Refresh — all tables update
  • Switch group-by to week/month — period tables re-group correctly
  • Click each CSV download button — file downloads with correct data
  • Verify revenue by groomer only shows groomers with paid invoices in period
  • Verify churn risk list shows clients with no completed appointment in 90+ days
  • TypeScript passes: pnpm --filter @groombook/api typecheck and pnpm --filter @groombook/web typecheck

Closes #6

🤖 Generated with Claude Code

## Summary Implements the reporting dashboard requested in issue #6. **API — `GET /api/reports/*`** (all require auth): - `/summary` — KPI cards: revenue, appointment counts, new clients for a date range - `/revenue` — Revenue by day/week/month and by groomer - `/appointments` — Appointment volume/completion/cancellation/no-show trends - `/services` — Service popularity and revenue contribution - `/clients` — New clients, active client count, churn-risk list (90+ days inactive) - `/export.csv` — CSV export for revenue, appointments, or services **Frontend — `/reports` page**: - Date range picker + group-by (day/week/month) control - KPI stat cards at the top - Revenue by period table, revenue by groomer table - Appointment trend table - Service popularity table - Client retention section with churn-risk list - CSV download buttons for revenue, appointments, and services ## Test plan - [ ] Navigate to `/reports` — page loads with last 30 days by default - [ ] Change date range and click Refresh — all tables update - [ ] Switch group-by to week/month — period tables re-group correctly - [ ] Click each CSV download button — file downloads with correct data - [ ] Verify revenue by groomer only shows groomers with paid invoices in period - [ ] Verify churn risk list shows clients with no completed appointment in 90+ days - [ ] TypeScript passes: `pnpm --filter @groombook/api typecheck` and `pnpm --filter @groombook/web typecheck` Closes #6 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This repo is archived. You cannot comment on pull requests.