How minahilfaysl/spotify-clone-frontend works
This is a React frontend for a Spotify-like music service, backed by a separate HTTP API. The main user journey is to sign in, browse homepage or search and genre results, then play and manage songs through a queue; users can also follow profiles, maintain a library, and—if artists—create albums and upload tracks. The graph combines documented capabilities with relationships visible in the route table and sampled source index. Several feature implementations were not sampled, so their internal call paths are not inferred.
Main entry points: App.jsx Route application · apiSlice.js API client · homeApiSlice.js Homepage and library API · authSlice.js Auth state
Components 24
Authentication
- Login and signup
src/components/auth/Login.jsx - Route guard
src/components/auth/RequireAuth.jsx - Auth state
src/components/auth/authSlice.js - Auth API
src/components/auth/authApiSlice.js
Browse and profiles
- Homepage content
src/components/home/HomeContent.jsx - Keyword and genre search
src/components/search/SearchResults.jsx - Search API
src/components/search/searchApiSlice.js - User and artist profiles
src/components/profile/ProfileDetailsHeader.jsx - Settings
src/components/settings/Settings.jsx
Playback and library
- Playlist management
src/components/playlists/playlistsApiSlice.js - Track list
src/components/cards/TrackList.jsx - Media player and queue
src/components/player/HomePlayer.jsx - Homepage and library API
src/components/home/homeApiSlice.js - Playback and library state
src/components/home/homeSlice.js
Artist and catalog
- Album and song creation
src/components/artists/UploadSongForm.jsx - Artist API
src/components/artists/artistsApiSlice.js - Album details
src/components/albums/AlbumDetails.jsx
Shared application
- Route application
src/App.jsx - API client
src/app/api/apiSlice.js - Saved credentials
src/app/storage.js - Server error formatting
src/app/serverErrors.js - Upload size limits
src/app/uploadLimits.js
Other components
- Listener
- Backend API
Connections 35
- Listener → Route application: opens routes
- Route application → Login and signup: routes to
src/App.jsx - Route application → Route guard: protects routes
src/App.jsx - Route guard → Auth state: checks session
src/components/auth/RequireAuth.jsx - Login and signup → Auth API: submits credentials
src/components/auth/Login.jsx - Login and signup → Auth state: updates session
src/components/auth/Login.jsx - Auth state → Saved credentials: persists login
src/components/auth/authSlice.js - Auth API → API client: uses client
- API client → Auth state: refreshes or clears
src/app/api/apiSlice.js - API client → Backend API: sends requests
src/app/api/apiSlice.js - Route application → Homepage content: routes to
src/App.jsx - Route application → Keyword and genre search: routes to
src/App.jsx - Keyword and genre search → Search API: queries results
src/components/search/SearchResults.jsx - Search API → API client: uses client
- Route application → User and artist profiles: routes to
src/App.jsx - Route application → Settings: routes to
src/App.jsx - Settings → Backend API: updates account
- Route application → Album and song creation: routes to
src/App.jsx - Album and song creation → Artist API: uploads song
src/components/artists/UploadSongForm.jsx - Artist API → API client: uses client
src/components/artists/artistsApiSlice.js - Album and song creation → Upload size limits: checks file size
src/components/artists/UploadSongForm.jsx - Route application → Album details: routes to
src/App.jsx - Album details → Track list: renders tracks
src/components/albums/AlbumDetails.jsx - Album details → Artist API: loads album data
src/components/albums/AlbumDetails.jsx - Route application → Playlist management: routes to
src/App.jsx - Route application → Media player and queue: provides homepage player
- Media player and queue → Homepage and library API: loads queue and updates streams
src/components/player/HomePlayer.jsx - Media player and queue → Playback and library state: reads playback state
src/components/player/HomePlayer.jsx - Homepage and library API → API client: uses client
src/components/home/homeApiSlice.js - Homepage content → Homepage and library API: loads homepage data
- Homepage and library API → Playback and library state: updates library state
- Keyword and genre search → Track list: renders tracks
src/components/search/SearchResults.jsx - Track list → Playback and library state: reads now playing
src/components/cards/TrackList.jsx - User and artist profiles → Homepage and library API: loads following data
src/components/profile/ProfileDetailsHeader.jsx - User and artist profiles → Artist API: loads artist data
src/components/profile/ProfileDetailsHeader.jsx