Inspiration
Spotify recently came out with the Blended feature, but our group of friends wanted a way to make a blended playlist for all of us, with a few extra features too. We wanted listen to music we all enjoy, especially in situations like these where we hack together for 24+ hours straight. Music is a must but we all want a chance to hear music we love, without spending half the time creating the playlist ourselves.
What it does
Spotifusion analyzes users' listening habits and determines favorite tracks that they have in common with their friend group. Users visit spotifusion's homepage and log in to their Spotify account, granting spotifusion access to their data. Users can start a new group, which creates a unique PIN to share with friends. They can also join a group using the PIN. The page dynamically loads to alert all users of who has joined the group, and syncs their progress in the web app. Once everyone has joined the group, any user can select a length for the playlist and spotifusion begins generating your group's blended playlist using the Spotify API to access user data. While building the list, spotifusion's loading page propagates to all members and suggests a random member's top song so groups can explore each other's music taste. Finally, once the playlist has been generated, it is revealed to the group and automatically "liked" to add it to their accounts.
How we built it
We stored group information, including user IDs, display names, and access tokens, in a secure Realtime Firebase Database. We created custom wrapper functions to make calls to the Spotify API (e.g. getting a user's top songs) and read/write to the database. The web app itself is a Node.js app deployed on Heroku. We used express and ajax to facilitate the rendering of HTTP objects and dynamically coordinate routing and information sharing between group members. The frontend was created using HTML, CSS, and JS with Bootstrap and jQuery.
Challenges we ran into
The main challenges we struggled with were the limitations of the Spotify API, which only supports the retrieval of basic user information. There were no API calls related to the creation of blended playlists, such as automatically finding songs that users have in common. The API was inconsistent and provided very limited information (e.g. only 50 top songs per user), which made it difficult to design our algorithm. We had to analyze user habits to brainstorm multiple backup methods to blend users' music tastes based on minimal data, like recommendations based on their top shared tracks.
We also had to quickly learn how to set up and use Firebase, host on Heroku, and coordinate API calls and HTTP requests. We spent a large portion of the hackathon debugging and integrating the various components of the web app.
Accomplishments that we're proud of
Considering how difficult the Spotify API was to use, we're proud that we were able to creatively use what limited information we had to produce a robust blended playlist for users. We're also excited about being able to successfully host the full-stack web app on Heroku, which means we can remotely share and use the app with friends even after AthenaHacks.
What we learned
Despite the challenges that came with the Spotify API, we gained valuable experience with quickly and efficiently learning an entirely new API in a few hours. We also learned a lot about creating and publishing a full-stack web app, especially when we had to smoothly integrate our individual parts into a single functioning application.
What's next for spotifusion
We're planning to add several new features to spotifusion to make it the best experience possible for users. The website will include a filtering option to focus the shared playlist based on genres, energy level, artists, and more, as well as sharing links built in.
- Important note: since spotifusion is still in developer mode, any users that want access must be added to the account. Message us on Discord (@yush) with your email if you would like to try it out (max: 20 people)!
Log in or sign up for Devpost to join the conversation.