An open API service indexing awesome lists of open source software.

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

Example app using Spotify API, React, & Hooks
https://github.com/bestguy/spotify-example

Last synced: 8 months ago
JSON representation

Example app using Spotify API, React, & Hooks

Awesome Lists containing this project

README

          

# 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](http://localhost:8080)

This application uses [Vite](https://vitejs.dev) 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│ │ │ │ │ └───────────────────┘ │ │ │
│ │ │ │ │ │ │ │ │ │ │
│ │ └───────────┘ │ └──┤ └─────────────────────────────────────────────┘ │ │
│ └───────────────┘ └───────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────────────────────┘

```