Links
GitHub — Python backend
GitHub — React Native app
Devpost — Fred
Devpost — Julia
Devpost — Adeline
Devpost — Sam
Inspiration
As avid long-distance runners who rely on music for energy, finding the right playlist for running was always a challenge for us. Beyond the songs that cater to our taste in music, any runner would know that the tempo and rhythm of a song can drastically affect workout performance. We wanted to create a solution for all runners, bikers, and hikers, so they can match their songs to their vibe—and to their steps!
What it does
Flow is an app that curates data for users by analyzing their historic workout trends, using features of their own workouts such as cadence, heartbeat, and time of day to create intelligent suggestions. The result is a set of playlists that map users' common workout flows to songs that parallel the same trends. For example, if a user tends to start off a run with a low cadence, and peak near the end of their exercise, Flow will piece together parts of their favourite songs to their footsteps, matching cadence to beats-per-minute (BPM). Do you have a favourite song with a high-energy chorus but weans off towards the end? That's not a problem—Flow knows this, and will only play the high-energy segment for you, before transitioning to another hype song segment.
How we built it
We built Flow using React Native on the frontend and Python on the backend, and hosted an API on Render. We wrote our own algorithm to weigh the attributes of songs that users value, and to identify patterns in aggregate historical data to create suggestions. Exercise data was sourced from Strava's API and was collected using Apple Watches. We integrated the music player into Spotify using their Developer API, so that a press of a button on Flow can create a Spotify playlist, add to their queue, or start playing music right away.
Challenges we ran into
We ran into challenges surrounding the volume of data we were processing, and limitations with Strava and Spotify's API providers. After authenticating the user on both platforms, we wanted to pull high granularity data (second-by-second) on each of the user's exercises, resulting in tens of thousands of data points. There was a similar issue with querying Spotify's API to get a value with less than +/- 5 BPM threshold. After much refactoring and optimization of code, we were able to get the quality of data to a level we were happy with.
Accomplishments that we're proud of
We are super proud of the level of nuance we were able to achieve with our backend aggregations and calculations. When we plugged our own accounts into Flow, we were pleasantly surprised by the suggestions we got!
What we learned
This was our first time doing mobile development! While we had some experience with React, Expo and React Native still presented a formidable challenge for us as first-timers. After it all though, we now know the ins and outs of working with Expo and have learned a lot about a handful of useful React Native libraries.
What's next?
Upcoming could be real-time data collection and playlist creation! Since Strava's API is limited to non-real-time data, we want to directly interact with the accessory (e.g., Apple Watch, Garmin) to translate the athlete's physical state into music as they are working out.