Next.js application using Spotify API for user listening habbits and statistics.
https://spotistats.vercel.app/
- Playlist creation
- Time frame selection
POST /api/time-range-tracks
Parameter | Type | Description |
---|---|---|
range |
string |
Required. Specified time range for tracks fetching |
token |
string |
Required. Users Spotify access token |
POST /api/color
Parameter | Type | Description |
---|---|---|
array of songs |
array |
Required. Array of songs Spotify API returns |
POST /api/create-playlist
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Spotify user id |
token |
string |
Required. Users Spotify access token |
array of songs |
array |
Required. Array of songs Spotify API returns |
name |
string |
Required. Playlist name |
Description |
string |
Playlist description |
Takes Spotify API endpoint and access token and returns the fetched data.
Takes Spotify API endpoint, access token and data object and posts the data to the Spotify API & returns the response.
Takes miliseconds and converts them to minutes and second.
Takes an array of RGB values [${r}, ${g}, ${b}]
and converts it to rgb(${r}, ${g}, ${b})
.
Takes an image url and returns the dominant color.
To run this project, you will need to add the following environment variables to your .env file
SPOTIFY_CLIENT_ID
SPOTIFY_CLIENT_SECRET
Client: Next.js, SCSS, Framer Motion
Server: Node
Switched from Material-UI to custom SCSS for a ~50% reducuction to bundle size.
Clone the project
git clone https://github.com/mislavjc/spotistats.git
Go to the project directory
cd spotistats
Install dependencies
npm install
Start the server
npm run dev