This project is a music player built using React.js that integrates with the Spotify API. The app allows users to search for songs, play music, and browse playlists directly from the Spotify platform. It offers a user-friendly interface inspired by modern music streaming services.
- Search Music: Search for your favorite songs, albums, and artists.
- Browse Playlists: Explore playlists and tracks.
- Play Music: Stream music directly from Spotify.
- Responsive Design: Mobile-friendly, responsive UI.
- Authentication with Spotify: Login with your Spotify account to access personalized features.
- Player Controls: Play, pause, skip, and adjust volume.
To get a local copy up and running, follow these simple steps.
- Node.js installed on your local machine.
- Spotify Developer Account for API credentials.
- A modern web browser.
- Go to the Spotify Developer Dashboard and create a new app.
- Note down the Client ID and Client Secret.
- Set up your Redirect URI in the Spotify app settings (e.g.,
http://localhost:3000/callback
).
- Clone the repository:
git clone https://github.com/yourusername/react-music-player-spotify.git
- Navigate to the project directory:
cd react-music-player-spotify
- Install the dependencies:
npm install
- Create a .env file in the root of project to add Spotify API credentials:
REACT_APP_SPOTIFY_CLIENT_ID=your_client_id REACT_APP_SPOTIFY_CLIENT_SECRET=your_client_secret REACT_APP_SPOTIFY_REDIRECT_URI=http://localhost:3000/callback
- Start the development server
npm start
6.Open http://localhost:3000 in your browser to see the app.
- React.js: Frontend library.
- Spotify Web API: For fetching music data.
- Axios: For making HTTP requests.
- React Router: For handling navigation.
- CSS/SCSS: For styling the app.
- Node.js: For the development environment.
- Spotify Auth: OAuth authentication with Spotify.
This project is licensed under the MIT License.
- Spotify for Developers for the API.
- Open-source libraries used in this project.