Add per-episode play tracking with bar chart in admin analytics

- POST /api/analytics/play records a play event (title + date) on first
  play per player mount, skipping admin sessions
- Plays persisted to data/episode-plays.json with total + byDay buckets
- Admin stats response includes episodePlays sorted by total plays
- AnalyticsPanel shows horizontal bar chart + summary cards for all
  episodes dynamically — new episodes appear automatically as played

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmert
2026-06-17 13:39:35 -04:00
parent 54bc7b28da
commit 8450d81e7f
9 changed files with 129 additions and 2 deletions
+8
View File
@@ -7896,6 +7896,14 @@
margin-bottom: 1.5rem;
}
.admin-stats-chart-wrap {
background: #0e0e0b;
border: 1px solid rgba(201, 168, 76, 0.15);
border-radius: 10px;
padding: 1.25rem 1.25rem 1rem;
position: relative;
}
/* ── Admin: Study Users ── */
.admin-study-users-list {