Add self-hosted usage analytics: pageview tracking + admin stats dashboard

Records pageviews (path, referrer, browser/OS/device, IP, GeoIP country) via
a POST /api/track beacon into a new PageView table, and exposes aggregated
daily/breakdown stats behind a token-gated GET /api/admin/stats endpoint with
brute-force lockout. Frontend gets a /admin dashboard (charts + breakdown
tables) built on recharts, with a switchable per-day pageviews chart.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
timandClaude Sonnet 5 committed 2026-07-01 19:43:10 +02:00
1 parent c59dca754f
commit 0845562a21
17 files changed
+1386 -18

No files matched your search

+1
View File
@@ -6,3 +6,4 @@ __pycache__/
frontend/node_modules/
frontend/dist/
frontend/.vite/
geoip/*.mmdb