bestguy / spotify-example

Example app using Spotify API, React, & Hooks

Home Page:https://bestguy.github.io/spotify-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spotify Playlist App

Using TypeScript, React, & React Hooks

Screen Shot

TODOs

  • Playlist storage uses localstorage and serializes the entire object returned from Spotify APIs to JSON. Need to trim to only fields used in app.
  • usePlaylists hook has inconsistent function signatures, some taking Playlists, others id. Need make consistent with ids.
  • useFetch is naive and does not return loading or error states. UI should accomodate both.
  • Accessibility (a11y) is poor with most inputs missing labels, and some inputs are not in forms.

Install

npm install

Running

npm run dev

Open http://localhost:8080

This application uses Vite for development.

Build

npm run build

Bundled application for production will be under /docs.


Components

┌─────────────────────────────────┐
│App                              │
│  ┌──────────────────────────┐   │
│  │Login                     │   │
│  │ ┌────────────────────────┴─┐ │
│  │ │PostLogin                 │ │
│  │ │                          │ │
│  │ │                          │ │
│  │ │                          │ │
│  └─┤                          │ │
│    └──────────────────────────┘ │
└─────────────────────────────────┘

┌──────────────────────────────────────────────────────────────────────────────┐
│PostLogin                                                                     │
│ ┌───────────────┐  ┌───────────────────────────────────────────────────┐     │
│ │UserPanel      │  │ShowPlaylist                                       │     │
│ │               │  │  ┌────────────────────────────────────────────────┴──┐  │
│ │               │  │  │NowPlaying                                         │  │
│ │               │  │  │  ┌─────────────────────────────────────────────┐  │  │
│ │               │  │  │  │ShowTrack                                    │  │  │
│ │               │  │  │  │                                             │  │  │
│ └───────────────┘  │  │  │                                             │  │  │
│ ┌───────────────┐  │  │  │                                             │  │  │
│ │Playlists      │  │  │  │                                             │  │  │
│ │               │  │  │  │                                             │  │  │
│ │               │  │  │  │                       ┌───────────────────┐ │  │  │
│ │               │  │  │  │                       │AddToPlaylist      │ │  │  │
│ │               │  │  │  │                       │                   │ │  │  │
│ │               │  │  │  │                       │                   │ │  │  │
│ │               │  │  │  │                       │                   │ │  │  │
│ │ ┌───────────┐ │  │  │  │                       │                   │ │  │  │
│ │ │AddPlaylist│ │  │  │  │                       └───────────────────┘ │  │  │
│ │ │           │ │  │  │  │                                             │  │  │
│ │ └───────────┘ │  └──┤  └─────────────────────────────────────────────┘  │  │
│ └───────────────┘     └───────────────────────────────────────────────────┘  │
└──────────────────────────────────────────────────────────────────────────────┘

About

Example app using Spotify API, React, & Hooks

https://bestguy.github.io/spotify-example


Languages

Language:TypeScript 96.7%Language:HTML 2.4%Language:CSS 1.0%