Are you tired of listening to bad music in a bar? We are too. So we created a solution.
What it does
SpotBot merges together Spotify playlists / top tracks / recently listened tracks of multiple users to one dynamic playlist. Users can simply tap the Beacon notification to grant us access to their playlists. SpotBot will pull the songs through the Spotify API and play them on the local jukebox. The song order is generated by using a weighted Queue.
How we built it
The authentication backend runs on node.js with the express.js package. It handles the Spotify callback and provides our Java server with the user tokens. It also serves our web pages.
The Java server generates a new token for our API application and uses this token with our pulled user tokens to fetch user playlists.
After that, we create a queue and offer the Spotify tracks to it.
We play back those songs by passing the Spotify URI to the command line.
Challenges we ran into
We've never used node.js before so we had to read a lot of documentation. Additionally, we had to get used to the different APIs we used.
Accomplishments that we're proud of
There were only a few bugs in development, even though we're complete beginners in node.
What we learned
Hosting a web backend with node.js and serving web pages, using Spotify API
What's next for SpotBot
We want to make use of machine learning to improve our weight algorithm. Also, we need to write more methods to improve song playback(premature song skip etc.)