1
0
Fork 0
polaris-task-force/src/scripts
Z8MB1E 268d4bb117 feat(analytics): add first-party analytics collector, SDK, rollups, and admin dashboard
Phase 1 of replacing Microsoft Clarity with first-party usage analytics:
- Plain Postgres tables via shared DDL module (src/lib/analytics/schema.ts)
  executed by both the add_analytics_tables migration and the test bootstrap;
  test-db.ts drops them around drizzle push (composite-PK introspector bug)
- /api/collect beacon collector with IP/UA enrichment, retroactive login
  attribution, bot blocklist, per-IP rate limiting, strict validation
- Client SDK (src/lib/client-analytics): SPA pageviews, clicks, scroll depth,
  focus, data-track visibility, heartbeats; NEXT_PUBLIC_ANALYTICS_DEV=1 dev
  gate with console mirror; mounted beside Clarity in the two frontend layouts
- Hourly rollup + daily retention bins (payload analytics-rollup/-purge)
- Chronicle read progress/completion, wiki new-clicked/created, minigame
  route mapping custom events
- admin:analytics:manage permission (+ roles enum migration) and the
  /admin/analytics Payload view with six recharts-backed report panels
2026-10-14 12:12:53 -04:00
..
lib feat(server): add stale presence monitoring 2026-08-26 18:05:57 -04:00
AGENTS.md docs(agents): split domain guidance into nested AGENTS.md files 2026-10-09 15:46:36 -04:00
analyticsPurge.ts feat(analytics): add first-party analytics collector, SDK, rollups, and admin dashboard 2026-10-14 12:12:53 -04:00
analyticsRollup.ts feat(analytics): add first-party analytics collector, SDK, rollups, and admin dashboard 2026-10-14 12:12:53 -04:00
awardTick.ts feat(awards): add award automation platform 2026-10-12 15:11:38 -04:00
baseTick.ts feat(base): add base tick bin for salaries, maintenance, and upkeep 2026-09-06 01:24:11 -04:00
bumpVersion.ts feat(version): add version bump script for CI deployments 2026-08-26 22:13:24 -04:00
economyTick.ts style: remove em-dashes from user-visible prose (wave 1) 2026-09-07 01:34:28 -04:00
gameTick.ts feat(logistics): timestamp shipment lifecycle with client relay 2026-09-20 02:43:29 -04:00
generateNextMission.ts fix(missions): default new main ops to the upcoming Saturday 2026-10-10 14:54:06 -04:00
generateVersionInfo.ts fix(version): compose version+commit label when git describe is unavailable 2026-09-06 17:23:03 -04:00
marketTick.ts style: remove em-dashes from user-visible prose (wave 1) 2026-09-07 01:34:28 -04:00
missionTick.ts feat(missions): auto-start and auto-complete ops, plus side-op scheduling 2026-10-03 03:29:35 -04:00
periodTick.ts feat(minigames): crown player of the month and year 2026-10-11 17:06:52 -04:00
run-migrations.ts style: remove em-dashes from user-visible prose (wave 1) 2026-09-07 01:34:28 -04:00
serverTick.ts feat(server): add stale presence monitoring 2026-08-26 18:05:57 -04:00