Description
Add a controller route GET /analytics/users/retention exposing the retention curve. Validate query params with a DTO (class-validator), guard the route with AnalyticsAdminGuard where the data is sensitive, and delegate the computation to get-retention-curve.provider.ts.
Why this matters
This is the API surface the analytics dashboard (frontend) and any external reporting tools will consume for 'the retention curve'.
Files to touch
backend/src/analytics/analytics.controller.ts
backend/src/analytics/providers/get-retention-curve.provider.ts
backend/src/analytics/dtos/analytics-query.dto.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 controller route
GET /analytics/users/retentionexposing the retention curve. Validate query params with a DTO (class-validator), guard the route withAnalyticsAdminGuardwhere the data is sensitive, and delegate the computation toget-retention-curve.provider.ts.Why this matters
This is the API surface the analytics dashboard (frontend) and any external reporting tools will consume for 'the retention curve'.
Files to touch
backend/src/analytics/analytics.controller.tsbackend/src/analytics/providers/get-retention-curve.provider.tsbackend/src/analytics/dtos/analytics-query.dto.tsAcceptance Criteria
GET /analytics/users/retentionreturns a 200 with the documented response shapebackend/test/analytics.e2e-spec.tsNotes
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).