Table of Contents
Spotifie is a web application for creating a playlist based on the songs you've selected before. Spotifie implements the Spotify API and connected to your spotify account to search for tracks, create & see your playlist, add tracks to your playlist, etc. You can use Spotifie by clicking here
(Do note that you will need my permission if you to use Spotifie via this link. It's recommended that you run Spotifie via your machine using your Spotify key).
- Login with your spotify account
- Show recommended tracks based on selected genres
- Search for tracks
- Create playlist
- Add tracks to your playlist
- See all of your playlist
- See tracks inside of your playlist
- See your account profile picture and display name
- Open tracks & playlist in Spotify with one click
- Create React App to initialize the project.
- Written in Typescript
- Tailwind CSS for building UI
- React Redux for state management
- React Router for routing
- Axios, for making API calls
- Jest, for testing
- MSW, for creating API mock
- Deployed on Vercel
- Use redux to store token, user profile, selected track URIs, and seleted tracks data.
- Implements Spotify API for searching tracks, get recommended tracks, creating playlist, adding tracks to playlist, getting all of your playlist, getting all contents of your playlist, and get your Spotify profile data.
- Use react router with private route for authentication verification.
- Implements several types for typescript.
- Use MSW for mocking API calls for search track.
- Passing test for search track page using toBeInTheDocument & userEvent.
- Spotify account (Free/Premium)
- Setting up Spotify Application in Spotify Developer Dashboard
- NodeJS installed in your machine
- Git
- Clone repo to your local machine. After it finished, open the folder and install project dependencies. You can do this from your command line/terminal :
# Clone this repository
$ git clone https://github.com/irfan44/generasi-gigih-homework.git
# Go to repository folder
$ cd generasi-gigih-homework
# Install dependencies
$ yarn
- Insert your spotify key to
REACT_APP_SPOTIFY_CLIENT_ID
and redirect tohttp://localhost:3000/callback/
forREACT_APP_SPOTIFY_REDIRECT_URI
in.env
file. Make sure that you've added the redirect URI to your application in Spotify Developer Dashboard
# .env example
REACT_APP_SPOTIFY_CLIENT_ID=9090asdasdczsda9a10ak12eqws12smx
REACT_APP_SPOTIFY_REDIRECT_URI=http://localhost:3000/callback/
- Run the app
$ yarn start
- Open
http://localhost:3000
to view the app in your browser
- Login to Spotifie using your spotify account
- In home page, you can select tracks that are recommended. Also you can see your account profile picture and display name in the top bar. You can click on the profile button to see your account profile in Spotify. In mobile view, you can use the hamburger menu to access the side menu that you use to navigate between pages.
- Selected tracks will appear in the selected track list bar. You can select multiple tracks and remove tracks accordingly using the trash button. In mobile view, you can access this bar by clicking on the menu located in the top bar.
- In search page, you can search for tracks that you wanted to select. Selected track will also appear in the selected track list bar.
- In create playlist page, you will see all of your selected tracks and you can input a name for your playlist. You can also add a description for your playlist. Note that you can only create playlist with at least one track and input at least 10 digits for your playlist name.
- In your playlist page, you can see all of your playlist and if you click on your playlist, you will see all of the tracks inside of your playlist in the playlist detail page.
- In every track card and playlist details, you can see the Spotify logo. If you click on it, it will open the track or playlist in Spotify with one click.
- If you finished creating playlist, you can click on the logout menu to go back to login page.
Reach out to the maintainer at one of the following places:
- GitHub issues
- Contact options listed on this GitHub profile