Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cheshire137/scrobble-saver
Last.fm top tracks => Spotify likes
https://github.com/cheshire137/scrobble-saver
golang lastfm lastfm-api music react spotify spotify-api spotify-web-api vite
Last synced: about 1 month ago
JSON representation
Last.fm top tracks => Spotify likes
- Host: GitHub
- URL: https://github.com/cheshire137/scrobble-saver
- Owner: cheshire137
- License: mit
- Created: 2023-12-17T19:18:31.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2023-12-24T21:24:30.000Z (11 months ago)
- Last Synced: 2024-10-05T07:50:31.070Z (about 1 month ago)
- Topics: golang, lastfm, lastfm-api, music, react, spotify, spotify-api, spotify-web-api, vite
- Language: TypeScript
- Homepage:
- Size: 2.07 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Scrobble Saver
A web app that uses the [Last.fm API](https://www.last.fm/api) and the [Spotify API](https://developer.spotify.com/documentation/web-api) to like tracks on Spotify that are your top tracks on Last.fm.
![screenshot](./screenshot-2023-12-23.png)
## How to develop
Create a [Last.fm API app](https://www.last.fm/api/account/create). Set `http://localhost:8080/auth/lastfm` as the redirect URL.
Create a [Spotify API app](https://developer.spotify.com/dashboard/create). 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.
```sh
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](https://randomkeygen.com/) for "secret" in config.yml.
```sh
go run cmd/server/main.go
```### Frontend
The UI is a React app using Vite.
```sh
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.
```sh
npm install
npm run dev
```