Skip to content

3. Add GET /api/v1/courses/:id/enrollment-trends endpoint (admin) #406

Description

@DeFiVC

What: Add an admin endpoint that returns enrollment trends for a specific course over time.

Why: Course creators need to understand enrollment patterns to optimize marketing and content updates.

Scope: Create endpoint that queries enrollments grouped by day/week/month. Return time series data with enrollment counts. Support different time ranges (7d, 30d, 90d).

Acceptance criteria:

  • Returns enrollment trends over time
  • Supports different time ranges
  • Includes daily/weekly/monthly granularity
  • Cached for 1 hour

Technical context: src/database/schema.ts:63-84 — enrollments table. src/modules/courses/course.service.ts — course queries.


Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions