PlayFy is a web application where spotify users can see some interesting stats of their public playlists:
- Top 5 Artists;
- Top 5 Albums;
- Most Popular Track;
- Longest Track;
- Shortest Track.
All you need to do to see these stats is login in with Spotify and input the playlist link.
IMPORTANT:
- Send me a message with your Full Name and Spotify e-mail, in order for you to use the application. My Linked-In: https://www.linkedin.com/in/victor-leaoo/
- The playlist link must be the one present at the share option on the Spotify PC App or Spotify open in a browser. As shown below:
For running it locally, it's necessary to change REACT_APP_MODE for "local" at frontend/src/App.js
(line 13) and at frontend/src/components/statsComponents/SpotifyLogin.js
(line 3).
To run PlayFy with Docker (assuming you already have it installed), follow the steps:
- Inside the repo root folder (the one with the docker-compose.yml file), run:
docker compose up --build
. The--build
is necessary only the first time you run it, from the second time ahead, you are able to run the app withdocker compose up
. - Wait until the Docker starts running and access PlayFy at the url
localhost:3000
.
Running Python (back-end):
- Enter the
/backend
folder. - Install the required libraries by using:
pip install -r requirements.txt
. - Run the fastapi application:
python3 main.py
.
Running React/NPM (front-end):
- Enter the
/frontend
folder. - Run the command:
npm install
. - Run the React application:
npm start
.
With both above running, you are able to access PlayFy at the url localhost:3000
.
All used endpoints, either from the Spotify API or the one created for the back/front-end communication are documented at: endpoints.
Python was the language used for the back-end development. The fastapi was the framework used for the endpoint creation.
Further, pandas was widely used for data manipulation.
React (JavaScript) was the framework used for the front-end.
Docker was the tool applied to make the deployment easier.
Feel free to fork this project and improve it. If you make any modification on it and wants to share it with me, I'm all ears. :)
It was my first time using React and creating a full-stack project (especially when it comes to front-end), so more experienced developers might find something that can be better done.