HackUNT Overall 3rd Place Winner, Statefarm Challenge Grand Prize Winner

‎⠀ ⠀ ⠀


We were inspired by our desire to learn about upcoming technologies such as Flutter and Firebase. We wanted to find a way to make it easier to track data in the scope of life insurance. Currently, the only apps available have to include physical user-inputted data about how much time they spend in the car, or at a gym, etc. The opportunity to implement new technologies to make peoples lives better and help save them money while also helping Statefarm accurately collect useful information was one of our end goals.

What it does

The app is a life insurance wellness tracker that helps calculate a user's risk factor, helping them save money. The login system tracks the user’s progress and allows for each user to save and log their data. This also allows users to securely store their health data, and security is incredibly important for health data. There are several widgets that store several variables including but not limited to: time spent in a car over the period of a day, time spent in a gym over the period of a day, and step counter. All of these widgets collectively are input into a life insurance risk factor algorithm, which outputs as a smiley face as user feedback.

How I built it

We built the user interface from the ground up, starting with a couple pages in Flutter that redirect you to the google authentication. After logging in, OptiState directs the user to a home screen full of different customizable widgets that all are input into an algorithm. It starts with Google OAuth, which was a huge learning curve for us to build, and logs you into the home page. Something we built our app around specifically is the distinction between health insurance and life insurance. Obviously, there is correlation, as when you are healthier in general you tend to live longer, but there are also factors that only impact life insurance. For example, using changing latitude and longitude inputs, we built a location tracking speed function using a geolocator to determine how much time a user spends in a car, which would increase the risk of a fatal car collision. This is similar to how the numerical amount of miles miles a person drives in a year adds to their car insurance, since there is more chance of accidents occurring. We also worked on two of the the widgets, utilizing the native pedometer to track a user’s step counter over a period of a day, as well as using the latitude and longitude fetched from the geolocator to connect Google’s Geocoding API as well as their Places API to determine if and when the user’s latitude and longitude correlated with the location of a gym on Google Maps.

Challenges I ran into

The aesthetic UI and navigation properties of the app were a huge challenge, as working in Flutter was a relatively new experience for all of us. Setting up the Google OAuth was a huge barrier to overcome, of which was finally resolved in the wee hours of the night. Finally, setting up Google Cloud API's using Flutter-compatabile packages was a huge annoyance, as there is a ton of Google documentation that is far too cluttered.

Accomplishments that I'm proud of

We are super proud of many achievements that individually took multitudes of work to fix. We are very proud of the UI's appeal to the user, the smooth transitions that are provided by Flutter's widgety system. Finally, the immense workload of over 1000 lines of code in less than 24 hours was an satisfying accomplishment.

What I learned

We've learned a huge variety of both frameworks, niches, compatibility procedures, and implementation formulae. For example, even though none of the team had ever used Firebase before, we integrated Google OAuth after several hours of deliberation. Another two of us, Ryan and Jacob, who had only worked frontend in the past, configured API's for the individual widgets, and included stored variables in databases in backend. For another team member, Matthew, this was his first hackathon event ever! And through a couple hours of Youtube Tutorials and debugging, is now quite proficient in native app development in Flutter.

What's next for OptiState

Although our app was fully developed and ready for rollout, we did have in mind a couple of stretch goals that could be implemented easily if more APIs and time was allotted. For example, instead of using a user’s Google OAuth, if OptiState were integrated with the larger StateFarm family of applications, ideally a user could use encrypted login services to use their general StateFarm login and password information. Another stretch goal could be inputting data from several already set-up devices that a user may have used in the past, such as FitBits or Smartwatches, as well. Additionally, if this app were to be run in the long term, a tensorflow Machine Learning algorithm could be applied to previous sets of data to further measure impact of certain factors on longevity.

Built With

Share this project: