Giter VIP home page Giter VIP logo

spotify-clone's Introduction

About The Project

This is an Frontend Web App to search your own favorite songs and create your own playlists with Spotify! You can also find recommendations of songs from different genres. The project uses the Spotify Web API to interact with Spotify.

Built With

The major framework that was used to create this project is React.js and used different libraries such as:

Getting Started

To get started in running this app, make sure you have a recent version of Node.js installed and create your own client ID:

  1. Login into Spotify Web API
  2. In the dashboard, create a new app with the scope as playlist-modify-private.
  3. You'll retrieve your own client ID.

After getting your own client ID, you can clone this repo:

git clone https://github.com/briancatraguna/Spotify-Clone.git

Then create a new file named .env under the main directory Spotify-Clone with the following contents where you need to put your client ID:

REACT_APP_CLIENT_ID = <YOUR CLIENT ID>

Note: Without wrapped by quotations

How to run in local

After putting the client id in the .env file you need to:

  1. Install NPM packages
    npm install
  2. Change the following code in Spotify-Clone/src/components/LoginButton/index.tsx to match the following:
    const LoginButton = () => {
     const MY_WEBSITE: string = "http://localhost:3000/callback"
     const REDIRECT_URL: string = `https://accounts.spotify.com/authorize?client_id=${process.env.REACT_APP_CLIENT_ID}&response_type=token&redirect_uri=${MY_WEBSITE}&scope=playlist-modify-private`
    
     return (
         <a href={REDIRECT_URL}>
             <Button variant="contained" color="primary" className="myButton">Login</Button>
         </a>
     )
    }
  3. Run the following command
    npm start

How to deploy your own app

  1. Think of your own subdomain, can be anything. For example my-spotify, then change the code in Spotify-Clone/src/components/LoginButton/index.tsx with the const MY_WEBSITE as:
    const MY_WEBSITE: string = "https://my-spotify.vercel.app/callback
  2. Setup your own remote GitHub repository with the cloned project inside it.
  3. Go to Vercel and create a new project.
  4. Import your GitHub repository.
  5. Setup your project name, use the same you used in step 1. Your project name will be the subdomain continued by .vercel.app.
  6. Setup the Environment Variables with the name as REACT_APP_CLIENT_ID and the value is your Client ID.
  7. Click on deploy!

Features ๐Ÿš€

Login Page

This is where you can login to your own Spotify Account!

Create Playlist Page

In create playlist page, you can search your own favorite tracks and add it to your playlist! You can search any song you want and select them, then name your playlist and its description, you can submit!

Recommendations Page

We can also recommend you songs for you to listen if you are confused what to listen! We give you any possible genres! and browse away!

spotify-clone's People

Contributors

briancatraguna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.