Skip to content

feat: add playlist entity and CRUD API (Closes #77) - #227

Merged
Akatenvictor merged 2 commits into
AudioBitsStellar:mainfrom
achiever2110:feat/issue-77-playlists
Aug 26, 2026
Merged

feat: add playlist entity and CRUD API (Closes #77)#227
Akatenvictor merged 2 commits into
AudioBitsStellar:mainfrom
achiever2110:feat/issue-77-playlists

Conversation

@achiever2110

Copy link
Copy Markdown
Contributor

Summary

Adds a Playlist entity and full CRUD API allowing users to create, update, delete, and reorder playlists of songs.

Closes #77

Changes

  • Entities: Playlist, PlaylistSong (join table with ordering)
  • Migration: 1753200000004-AddPlaylistEntities creates playlists and playlist_songs tables
  • Service: PlaylistService — CRUD, song add/remove, reordering, ownership enforcement
  • Controller/Routes: PlaylistController + routes under /api/playlists
    • POST /api/playlists — create
    • GET /api/playlists — list mine (paginated)
    • GET /api/playlists/:id — playlist with songs ordered by position
    • PUT /api/playlists/:id — update metadata
    • DELETE /api/playlists/:id — delete
    • POST /api/playlists/:id/songs — add song
    • DELETE /api/playlists/:id/songs/:songId — remove song
    • PUT /api/playlists/:id/reorder — reorder songs
  • Users can only modify their own playlists; private playlists are owner-only

Tests

  • PlaylistService unit tests (18) and PlaylistController tests (12), all passing

Acceptance Criteria

  • CRUD endpoints: POST/GET/PUT/DELETE for playlists
  • POST /api/playlists/:id/songs to add a song, DELETE to remove
  • GET /api/playlists/:id returns playlist with ordered songs
  • Users can only modify their own playlists
  • Playlists support ordering/reordering of songs
  • Database migration for Playlist and PlaylistSong entities
  • Unit tests for PlaylistService
  • Integration tests for playlist endpoints

Introduce playlists with song association and ordering: Playlist and
PlaylistSong entities, database migration, PlaylistService, controller,
and routes under /api/playlists. Playlist owners can create, update,
delete, add/remove songs, and reorder them; private playlists are only
visible to their owner. Covered by unit tests for the service and
controller.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@achiever2110 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Akatenvictor
Akatenvictor merged commit 40e227c into AudioBitsStellar:main Aug 26, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add playlist entity and CRUD API

2 participants