Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.
/ spotilizer Public archive

Study Go through using Spotify API & Redis to manage personal playlists, tracks, etc. 🔦

License

Notifications You must be signed in to change notification settings

2beens/spotilizer

Repository files navigation

🎶 spotilizer

Build Status GitHub license golangci-lint Maintenance made-for-VSCode

Study golang through using Spotify API and Redis.

A small project which aims to help managing personal Spotify lists and tracks, but mostly to do what I love to do and study Go in the process.

Came to my mind that I could find this useful, having a history/snapshots of my Spotify Data, because a lot of times it hapens that I screw up my lists (by removing a song from fav songs list), without ability to undo the operation, and also not remembering the name of the removed song. Sadly, Spotify Desktop/Browser Client App does not have undo for that operation. Also, in the future, it can be made to transfer playlists from other Music Services like Deezer, YouTube, etc.

🔧 Install & Run

1️⃣ Set Spotify App

Make sure you have a Spotify App, through which spotilizer interacts with Spotify API. That goes out of this scope, so not gonna explain that here. It's all nicelly explained at this location:

https://developer.spotify.com/documentation/web-api/

After Spotify App is created, now we need to 2 set env. variables like so:

export SPOTIFY_CLIENT_ID=<your_spotify_app_client_id_here>
export SPOTIFY_CLIENT_SECRET=<your_spotify_app_client_secret_here>

2️⃣ Redis - install and start service

Make sure Redis is installed, up and running. See: https://redis.io/

Maybe more convenient, you can also install and run it using brew:

brew install redis

Then just run the service :

brew services start redis

Spotilizer uses default Redis setup, so just starting the service is enough.

3️⃣ Get Spotilizer

Make sure golang is properly installed and set: https://golang.org/doc/install

go get github.com/2beens/spotilizer`
cd $GOPATH/src/github.com/2beens/spotilizer`
go get ./...

Next, we need to get frontend dependencies via PMS yarn, which should be installed on your machine: https://yarnpkg.com/en/docs/install

We are still in the spotilizer project dir, now run:

yarn install

4️⃣ Run Spotilizer

go install
spotilizer

By default, logger output is terminal (can be changed to file. see source code main.go for more info).

5️⃣ Web Client

👉 Open browser (Chrome, ofc) and go to: http://localhost:8080

👉 Click at just about anything you see there 💥

👉 Observe terminal output for what happens in the server

🔎 Testing, Static code analysis ...

Linter

golangci-lint is used. Make sure it's installed: GolangCI Lint Installation.

Run it like so:

golangci-lint run

Unit Tests

Still work in progress, thus not many unit tests exists. Nevertheless:

go test -v -cover ./...

About

Study Go through using Spotify API & Redis to manage personal playlists, tracks, etc. 🔦

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published