This is a simple web application that displays the top 100 songs from the Spotify API. It uses React for the frontend and an Express server for the backend to fetch and display the song data.
- Fetches the top 100 songs from the Spotify API using the user's authentication token.
- Displays the list of songs along with their artists.
- Provides a clean and responsive user interface.
- Utilizes Tailwind CSS for styling.
- Clone the repository to your local machine:
git clone https://github.com/your-username/spotify-top-100-app.git
- Navigate to the project directory:
cd spotify-top-100-app
- Install dependencies for both the frontend and backend:
cd client
npm install
cd ../server
npm install
-
Create a Spotify Developer account and create a new application to obtain the client ID and client secret.
-
Update the
server/index.js
file with your Spotify client ID and client secret:
const passport = require('passport');
const SpotifyStrategy = require('passport-spotify').Strategy;
// ...
passport.use(new SpotifyStrategy({
clientID: 'YOUR_CLIENT_ID',
clientSecret: 'YOUR_CLIENT_SECRET',
callbackURL: 'http://localhost:4000/callback',
},
// ...
- Set the callback URL in your Spotify Developer Dashboard to match
http://localhost:4000/callback
.
- Start the backend server:
cd server
npm start
- Start the frontend development server:
cd client
npm start
-
Visit
http://localhost:3000
in your browser to see the app in action. -
Click on the "Login with Spotify" button to authenticate and see the list of top 100 songs.
Contributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.
This project is licensed under the MIT License.
Feel free to add more information to the README as needed, such as deployment instructions, troubleshooting tips, or any additional features you plan to implement.