
GitHub Repository
Showcase
Designed to act as an automated promotional site for musicians, Music Showcase updates daily with any new releases from an artist and displays them in a visually appealing way with direct links to stream on Spotify.
Technical Breakdown
Behind the scenes, there are two Job classes that are scheduled to run daily through the Laravel queue, one for Playlists and the other for Releases.
When called, these jobs iterate over Spotify's API responses using their provided pagination values, and create database records from the API response until everything has been created. This consists of multiple types of data related to the record, such as the Releases and Playlists themselves, Images, Artists etc.
This has the benefit of only requiring a single batch of API calls to be made to populate the Database instead of having to make numerous to populate the page records every time, both reducing the risk of being rate limited on Spotify's end, and improving page load times.
The website accepts a single Artist ID and unlimited Playlist IDs through the Filament panel. Within the panel, there is a custom action to immediately schedule re-fetching data from Spotify with any modified values.
Simple Livewire components are used for displaying Releases and Playlists, using the Alpine.js Intersect plugin for infinite scroll whilst loading more records.