Description
Add a typed fetch client wrapping calls to the backend's /analytics/* endpoints, using NEXT_PUBLIC_API_URL the same way other frontend API calls do, with a shared DateRange type mirroring the backend DTO.
Why this matters
Every dashboard widget needs a consistent, typed way to call the analytics API instead of ad-hoc fetch calls scattered across components.
Files to touch
frontend/src/lib/analytics/analytics-client.ts
Acceptance Criteria
Notes
This issue is part of the new analytics module effort (tracking, aggregation,
and reporting on player/game activity). Please keep new code inside
backend/src/analytics/ following the same module/controller/service/provider
layout used by existing modules (e.g. progress, streak, quests).
Description
Add a typed fetch client wrapping calls to the backend's
/analytics/*endpoints, usingNEXT_PUBLIC_API_URLthe same way other frontend API calls do, with a sharedDateRangetype mirroring the backend DTO.Why this matters
Every dashboard widget needs a consistent, typed way to call the analytics API instead of ad-hoc
fetchcalls scattered across components.Files to touch
frontend/src/lib/analytics/analytics-client.tsAcceptance Criteria
Notes
This issue is part of the new
analyticsmodule effort (tracking, aggregation,and reporting on player/game activity). Please keep new code inside
backend/src/analytics/following the same module/controller/service/providerlayout used by existing modules (e.g.
progress,streak,quests).