Skip to content

. Add GET /api/v1/courses/:id/leaderboard endpoint #311

Description

@DeFiVC

What: Add a per-course leaderboard showing top performers by quiz score.

Why: Course-level competition drives engagement. Users want to see how they rank against others taking the same course.

Scope: Create endpoint that queries quiz submissions for a specific course, aggregates scores per user, and returns top 20 with rank, displayName, and average score.

Acceptance criteria:

  • Returns top 20 users for a specific course
  • Sorted by average quiz score
  • Includes number of quizzes taken
  • Cached for 5 minutes

Technical context: src/modules/quizzes/quiz.service.ts — quiz queries. src/database/schema.ts:113-142 — quizSubmissions.


Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions