We were inspired by our team member, Tony Del Rosso, who is a type one diabetic. We originally came up with the idea to help him, and other members of the UCSB diabetes club plan out their day to maintain healthy blood sugar levels.
What it does
SweetSpot allows users to input four different types of activities that will affect their blood sugar over the course of the day. This includes meal timing and macro-nutrients, weightlifting, cardio, and finally when and how much insulin they will inject.
The app also connects to a user's Dexcom Glucose Monitoring device to get real-time updates on the user's blood sugar levels. We track the real-time data and the predictions in an easy-to-understand graphical interface.
As we gather more historical data on the ground truth blood sugar levels we are able to continuously train our LSTM model to improve the accuracy of our predictor. When the user starts the app we use a hand-built algorithm to calculate the time series data, and as we improve the model's accuracy we interpolate between our algorithm and the user's custom model, providing increasingly accurate results.
SweetSpot will provide the user with a predicted blood sugar trend for the day based on their planned food intake, exercise, and insulin input for the day. The user is also able to manipulate certain inputs in order to see how additional food or more exercise may impact their prospective blood sugar for the day. This is a useful tool for both type one and type two diabetics as having a plan for the day in regards to food, exercise, and insulin can be beneficial in maintaining optimal in-range blood sugar.
How we built it
We used react-native, the Dexcom API, the Apple Health API, MongoDB, Flask, and Pytorch to build our app.
Challenges we ran into
Figuring out how to create a seamless user flow and minimize user effort was quite the challenge. Implementing an LSTM model and continuous training was also very challenging. Blood sugar is also complex to accurately model as many factors such as hormones and hydration in addition to exercise and food have an impact. In addition to exercise and food, other factors such as hormones and hydration also have an impact on blood sugar. Modeling all of these factors does create a significant challenge.
Accomplishments that we're proud of
We are proud of our front end and how easy it is for users to upload information.
What we learned
On the backend, we learned Flask and how to integrate a model into our backend. On the front end, we learned about the ins and outs of react native.
What's next for SweetSpot
We hope to continue development and work on this project!