The Inspiration

It can be hard to figure out what music to play when you're with friends because everyone has their own individual music tastes. auxCord strives to solve that problem by analyzing user's listening data from Spotify and syncing this data to provide intelligent music recommendations that will satisfy both music listener's tastes by generating tailored playlists.

What it does

Using a number data from the Spotify Web API, auxCord extracts and analyzes a large amount of listener data including top played tracks, top played artists, and user playlists tracks in order to build unique playlists that will satisfy both listeners. First, a user creates an 'aux' and is given a unique four digit code. Then a second user joins this 'aux' by entering their friend's four digit code. This then starts the algorithm that cross-references the music preferences between the users and then selects tracks that both listeners are predicted to enjoy. On completion a new playlist is saved.

How we built it

The web app is built on node.js, which handles the backend web server and data analysis portion of the app. HTML and CSS are served via the Express server on node.js to provide the UI in the browser. was also implemented to allow dynamic communication between the server and the clients in order to send updates about the status of user connection and playlist generation.

Challenges we ran into

The two biggest challenges for our project involved the collection of user listening data from the Spotify API and the communication between the server and the clients during the playlist generation and data analysis portion. It was challenging to collect the listening data since the data was collected from a number of different endpoints, which formatted their responses its slightly different ways that made conforming all of the data difficult. With some good application of javascript methods we were able to conform the data and properly analyze it to generate the playlists. We used in order to initiate communication between the server and client so that we could alert the first user that the playlist was ready once the second user had connected. This involved creating a socket on user connection and then including client side javascript code to listen for a message from the server to get the new playlist information. After recieving it the javascript code updates the HTML code to show the user the new playlist.

Accomplishments that we're proud of

Our biggest accomplishment was successfully generating new Spotify playlists that include an interesting intersection of music between two users. Our collection of diverse user listening data allows to consistently create playlists of 50 tracks that are shared between the two the users. Our inclusion of also allowed us to have a slick interface for the users to interact so that the first user can be notified and shown the new playlist after waiting for the the second user to connect to their 'aux'. In addition, in the limited time, we were able to host our finished web app on AWS with an EC2 instance along with our custom domain

What we learned

We learned a lot about building nicer code in node.js to handle our user listening data objects as well as implementing promises to manage our asynchronous API calls cleanly without a bunch of callbacks. In addition we also learned about how to use within node.js. We also expanded our knowledge of HTML and CSS in the design of the UI of our web app.

What's next for auxCord

We are just getting started with auxCord and have a lot of ideas for new features we would like the implement in the future. Our current, live web app allows two users to sync their Spotify accounts and create new playlists but we would like to expand this to even more concurrent users and also implement updates to our algorithm that allows for less commonly shared tracks to be included in the playlists but with less frequency, with the hopes of some users discovering new music that they enjoy based on what their friends enjoy. Also with some additional piping we want to add a user control for the playlist length so users can generate playlists from 10 tracks to 100 tracks. Currently auxCord builds playlists of 50 tracks which is about 2-3 hours of music. We are also interested in using the Spotify API's audio feature endpoint to gain more information about the music that users enjoy and then combine this with the Spotify recommendation endpoint to inject a few tracks into the playlists that are new to all the users but are similar to the music that the users like.

Share this project: