Visualize your Spotify listening habits with beautiful charts and stats
- 🎤 Top Artists — Your most listened artists with popularity scores
- 🔥 Top Tracks — Your favorite tracks with audio preview player
- 🎸 Genre Breakdown — Beautiful donut chart of your music genres
- 📈 Popularity Chart — How mainstream is your taste?
- 🕐 Recently Played — Your listening timeline
- 🎯 Music DNA — Fun stats: taste label, hidden gems, unique artist count
- ⏱️ Time Ranges — Compare Last 4 Weeks vs 6 Months vs All Time
- 🎧 Track Preview — Listen to 30-second previews right in the dashboard
- Clone this repo
- Add your Spotify Client ID
- Open with Live Server
- Connect your Spotify account
- Go to developer.spotify.com/dashboard
- Click "Create App"
- Fill in:
- Name:
SpotifyStats - Redirect URI:
http://localhost:5500/(or your Live Server URL) - Check Web API
- Name:
- Save and copy your Client ID
Open js/auth.js and replace the placeholder:
const CLIENT_ID = 'YOUR_CLIENT_ID_HERE'; // ← paste your Client ID hereOption A — VS Code Live Server (recommended):
- Install the "Live Server" extension in VS Code
- Right-click
index.html→ "Open with Live Server"
Option B — Python HTTP Server:
cd SpotifyStats
python3 -m http.server 5500
# Open http://localhost:5500Option C — Any HTTP Server:
npx serve .
⚠️ You MUST use a local server (notfile://). OAuth won't work withfile://protocol.
SpotifyStats/
├── index.html # Main page
├── css/
│ └── style.css # Dark glassmorphism styling
├── js/
│ ├── auth.js # Spotify OAuth PKCE flow
│ ├── api.js # Spotify API wrapper
│ ├── charts.js # Chart.js visualizations
│ └── app.js # Main app logic
└── README.md
- Spotify Web API — OAuth 2.0 PKCE (no backend needed)
- Chart.js — Beautiful, responsive charts
- Vanilla JavaScript — No frameworks
- CSS3 — Glassmorphism, animations, responsive grid
Works on desktop, tablet, and mobile!
MIT License — feel free to use and modify.
Made with ❤️ by Gaurav Kumar Pandey