Inspiration

We miss the live feeling of attending a Con, so we wanted people to feel closer to the event by bringing a shared playlist that everyone can request for songs and everyone will be listening to the same song simultaneously.

What it does

A live online playlist that provides the music for PickHacks! People can just request songs in discord, and a bot will pick up their request and autocompile them into a broadcasted playlist on the internet for everyone to see!

Join our channel here and if you type !request with a search result you will add your song to our shared playlist hosted on firebase and see what songs other people have requested..... Or see how many times we've listend to Adele's Hello =)

Challenges we ran into

There were many challenges in the project that we did not foresee. We had to scale down the project a number of times due to the complexity of the technology/protocols involved.

  1. We originally wanted to just have a public Youtube playlist, but interacting with the Youtube API proved to be difficult. It was easy to get an API key. But to edit a playlist, Oauth protcols were required and this sent us down a rabbit-hole of Googling.

We settled by creating a Firebase back-end to record all the requests instead.

  1. To have everyone listen to the same song in the playlist, we had to implement WebSockets and it required coordination on both back-end and front-end to implement it properly. As we were already stressed for time, we had to cut out this option as well.

That said, it was a very good learning experience and exposed us to new topics to explore.

How we built it

The Discord bot is built with discord.js library and is hosted on a Google Cloud VM instance. The website for the playlist is built with React front-end with database and hosting provided by Google's Firebase.

Accomplishments that we're proud of

Despite the number of scale-downs, we're proud that we can demo a final working product. It involved a lot of coordination and on-the-fly adjustments.

What we learned

Although it doesn't seem much, there were a lot of learning points for us on this project:

  1. Working with the discord.js library
  2. Explored Google Cloud product offerings
  3. Web hosting
  4. WebSocket technology in real-time apps
  5. Google's Oauth protocols
  6. Google's Youtube Data API

What's next for DJ-Bot

We definitely want to achieve a synced playlist, so we will continue to explore Google's documentation on the Youtube API, server-to-server Oauth protocol, and WebSockets to achieve this goal.

Final Thoughts

Yes we couldn't accomplish what we wanted, but we really enjoyed working with each other and learned many things along the way. When we look at all the new topics that we were exposed to at this Hackathon plus all the mentors and friendships along the way, that is a prize in itself.

We wanted to have a proper thank you for all the staff and mentors for hosting and helping us at this Hackathon.

Built With

Share this project:

Updates