Inspiration
The inspiration for this project came from two ideas: taking a personality quiz that gives you your personality type based on a theme, and having a Spotify mini mp3 player that allows you to play, pause, skip, and reverse songs playing from your Spotify account.
What it does
This project allows you to play music using an mp3-style widget that's customized to your personality type. The personality customization comes from a five question quiz that appears at the start of the app, which you can skip if you prefer to go straight to the mp3 player.
How we built it
We built the personality quiz and music widget in React and used Tauri to package them as a desktop app. Your quiz answers determine whether the widget takes on the Light Forest or Dark Forest theme. On the backend, we used Node.js and Express to handle Spotify login. The Spotify Web API gives the widget track details, and the Web Playback SDK lets you play music directly in the widget.
Challenges we ran into
Two of our biggest challenges were integrating Spotify APIs and learning to work in a shared GitHub repository. It was challenging working alongside Spotify’s api and the vision we had for the app. Since this was our first time working with APIs, it took time to read through Spotify’s documentation and understand what our project could do. It was difficult and lengthy to figure out which APIs fit our widget, and understand how routing, user authentication, and access tokens worked together. For some of us, this was also our first group coding project, so pushing code to someone else’s repository felt unfamiliar at first. It gave us practice contributing to a shared codebase that we can use for future reference though.
Accomplishments that we're proud of
We’re proud that we built a Spotify mini player we could actually use on our desktops. We are proud of not only implementing the front end designs but also adding features to tie in the functionality of the quiz. For some of us, this was our first design competition that's code heavy, so it was a fun opportunity to learn how APIs work and understand the power of coding. Making a mini player was fun to do and seeing it working on a desktop was rewarding after learning about how an API communicate. Early on, we each shared what we wanted to learn and chose a part of the project to focus on. Even during a busy semester, we met those goals and had fun bringing the player to life together.
What we learned
We learned what happens after someone clicks “Log in with Spotify,” from how our Express server handles the login callback to how the player uses an access token. We also got more comfortable pushing changes to a shared GitHub repository and connecting the parts we built separately, like using a quiz result to set the widget’s forest theme.
What's next for Forest FM
If we had more time, we would integrate the following features:
- Being able to share our current widget state with friends by using WebSockets to let friends share their current song and widget theme
- Adding different quiz questions and more themes that the user's personality quiz could lead to
Built With
- express.js
- figma
- node.js
- react
- spotify
- tauri
- web-playback-sdk
