Skip to content

NayanUnni95/Spotify

Repository files navigation

Spotify Client Web App

GitHub repo size GitHub License

This repository contains a Spotify Clone Web App built using ReactJS and the Spotify Web API. The app is designed for fetches data through a personal Spotify account. This project focuses on the frontend functionality, including data fetching, authentication, but does not include the music playback feature.

Features

  • User authentication using Spotify OAuth
  • Fetching and displaying user playlists, albums, liked songs, artists, podcast details and tracks.
  • Viewing track details
  • Responsive design
  • Modern UI with ReactJS

Technology used

  • ReactJS (JavaScript)
  • Spotify Web API
  • CSS (for styling)

Installation

Prerequisites
  • Node.js and npm installed on your machine
  • A Spotify Developer account with a registered application
Steps
  1. Clone the Repository
git clone https://github.com/NayanUnni95/Spotify.git
cd Spotify
  1. Install Dependencies
Install the required dependencies using npm:
npm install
  1. Create a Spotify Developer Account and Register an App
  1. Set Up Environment Variables
Create a .env file in the root directory of the project and add the following environment variables:
VITE_CLIENT_ID=your_spotify_client_id
VITE_HOME_URL=http://localhost:3000/
  1. Start development server
npm run dev
This will start the development server and open the app in your default web browser.

Developer Commands

Prettier:
npx prettier --write <filename>
Preview:
npm run preview
Production Build:
npm run build
Run Production Build:
npm install -g http-server;
http-server dist

Usage

  1. Authentication
  • On the login page, click the "Login" button.
  • You will be redirected to Spotify's login page. Log in with your Spotify credentials and authorize the app.
  1. Browse Playlists
  • After logging in, you will be redirected back to the app.
  • You can now view your playlists, track details, and user profile information.

Acknowledgements

License

This project is licensed under the MIT License. See the LICENSE file for details.