How francoborrelli/spotify-react-web-client works
Project type and purpose
• This is a single-page, client-side web application (React + TypeScript + Redux) that acts as a Spotify web client.
• It consumes the Spotify Web API (for data fetching) and the Spotify Playback SDK (for in-browser music playback).
• It is packaged as a Dockerized static site served via Nginx (no custom backend).
File structure
• Top-level:
• docker/ & Dockerfile + docker-compose.yml – for containerizing and serving the app through Nginx.
• public/ – static assets (index.html, manifest.json, images).
• src/ – application code.
• Within src:
• components/ – reusable UI components (Buttons, Layout, Modals, etc.).
• pages/ – page-level containers organized by route (Home, Search, Album, Artist, Playlist, User, etc.).
• services/ – wrappers around Spotify Web API endpoints and playback logic.
• store/ – Redux setup (store.ts) and feature slices (auth, home, search, playingNow, etc.).
• utils/ & constants/ – helpers, configuration, and app-wide constants.
• i18n/ – internationalization resources.
• Configuration & build scripts: tsconfig.json, package.json, .env.dist.
README for additional insights
• Confirms key technologies: React, Redux, Spotify Web API, Spotify Playback SDK.
• Describes features: music browsing, playback controls, playlist management, saved content, devices, follow/unfollow, etc.
• No custom backend – all data comes from Spotify’s services.
Elements
• Clear labels: e.g. “React App”, “Redux Store”, “Spotify Web API”, “Nginx”
– UI → Redux actions → Services → Spotify → Redux
– Playback SDK → Audio output in browser
– Browser → Nginx (static asset fetch)
– Green for external services (Spotify endpoints)
– Gray for infrastructure (Docker, Nginx)
• Annotations: list key libraries (Axios, Redux Toolkit, React Router) next to respective components.
Final advice
• Both control flow (actions → reducers → UI) and data flow (API calls → state updates).
• The goal is to show, at a glance, how user interactions travel through your React/Redux app to Spotify and back, and how the static assets are served.