scrobble-saver

module
v0.0.0-...-a8d8f77 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2023 License: MIT

README

Scrobble Saver

A web app that uses the Last.fm API and the Spotify API to like tracks on Spotify that are your top tracks on Last.fm.

screenshot

How to develop

Create a Last.fm API app. Set http://localhost:8080/auth/lastfm as the redirect URL.

Create a Spotify API app. Set http://localhost:8080/auth/spotify as the redirect URL. Select the 'Web API' as the API your app will use.

Backend

The backend is a Go server written using Go version 1.19.4.

cp config.yml.example config.yml

Add your Last.fm API key and secret to config.yml, as well as your Spotify client ID and client secret. Make sure the backend port matches the redirect URLs you set on Spotify and Last.fm. Come up with a new secret, such as from randomkeygen.com for "secret" in config.yml.

go run cmd/server/main.go
Frontend

The UI is a React app using Vite.

cd ui
cp .env.example .env

Add your Last.fm API key to .env, as well as your Spotify client ID. Last.fm and Spotify secrets should not be in .env.

npm install
npm run dev

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL