Inspiration

As students/young professionals, we listen to music often, whether it's during work, while exercising, during commutes, or just to set the mood while chatting with friends. In either case, we tend to use the same playlists over and over again. Sometimes though, songs in certain playlists might not correspond to the mood we're in. We've all run into a random slow song playing when we're trying to exercise, or a happy song playing while we're in our feelings.

What it does

Spotimood is very simple. It takes a prompt of your mood/feelings and generates a Spotify playlist that corresponds to that mood.

How we built it

  • React on the front end
  • Express with TS, calling the Spotify API
  • Flask app making API calls to OpenAI
  • ChatGPT Acknowledgement: We used ChatGPT to preview our prompt engineering as well as some general questions.

Challenges we ran into

  • Spotify requires authentication which means we need to refresh an auth token every hour
  • Prompt engineering to get correct responses from OpenAI's models
  • Timeout issues while making requests to the Flask service due to the model taking too long to come up with an answer
  • Attempts at Dockerizing

Accomplishments that we're proud of

  • We are proud of having a fully functional website running locally and 1/3 cloud-ready. One of our backend services is containerized. We're also proud to have explored new APIs from Spotify and OpenAI, which we hadn't used before

What we learned

  • Navigating Spotify API
  • Using OpenAI API + Prompt engineering
  • Containerization
  • Building awesome UIs

What's next for Spotimood

Cleaning up the codebases. Ideally, we'd have just a single backend which would make the calls to OpenAI and Spotify and return a response to the UI. Fully containerized services Fully deployed to the cloud Potentially integrating messaging (i.e. Kafka) for faster link generation and transmission

Share this project:

Updates