We've seen many of our friends experience the negative effects of alcohol when they drink too much. Situations involving alcohol can become extremely risky if people do not have friends to help them out.

What it does

SafeDrinks allows users to create a profile and join a "party group" with their friends. Everyone in the group has access to each other's location and Blood Alcohol Concentration (BAC) during the party. Thus, anyone in the group can check up on each other to make sure that no one has gotten too drunk or wandered off from the group.

How we built it

We used React for the front-end app design. We queried the Google Maps API to get location data and display a map with markers for each person's location. To determine each user's BAC, we got heart rate and motion data from a Fitbit smartwatch and trained a Support Vector Machine (SVM) machine learning model using Scikit-Learn. We ran inference on this model in realtime using Microsoft Azure's Kubernetes Service.

Challenges we ran into

One significant challenge we ran into was predicting BAC. Namely, while we could require users to carry around a breathalyzer or other specialed hardware to predict BAC, this would make SafeDrinks a lot more cumbersome to use. Instead, we spent a lot of time brainstorming different ways of indirectly measuring BAC using commodity hardware. Finally, we settled on two mechanisms that both use Fitbit data: heart rate tracking and motion tracking. We looked at research papers published in this field and designed machine learning models that use these two features to predict BAC. Since a large number of people carry Fitbits or similar smartwatches, this enables us to give accurate predictions while still maintaining accessibility.

We also struggled with integrating all of our different software components. For instance, our app combines the Google Maps API for location services, the Fitbit API for sensor data, and the Azure API for BAC predictions. All of these happen in realtime and are interdependent. E.g., the call to the Azure API uses data received from the Fitbit API.

Accomplishments that we're proud of

We go to hackathons with the intention of learning something new. Here, members of our team used React, the Fitbit API, and the Microsoft Azure API for the first time. Moreover, we combined all of those technologies together into a working final product :)

What we learned

We learned a lot about new technologies that we leveraged for the app (e.g., React, the Fitbit API, and the Microsoft Azure API) and got insights into the product design/ideation process. Since this was our first time doing a 36-hour hackathon, we also developed our teamwork skills.

What's next for SafeDrinks

Sending notifications to sober buddies when their friends get too far away or too intoxicated. Also, anonymizing data about alcohol/student parties (e.g., using Differential Privacy) to send to universities and help them shape drinking policy.

Share this project: