playlist+last.fm+spotify
A modern React + TypeScript webapp that visualizes your Spotify playlist stats combined with last.fm data.
Site URL: https://playlastify.web.app/
- Spotify OAuth Authentication - Secure login to access your playlists
- Current Playback Display - Shows what you're currently listening to with detailed audio features
- Playlist Analysis - Comprehensive statistics and visualizations for any playlist
- Last.fm Integration - Optional scrobbling data to see your listening history
- Audio Features Radar Chart - Visual representation of track characteristics using Google Charts
- Genre Analysis - Word clouds showing genre distributions using AnyChart
- Date Analytics - Charts showing when tracks were added and released
- Artist Distribution - Pie charts of your top artists using Google Charts
- Search & Sort - Powerful search with sortable results and exact match options
So there are tons of Spotify or last.fm stats websites out there, but what about combining the 2? This webapp is focused on your playlists mainly. Login and enter one of your playlists' name, and you'll see some pretty detailed stats of the playlist, including audio features radar chart, genre word cloud, date added/released line chart, artists pie chart and more. And if you enter your last.fm username, you'll also see the last.fm scrobbling stats of your playlist and tracks! You'll see your most played songs, and you can also search and sort anything in your playlist (like you do in Spotify) and find out how many times you've listened to your songs!
TODO: add screenshots of the redesigned version
Enter your last.fm username, select the range of date, and your scrobbling data will be loaded.
Details of the song you're currently playing, including scrobbles if you've entered your last.fm username.
Details of the playlist you've entered, including total scrobbles if you've entered your last.fm username.
Line chart of the added date (the date the song is added to this playlist) & released date (the date the song is released) of the songs in your playlist.
Your top artists.
So Spotify's classification of genres is pretty specific. You may see something like "australian alternative pop" for example, but "australian alternative pop" is still pop, isn't it? So this webapp will generate 2 kinds of genre cloud for you. The first is a word cloud from the genres of the artists in your playlist. The second is a word cloud from EACH WORD of your genres. For example, if you have 3 tropical house, 3 progressive house, 3 indie house & 3 house in your playlist, the 2nd word cloud will display "house" for the quantity of 12, which basically translate to a word cloud of the big genres of your playlist!
Leave it blank to show everything in this playlist. Click any column title to sort (like you do in Spotify desktop). Will also show the total scrobbles of the results if you have entered your last.fm username.
- Frontend: React 18 + TypeScript + Vite + Tailwind CSS
- Charts: Google Charts (radar/pie) + AnyChart (word clouds) + Recharts (line charts)
- Backend: Django + Docker + GCP Cloud Run
- Hosting: Firebase Hosting (frontend) + GCP Cloud Run (backend)
- Node.js 18+ and npm
- Python 3.8+ and pip
- Git
# 1. Clone and setup
git clone https://github.com/dlccyes/playlastify.git
cd playlastify
npm install
pip install -r requirements.txt
# 2. Create .env file with your API credentials
echo "CLIENT_ID=your_spotify_client_id" > .env
echo "CLIENT_SECRET=your_spotify_client_secret" >> .env
echo "REDIRECT_URI=http://localhost:5173" >> .env
echo "LASTFM_API_KEY=your_lastfm_api_key" >> .env
# 3. Start both servers
npm run dev # Terminal 1: Frontend on http://localhost:5173
python manage.py runserver # Terminal 2: Backend on http://localhost:8000
Need Spotify API credentials? Get them here and add http://localhost:5173
to Redirect URIs.
CLIENT_ID=your_spotify_client_id
CLIENT_SECRET=your_spotify_client_secret
REDIRECT_URI=http://localhost:5173
LASTFM_API_KEY=your_lastfm_api_key
# .env.development
VITE_API_BASE_URL=http://localhost:8000
# .env.production
VITE_API_BASE_URL=
npm run dev # Development
npm run build # Production build
npm run preview # Preview production build
npm run type-check
playlastify/
βββ src/ # React frontend
β βββ components/ # React components
β βββ hooks/ # Custom React hooks
β βββ utils/ # Utility functions
β βββ types/ # TypeScript definitions
β βββ App.tsx # Main component
βββ main/ # Django backend
βββ public/ # Static assets
βββ package.json # Dependencies
# Terminal 1: Frontend
npm run dev
# Terminal 2: Backend
python manage.py runserver
- Backend: Django container deployed to GCP Cloud Run via
Dockerfile
- Frontend: React app built and pushed to
gh-pages
branch, then deployed to Firebase Hosting
- Code Push β
main
branch - Backend: GCP Cloud Run auto-deploys container
- Frontend: GitHub Action builds and pushes to
gh-pages
, Firebase auto-deploys
- Workflow:
.github/workflows/deploy.yml
- Trigger: Push to
main
branch - Steps: Install β Build β Push to gh-pages β Firebase auto-deploys
- Hosting:
firebase.json
and.firebaserc
- URL:
https://playlastify.web.app
- Container Build Failures: Check Dockerfile and requirements.txt
- Environment Variables: Ensure all required vars are set in Cloud Run
- Build Failures: Check TypeScript errors with
npm run type-check
- CORS Issues: Verify backend URL configuration
- GitHub Actions: Check workflow runs in
.github/workflows/deploy.yml
- Port Conflicts:
lsof -ti:5173 | xargs kill -9
(frontend) orlsof -ti:8000 | xargs kill -9
(backend) - Node Issues:
rm -rf node_modules package-lock.json && npm install
- Build Errors:
rm -rf dist/ && npm run build
# Backend container
docker build -t playlastify-test .
docker run -p 8000:8000 playlastify-test
# Frontend build
npm run build
ls -la dist/
# Environment check
cat .env.development
cat .env.production
- Spotify Web API for music data
- Last.fm API for scrobbling data
- Google Charts and AnyChart for visualizations