Skip to content

Admin dashboard statistics endpoint #9

Description

@Martins0152

Description
Implement GET /api/v1/admin/dashboard, aggregating platform-wide stats: total users by role, total campaigns by status, total donations/distributions volume, and pending KYC count.

Acceptance Criteria

  • Restricted to ADMIN role only.
  • Returns counts for: users by role, campaigns by status, sum of confirmed donation amounts, sum of confirmed distribution amounts, pending KYC submissions count.
  • Queries are efficient (aggregate DB queries, not loading full tables into memory and counting in JS).
  • Response shape is documented with a concrete example in openapi.yaml.
  • At least one test verifies the shape and correctness of the aggregation against seeded data.

Suggested reward: $25-$35

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

    adminAdmin dashboardanalyticsAnalytics/reportingbackendBackend/API workmediumModerate complexity

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions