Implementation Plan - Phase 2: Views and Downloads Tracking (Publisher Dashboard)
Implementation Plan - Phase 2: Views and Downloads Tracking (Publisher Dashboard)
Implement time-series visualization and filtering for views and downloads on the publisher dashboard.
Proposed Changes
Frontend (Dashboard)
[MODIFY] site-card.tsx
- Display "Last 30 Days" views and downloads on each site card.
[NEW] stats-chart.tsx
- Implementation of a time-series chart component using
@tremor/react(already inpackage.json). - Fetch daily stats from
SiteStatvia a new tRPC query.
[NEW] dashboard-stats-page
- dedicated page for detailed site statistics.
- Allow users to toggle between different time periods (7d, 30d, 90d, All time).
Verification Plan
Manual Verification
- Navigate to the publisher dashboard.
- Verify that site cards show recent activity.
- Navigate to a site's stats page and verify the chart displays correctly for different time ranges.