https://github.com/makandz/myspotify
A website to view your Spotify stats.
https://github.com/makandz/myspotify
expressjs nextjs reactjs spotify spotify-web-api
Last synced: 5 months ago
JSON representation
A website to view your Spotify stats.
- Host: GitHub
- URL: https://github.com/makandz/myspotify
- Owner: makandz
- License: mit
- Created: 2018-05-22T02:35:42.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2025-10-03T23:30:02.000Z (9 months ago)
- Last Synced: 2025-10-03T23:30:25.549Z (9 months ago)
- Topics: expressjs, nextjs, reactjs, spotify, spotify-web-api
- Language: JavaScript
- Homepage: https://mySpotify.pw
- Size: 1.32 MB
- Stars: 45
- Watchers: 4
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NewTunes (formerly MySpotify)
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.
## Quick Start
1. Prerequisites
- Node.js 22+ and npm
- A Spotify Developer application (https://developer.spotify.com/dashboard)
2. 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`
3. Environment variables
Create a `.env.local` in the project root:
```bash
# 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/auth
```
Notes:
- `NEXT_PUBLIC_CLIENT_ID` and `NEXT_PUBLIC_REDIRECT_URL` are used by the client during the implicit grant redirect.
- `CLIENT_SECRET` is only needed when constructing the SDK server-side; no refresh tokens are stored.
4. Install and run
```bash
npm install
npm run dev
# Visit http://localhost:3000
```