Discover your top tracks, artists, and recent listens from Spotify. Filter by last month, six months, or all time and share your profile with friends. No server-side storage - your access token stays in a cookie on your device.
- Prerequisites
- Node.js 22+ and npm
- A Spotify Developer application (https://developer.spotify.com/dashboard)
- Configure your Spotify app
- In your Spotify app settings, add a redirect URI for development:
http://localhost:3000/auth - Scopes required:
user-top-read user-read-recently-played
- Environment variables
Create a .env.local in the project root:
# Spotify app credentials
NEXT_PUBLIC_CLIENT_ID=your_spotify_client_id
CLIENT_SECRET=your_spotify_client_secret
# Where Spotify should send users after auth (must match your app settings)
# For local dev you can omit this — the app defaults to window.origin + /auth
NEXT_PUBLIC_REDIRECT_URL=http://localhost:3000/authNotes:
NEXT_PUBLIC_CLIENT_IDandNEXT_PUBLIC_REDIRECT_URLare used by the client during the implicit grant redirect.CLIENT_SECRETis only needed when constructing the SDK server-side; no refresh tokens are stored.
- Install and run
npm install
npm run dev
# Visit http://localhost:3000