PartyPlaylist is a music sharing application that allows users to join a session as participants, where one of the participants will be the host of the session. The application will play the sound of the song from the host, allowing other participants to listen to the same music simultaneously. Each session will have a unique link that will be shared with participants to join the session. Participants will be required to login using their Google account.
-
Session creation: The host can create a new session and get a unique link to share with the participants.
-
Join session: Participants can join the session by clicking on the unique link, without needing to enter a session ID or password.
-
Google login: Participants will be required to login using their Google account.
-
Music playback: All participants will have the control to switch to different songs, adjust the volume, and skip to a specific part of the song.
-
Manage participants: The host can kick out participants from the session.
-
Playlist management: Participants can add songs to the playlist, remove songs from the playlist, and move songs up and down the playlist.
- Log in
- Log out
- Create a new session
- Join a session
- Add to playlist
- Remove from playlist
- Move song to top of the playlist
- Move song to bottom of the playlist
- Move song up one song
- Move song down one song
- Play/Pause the current song
- Play the next song
- Play the previous song
- Jump to a specific position in current song
- Kick out participant
- Find a new host
- End session
- Leave session
Expands
Actors: User
Trigger: The user clicks on the "Log in" button.
Preconditions: The user is not logged in.
Postconditions: The user is logged in.
Main Flow:
- The user clicks on the "Log in" button.
- The user is redirected to the login page.
- The user logs in using their Google account.
- The user is redirected back to the home page.
Expands
Actors: User
Trigger: The user clicks on the "Log out" button.
Preconditions: The user is logged in.
Postconditions: The user is logged out.
Main Flow:
- The user clicks on the "Log out" button.
- The user is logged out.
Expands
Actors: Host
Trigger: The host clicks on the "Create a new session" button.
Preconditions: The host is logged in.
Postconditions: A new session is created and the host is redirected to the session page.
Main Flow:
- The host clicks on the "Create a new session" button.
- The host is redirected to the session page.
Expands
Actors: Participant
Trigger: The participant enters the unique link to join the session.
Preconditions: The participant is logged in.
Postconditions: The participant is redirected to the session page.
Main Flow:
- The participant enters the unique link to join the session.
- The participant is redirected to the session page.
Expands
Actors: Participant
Trigger: The participant clicks "Add to playlist" button.
Preconditions: The participant is joined in the session.
Postconditions: The song is added to the playlist.
Main Flow:
- The participant clicks "Add to playlist" button.
- The participant enter a song url.
- The song is added at the bottom of the playlist.
Expands
Actors: Participant
Trigger: The participant clicks "Remove song from playlist" button.
Preconditions: The participant is joined in the session.
Postconditions: The song is removed from the playlist.
Main Flow:
- The participant clicks "Remove song from playlist" button.
- The participant selects a song to remove from the playlist.
- The song is removed from the playlist.
Expands
Actors: Participant
Trigger: The participant clicks "Move song to top of the playlist" button on the song item.
Preconditions: The participant is joined in the session.
Postconditions: The song is moved to the top of the playlist.
Main Flow:
- The participant clicks "Move song to top of the playlist" button on the song item.
- The song is moved to the top of the playlist.
Expands
Actors: Participant
Trigger: The participant clicks "Move song to bottom of the playlist" button on the song item.
Preconditions: The participant is joined in the session.
Postconditions: The song is moved to the bottom of the playlist.
Main Flow:
- The participant clicks "Move song to bottom of the playlist" button on the song item.
- The song is moved to the bottom of the playlist.
Expands
Actors: Participant
Trigger: The participant clicks "Move song up one song" button.
Preconditions: The participant is joined in the session.
Postconditions: The song is moved up one song.
Main Flow:
- The participant clicks "Move song up one song" button.
- The song is moved up one song.
Expands
Actors: Participant
Trigger: The participant clicks "Move song down one song" button.
Preconditions: The participant is joined in the session.
Postconditions: The song is moved down one song.
Main Flow:
- The participant clicks "Move song down one song" button.
- The song is moved down one song.
Expands
Actors: Participant
Trigger: The participant clicks "Play" button, "Pause" button, "Next" button, "Previous" button or clicks anywhere on the progress bar.
Preconditions: The participant is joined in the session.
Postconditions: The player is updated.
Main Flow:
-
The participant clicks "Play" button.
-
The player starts playing the song.
-
The participant clicks "Pause" button.
-
The player pauses the song.
-
The participant clicks "Next" button.
-
The player plays the next song in the playlist.
-
The participant clicks "Previous" button.
-
The player plays the previous song in the playlist.
-
The participant clicks anywhere on the progress bar.
-
The player jumps to the selected position in the song.
Expands
Actors: Participant
Trigger: The participant clicks "Next" button.
Preconditions: The participant is joined in the session.
Postconditions: The player plays the next song in the playlist.
Main Flow:
- The participant clicks "Next" button.
- The player plays the next song in the playlist.
Expands
Actors: Participant
Trigger: The participant clicks "Previous" button.
Preconditions: The participant is joined in the session.
Postconditions: The player plays the previous song in the playlist.
Main Flow:
- The participant clicks "Previous" button.
- The player plays the previous song in the playlist.
Expands
Actors: Participant
Trigger: The participant clicks anywhere on the progress bar.
Preconditions: The participant is joined in the session.
Postconditions: The player jumps to the selected position in the song.
Main Flow:
- The participant clicks anywhere on the progress bar.
- The player jumps to the selected position in the song.
Expands
Actors: Host
Trigger: The host clicks "Kick out" button
Preconditions: The host is joined in the session.
Postconditions: The participant is kicked out of the session.
Main Flow:
- The host clicks "Kick out" button.
- The participant is kicked out of the session.
Expands
Actors: System
Trigger: The host leaves the session.
Preconditions: The host is joined in the session and there are still participants in the session.
Postconditions: The system finds a new host.
Main Flow:
- The host leaves the session.
- The system finds a new host.
Expands
Actors: Host
Trigger: The host clicks "End session" button.
Preconditions: The host is joined in the session.
Postconditions: The session is ended.
Main Flow:
- The host clicks "End session" button.
- The session is ended.
Expands
Actors: Participant
Trigger: The participant clicks "Leave session" button or the session is ended.
Preconditions: The participant is joined in the session.
Postconditions: The participant leaves the session.
Main Flow:
- The participant clicks "Leave session" button.
- The participant leaves the session.
Alternative Flow:
- The session is ended.
- The participant leaves the session.
-
session-join - When a user joins a session (connect websocket).
-
session-leave - When a user leaves a session (disconnect websocket).
-
session-kick-out - When a user is kicked out of the session.
-
session-end - When a user ends the session.
-
session-find-new-host - When a user is kicked out of the session and the system finds a new host.
-
session-new-host-found - When a user is kicked out of the session and the system finds a new host.
-
queue-song-add - When a user adds a song to the playlist.
-
queue-song-remove - When a user removes a song from the playlist.
-
queue-move-song-top - When a user moves a song to the top of the playlist.
-
queue-move-song-bottom - When a user moves a song to the bottom of the playlist.
-
queue-move-song-up - When a user moves a song up one song.
-
queue-move-song-down - When a user moves a song down one song.
-
player-play - When a user plays a song.
-
player-pause - When a user pauses a song.
-
player-next - When a user plays the next song in the playlist.
-
player-previous - When a user plays the previous song in the playlist.
-
plyer-jump - When a user jumps to a specific position in the song.
POST users - usecase login
POST sessions - usecase create a new session
GET sessions/{code}
DELETE sessions/{code} - usecase end session
POST sessions/{code}/participants - usecase join a session
GET sessions/{code}/participants
DELETE sessions/{code}/participants/{userId} - usecase kick out participant, leave session
POST sessions/{code}/songs - usecase add to playlist
GET sessions/{code}/songs
PUT sessions/{code}/songs/{songId} - usecase move song to top of the playlist, move song to bottom of the playlist, move song up one song, move song down one song
DELETE sessions/{code}/songs/{songId} - usecase remove from playlist
CLIENT EVENT
"player.play" Play/Pause the current song
"player.pause" Play/Pause the current song
"player.next" play the next song,
"player.previous" play the previous song
"player.jump" jump to a specific position in current song
SERVER EVENT
"participant.leave"
"participant.join"
"player.play" Play/Pause the current song
"player.pause" Play/Pause the current song
"player.next" play the next song,
"player.previous" play the previous song
"player.jump" jump to a specific position in current song
"session.host.change"
To Be Determined Later: