Skip to content

Add genre-based song browsing endpoint #78

Description

@Akatenvictor

What

Add a genre-based browsing endpoint that returns songs filtered by genre with pagination and sorting options.

Why

Discoverability is critical for an audio platform. Users need to browse content by genre to find music they enjoy, and the current API provides no genre-based filtering.

Scope

  • In: New GET /api/genres/:id/songs endpoint, genre listing endpoint, pagination support
  • Out: Genre recommendation engine, sub-genre taxonomy, mood-based tagging

Acceptance Criteria

  • GET /api/genres returns all available genres with song counts
  • GET /api/genres/:id/songs returns songs in that genre with pagination
  • Supports sort by: newest, most played, alphabetical
  • Pagination via query params: page, limit (default 20, max 100)
  • Response includes total count for client-side pagination
  • Genre entity properly linked to Song entity via foreign key

Technical Context

  • Genre entity exists in src/entities/Genre
  • Song entity should have genre_id foreign key
  • SongService can be extended with genre filtering
  • SongController needs the genre-based methods
  • SongRoutes needs the new routes

Metadata

Metadata

Assignees

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