Skip to content

Create contributor scoring REST endpoint #4

Description

@AbdulSnk

Overview

The StreamForge API needs an endpoint that exposes contributor scoring data to downstream services and the frontend dashboard.

What needs to be done

  • Create a scoring module inside src/
  • Implement a GET /scoring/:contributor endpoint that returns:
    • contributor (string)
    • total_score (number)
    • breakdown (array of events and their individual scores)
  • Connect the endpoint to the scoring logic from StreamForge Core
  • Return proper HTTP status codes:
    • 200 on success
    • 404 if contributor not found
    • 400 for malformed requests

Acceptance Criteria

  • GET /scoring/:contributor endpoint exists and responds correctly
  • Returns correct JSON structure
  • Handles contributor not found with 404
  • Input validation is in place
  • At least one integration test covers the happy path

Notes

Use NestJS conventions — controller, service, and module pattern. Keep the service layer separate from the controller.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions