Comfy-Org / Comfy-Org/download-data
Dashboard improvements: KPI cards, % changes, absolute deltas, breakdowns
- Dominant language
- TypeScript
- Stars
- 4
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
Summary
Enhance the dashboard beyond a single chart with actionable KPIs and comparisons.
Current
- One area chart with timeframe selector: `components/charts/daily-downloads-chart.tsx`.
- Basic “Change over timeframe” text uses first vs last data points.
Proposed Enhancements
- KPI cards above the chart:
- Today’s downloads (bucket date), 7‑day avg, 30‑day avg
- WoW % change (last 7 vs prior 7), MoM % change (last 30 vs prior 30)
- Cumulative downloads (sum of daily deltas)
- Variant breakdown (stacked area) by asset variant:
- e.g., `nvidia`, `nvidia_cu128`, `amd` derived from `asset_name` patterns
- Release annotations on the chart by `tag_name` appearance
- UX niceties: CSV export, toggle absolute vs % change, date range picker
API Changes
- Add `/api/downloads/daily/overview` to return KPIs (today, 7d avg, 30d avg, WoW%, MoM%, cumulative).
- Add `/api/downloads/daily/by-variant?timeframe=...` grouped by variant.
- Optional `/api/releases/annotations` for release markers.
- If migrating to GCS JSON (see cloud issue), compute/publish these JSON artifacts in the fetch job.
Acceptance Criteria
- KPI cards render with correct values across timeframes
- Chart shows variant breakdown option and release markers
- API endpoints (or GCS JSON) provide data efficiently
Tasks
- [ ] Define KPI calculations and API shape
- [ ] Implement overview endpoint (or JSON)
- [ ] Implement by-variant endpoint (or JSON)
- [ ] Add KPI card components and layout
- [ ] Add stacked area variant chart and toggles
- [ ] Add release annotations and CSV export
- [ ] Tests/validation against existing daily_summary
References
- Daily summary API: `app/api/downloads/daily/route.ts`
- Chart: `components/charts/daily-downloads-chart.tsx`
- Data sources: `daily_summary` and `asset_daily_stats` (or GCS equivalents)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with app/api/downloads/daily/route.ts, components/charts/daily-downloads-chart.tsx, and the daily_summary and asset_daily_stats sources. Review the existing daily summary behavior before defining the KPI and variant data shapes. Done means the requested KPI, variant, annotation, export, and toggle behavior is implemented and validated against the existing data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- analytics, api, data, full-stack
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100