Skip to content

Implement Analytics Module for Player and Puzzle Insights #38

@Mkalbani

Description

@Mkalbani

Description

Create an analytics module that aggregates and exposes data insights for both players and puzzle performance. Understanding how players interact with puzzles helps the game improve over time — which puzzles have high abandon rates, which are solved fastest, where players drop off. This module feeds dashboards and informs content decisions.

Acceptance Criteria

  • An analytics module is scaffolded at src/analytics/
  • GET /analytics/puzzles/:id returns solve rate, average time, average score, and hint usage rate
  • GET /analytics/player/:userId returns sessions played, puzzles solved, and average score
  • GET /analytics/overview (admin-only) returns platform-wide aggregates
  • Analytics are computed from raw session and score data — not manually maintained
  • Responses are cached for a configurable TTL to reduce DB load
  • Date range filtering is supported via from and to query params
  • Unit tests cover each analytics endpoint and cache behaviour

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions