Built primarily to learn Go and solve a personal need. This app converts music playlists between platforms. It currently supports conversions between Spotify & YouTube Music. Conversion from Apple Music coming soon
cd your-repo
go mod tidy
Set up the required environment variables in internal/env/.env
Start the API server:
go run cmd/app/main.go
verify playlist url -> authorize -> convert
Description: Initiates the authentication flow with Spotify.
Status: 307
Response: Temporary redirect to the Spotify authorization page.
Description: Callback endpoint for Spotify authentication.
Status: 302
Response: Redirect to the UI
Description: Initiates the authentication flow with YouTube.
Status: 307
Response: Temporary redirect to the YouTube authorization page.
Description: Callback endpoint for YouTube authentication.
Status: 302
Response: Redirect to the UI
Description: Verify if a playlist URL is valid.
Method: GET
Query Parameter: url - The URL of the playlist to verify.
Response: JSON data with verification result.
Example Response
{
"isPlaylistValid": true,
"supportedConversions": ["spotify", "apple-music"],
"playlistData": {
"url": "string",
"thumbnailUrl": "string",
"tracks": [],
"playlistName": "string",
"playlistTracksCount": 5,
"source": "string"
}
}
Description: Preview the playlist to be converted.
Session Required: Yes
Response: JSON data containing the preview of the converted playlist.
Description: Start the playlist conversion process.
Session Required: Yes
Request Body : {"title" : "string"}
Status: 201 Created
Response Body: JSON data containing the new URL of the converted playlist or an error message.
Description: Start the playlist conversion process and stream process.
Session Required: Yes
Query Parameter: title - The title of the converted playlist.
Response Content-Type: text/stream
Example Response
event: info
data: "string"
event: error
data: "string"
event: track_search
data: "{"message": "string","track": "{trackObj}","status": "string","success":bool}"
event: done
data: {"message": "string", "info": "{"tracks_found": 0, "tracks_not_found": 0, "conversion_successful": bool}"}