Inspiration

Most people attending CruzHacks have probably consumed a significant amount of caffeine in the last 48 hours. But how many of them exceeded the daily recommended dose? How long do the effects of those Yerba Mates last? Most people know that caffeine keeps you awake and give you an energy boost but how long does that feeling last? How strong is 150 mg of caffeine? The recommended daily dose by the FDA is 400mg assuming no preexisting conditions. Caffeine levels in the body decay exponentially so how long it's in the body depends on how much there is. 150 mg of Caffeine will typically stay in your body for seven hours after consumption and is the most common dosage in energy drinks. Several companies offering caffeinated drinks such as Starbucks, Philz, and Peets not only have a monopoly on caffeinated beverages but have been known for slowly incrementing dosages in recent years. This has resulted in extreme levels of caffeine in their drinks reach(over 300mg in Starbucks Grande Coffee). Because caffeine plays such an integral role in many people’s design process we decided to make an app that helps people track and manage their caffeine intake. This should hopefully give users better visibility into what they are consuming and how it affects them.

What it does

CaffMe allows users to visualize how much caffeine they are consuming as well as how long that caffeine will be in their system. Users enter their drink by either using a search bar and selecting their drink, or taking a picture of their drink. They then use a slider to select the size/amount they plan to drink. Our app then references the caffeine amount of the drink to calculate how much caffeine the user is consuming. The two things we felt necessary to track were how long the caffeine will be in users’ systems and the total caffeine consumed. Inputting a drink that goes over the 400mg amount triggers a warning. As users are selecting the size of the drink there is a section that displays how long the caffeine will be in their system affecting potential sleep.

How we built it

We started by creating a design doc with user stories to determine what features were needed and how to best execute them. Next we figured out which features overlapped so that we could integrate them properly. Figma was used to create a mockup of the app’s UI and React Native / Expo Go were used to create, build, and deploy our iOS app.

Challenges we ran into

We could not find a proper data set to train our ML model. Our solution was to create a smaller tuning set to tune an existing model. This involved going around campus taking photos of our different caffeinated drinks in varying lightings. Integrating google’s api so that we could make use of their machine learning for image recognition. After tuning a model and downloading it we entered integration hell when adding it to CaffMe. Github did not want to collaborate with us so we fought an epic struggle to bring it to heel. It was as if we were fighting a tug of war between github and our humble team. Due to conflicting permissions between Expo and different OAuth libraries, integrating credential authentication became a surprisingly cumbersome task. The build tool Expo doesn't integrate well with Firebase or Google authentication because it tries to re render the DOM which causes issues (failed promises). Incompatibility between Tenser flow.js and Expo prevented us from running the tuned Auto ML Vision model.

Accomplishments that we're proud of

We have built a functional app that lets users track their caffeine intake and visualize its effects. We have created an interactive UI that has users find their drink of choice using a search bar. The app performs most of the functions that we set out to create.

What we learned

Two of us learned that we should have brought earphones. The power of friendship allowed us to push through the setbacks while remaining civil and professional. This was the first hackathon for three of us so it had many challenges that forced us to think in ways we wouldn’t normally. We learned how to use Figma, ReactNative, Firebase, Expo, and Auto ML Vision models.

What's next for CaffMe

Adding support for other potentially harmful chemicals such as Taurine. While not as common as caffeine it is found in several energy drinks where its “day-long effects” aren’t really known to consumers. Adding different products that are used without a second thought but have effects most people ignore

Share this project:

Updates