How jl978/spotify-clone-client works
This repository is a React front end for a Spotify web-player clone. The main workflow starts in the app shell, establishes authentication state, and presents navigation and routed content for browsing or searching Spotify’s catalog; authenticated users can access personal collections and control an existing Spotify player. Search rows fetch and display results, while the player reads playback state and sends control commands. The README also documents cookie-backed refresh authentication and paginated scrolling. Some page implementations and wiring were not sampled, so those relationships are shown only where documented or left out.
Main entry points: App.js App bootstrap · pages-components Catalog and account pages · Player.js Remote player · reqWithToken.js Authenticated GET
Components 26
App shell
- App bootstrap
src/App.js - Auth state
src/App.js - Navigation sidebar
src/components/sidebar-components/Sidebar.js - Brand logo
src/components/sidebar-components/Logo.js - Content shell
src/components/featured-components/Featured.js - Loading view
src/components/featured-components/Loading.js - Page banner
src/components/featured-components/PageBanner.js - Page content
src/components/featured-components/PageContent.js - Shared app context
src/utilities/context.js
Catalog discovery
- Catalog and account pages
src/components/pages-components - Live search input
src/components/featured-components/SearchBar.js - Search results
src/components/featured-components/SearchRow.js - Catalog cards
src/components/featured-components/PlayCard.js - Pagination hooks
src/utilities/hooks
Account features
- Playlist actions
src/components/featured-components/PlayListFunctions.js - Login prompts
src/components/featured-components/PromptButton.js
Playback control
- Remote player
src/components/footer-components/Player.js - Playback progress
src/components/footer-components/ProgressBar.js - Device selection
src/components/footer-components/ConnectDevices.js - Now playing display
src/components/footer-components/NowPlaying.js
API transport
- Authenticated GET
src/utilities/reqWithToken.js - Authenticated commands
src/utilities/putWithToken.js - Backend API proxy
src/utilities/makeAxiosRequest.js
Other components
- Listener
- Spotify Web API
- Authorization server
Connections 31
- Listener → App bootstrap: opens app
src/App.js - App bootstrap → Auth state: resolves login
src/App.js - App bootstrap → Navigation sidebar: renders
src/App.js - App bootstrap → Content shell: renders
src/App.js - App bootstrap → Loading view: renders while loading
src/App.js - App bootstrap → Remote player: renders when logged in
src/App.js - App bootstrap → Authorization server: checks refresh cookie
src/App.js - App bootstrap → Authenticated GET: requests profile and playlists
src/App.js - Navigation sidebar → Brand logo: renders
src/App.js - Content shell → Catalog and account pages: routes content
- Listener → Live search input: enters query
- Catalog and account pages → Search results: renders query rows
src/components/pages-components/QueryPage.js - Search results → Backend API proxy: fetches results
src/components/featured-components/SearchRow.js - Backend API proxy → Authorization server: forwards request
src/utilities/makeAxiosRequest.js - Search results → Catalog cards: renders results
src/components/featured-components/SearchRow.js - Catalog and account pages → Pagination hooks: loads more items
src/components/pages-components/ArtistPage.js - Catalog and account pages → Page banner: shows page details
src/components/pages-components/ArtistPage.js - Catalog and account pages → Page content: renders page body
- Catalog and account pages → Playlist actions: offers playlist actions
src/components/pages-components/ArtistPage.js - App bootstrap → Shared app context: provides shared state
src/App.js - Remote player → Authenticated GET: reads playback state
src/components/footer-components/Player.js - Remote player → Authenticated commands: sends playback commands
src/components/footer-components/Player.js - Remote player → Playback progress: renders and updates
src/components/footer-components/Player.js - Remote player → Device selection: renders device controls
src/components/footer-components/Player.js - Remote player → Now playing display: renders track info
src/components/footer-components/Player.js - Authenticated GET → Spotify Web API: requests catalog and state
src/utilities/reqWithToken.js - Authenticated commands → Spotify Web API: sends commands
src/utilities/putWithToken.js - Device selection → Authenticated GET: loads devices
src/components/footer-components/ConnectDevices.js - Device selection → Authenticated commands: selects device
src/components/footer-components/ConnectDevices.js - Playlist actions → Authenticated commands: updates saved items
- Auth state → Login prompts: gates protected routes