Giter Site home page Giter Site logo

twitch-frontend-song-player's Introduction

Twitch Frontend Music Player


Table of Contents


Technologies Used

  • Languages: JavaScript, TypeScript
  • Frontend: React
  • Frameworks and Libraries: Material-UI
  • API: Spotify

Installation

  1. Install packages
npm install
  1. Create .env file, you can reference to .env.example
REACT_APP_SPOTIFY_CLIENT=<Your Spotify client ID here>
REACT_APP_SPOTIFY_SECRET=<Your Spotify Client Secret here>
  1. Start server
npm start

Features

  1. Search a Song
    search-a-song

  1. View Songs
    view-songs

  1. Play a Song
    play-a-song

Architecture Overview

  1. Relationships of Components
    components

  2. Architecture Pattern
    architecture

  3. API

    • POST request to get Spotify token
      {
        "access_token": "",
        "token_type": "Bearer",
        "expires_in": 3600
      }
      
    • GET request to fetch songs based on query string
       {
         "tracks": {
           "items": [
             {
               "albums": {},
               "artists": {},
                 .
                 .
                 .
             }
           ]
         }
       }
      
  4. Responsive View

    • Large Screen
      large-screen
    • Medium Screen
      medium-screen
    • Small Screen
      small-screen
    • Extra Small Screen
      extra-small-screen
  5. User Flow

    • Type song name into search box, hit 'Enter'
      User will see a list of songs
    • Hover over song card, users will see a play button
    • Click on a song, song will start playing
    • Control play/paused state, volumes and progress of a song with footer music player controls
  6. Distinct design decisions

    • Use useContext and useReducer to manage states
    • Use OuterController to import Global Context values and use React.memo on InnerController to avoid excessive component rerendering

Requirements

  1. Use a modern JS Library/Framework

    • React
  2. Three different user interactions

    • Search a song
    • Click song to play
    • Toggle play pause
    • Change progress bar to fast forward or rewind
    • Change volume
  3. A specified architectural pattern

    • MVC
  4. 3rd Party Restful API

  5. 5 UI components from Material-UI core

    • Grid
    • AppBar
    • InputBase
    • Paper
    • CardMedia
    • Typography
    • Popover
    • Slider
  6. Reusable UI

    • Song Component

twitch-frontend-song-player's People

Contributors

kimi-zou 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.