WARNING: Unfortunately, due to API limitations recently imposed by Spotify (fuck Spotify, for real), the deployed version of this project isn't able to service more than 25 users at a time. This means your only real option for usage is to locally deploy the application, instructions for which can be found at the bottom of this README.
Playgrate is a web app built using Svelte, Flask, Spotipy, BeautifulSoup, and a few other tools that simplifies transferring your playlists between popular music services (Spotify, Apple Music, the likes).
Ever transitioned from using one music service to another? It's generally an absolute pain to try desperately to reconstruct your playlists on whatever new service your job gave you a discount for this week, only to end up giving up and starting a new one (maybe it's for the best - you and your anime music had to grow apart).
My personal playlist has reached 80 hours of music already, so I know that, if I had to transition services right now, I'd probably just skip the headache and cut my ears off without a tool like Playgrate. Playgrate will feature an intuitive user experience that makes it as easy and simple as it should be to transfer playlists: just select your origin, destination, and the playlist.
- Integrate Svelte with Flask
- Make underlying back-end modules (need to interface with Apple Music first)
- Design and implement user interface
- Weave together front and back end
- User testing
- Deploy!
Unfortunately, because Spotify sucks and hates young devs like me, the only real option for usage of Playgrate is local deployment. Fear not - I will make the process as painless as possible. Make sure your system has the following prerequisites:
NPM is necessary for building the SvelteKit side of things, Python is the actual server. Then, clone this repo.
You'll need to go to the Spotify developer dashboard and generate some keys for the API. Log into your Spotify account and go through the process for creating a new app. Name it whatever you want. Then, click on your new app in the dashboard. Make a new file in the project's root directory called .env, and copy your app's Client ID and Client Secret in the following format:
CLIENT_ID="your-client-id-here"
CLIENT_SECRET="your-client-secret-here"
FLASK_SECRET_KEY="whatever-long-unique-code-you-want"
"
Then, add http://localhost:5000 as a Redirect URI in your app settings, and you're good to go!
From the project's root directory, run the following to set up your Python virtual environment (a self-contained environment for packages).
python3 -m venv .venv
Use the included requirements.txt file to easily install the Python packages required.
.venv\Scripts\pip.exe install -r requirements.txt
.venv/bin/pip install -r requirements.txt
Installing the required NPM packages is easy too:
cd client
npm install
Run the following command (from the project root) to generate the static site:
npm run build --prefix client
And then serve it by simply running the following:
.venv\Scripts\python.exe main.py
.venv/bin/python main.py
