A simple web application that replicates the experience of Spotify Wrapped, displaying your most-played songs, artists, and other statistics based on your Spotify listening history.
- View your top songs and artists
- Interactive and responsive design
- Clean and simple user interface
- Displays personalized music statistics
- Integration with the Spotify API
Before you begin, ensure you have the following installed on your system:
- Node.js (v16 or later)
- npm or yarn
- A Spotify Developer Account
Clone the Project
git clone https://github.com/cesarpizarra/spotify-wrapped
Navigate to the Project Directory
cd spotify-wrapped
Install dependencies
npm install
Create a .env file in the root of your project and add the following variables:
DB_HOST=your-host
DB_USER=your-user
DB_PASSWORD=your-password
DB_NAME=your-db-name
SPOTIFY_CLIENT_ID=your-spotify-client-id
SPOTIFY_REDIRECT_URI=your-spotify-redirect-uri
SPOTIFY_CLIENT_SECRET=your-spotify-client-secret
SESSION_SECRET=your-session-secret
Start the app
npm run dev
Visit http://localhost:3000 in your browser!
To integrate Spotify API, follow these steps:
-
Create a Spotify Developer Account
- Go to Spotify for Developers
- Log in or sign up for a Spotify Developer Account.
-
Create a New App
- Navigate to the Dashboard and click Create an App.
- Fill out the form with your app's name and description.
-
Configure Redirect URIs
- Go to your app's settings.
- Add your redirect URI under Redirect URIs (e.g., http://localhost:3000/callback).
-
Get Your Client ID and Secret
- In your app settings, you'll find the Client ID and Client Secret.
- Copy these and add them to your .env file.
-
Enable the Required Scopes When making requests to the Spotify API, ensure your app requests the following scopes:
- user-read-private - user-read-email - user-top-read - user-read-currently-playing
- Fork it!
- Create your feature branch:
git checkout -b new-branch
- Commit your changes:
git commit -m 'Add some branch'
- Push to the branch:
git push origin new-branch
- Submit a pull request :D
This project is licensed under the MIT License.
Special thanks to the Spotify Developer API for making this app possible.