Inspiration
This project was inspired by a common situation we run into every day: getting to our destination safely. Just this week, one of our members ran into a scary situation while getting home. Most of the time, we text our friends to let them know once we’ve arrived to let them know we are safe. But, more often than not, college students have many tasks to think about and forget to check in! We thought that this could lead to a dangerous situation in the case that a friend actually did not get back home safely and something happened. That’s where calmemaybe comes in. A Berkeley themed spin-off of the popular Carly Rae Jepsen song titled “Call Me Maybe”, calmemaybe facilitates each step in a safe trip to one’s destination.
What it does
Walking alone? Tell calmemaybe. Users log the start of their trip, along with an estimated time of trip completion. Calmymaybe notifies every member in that user’s circle (generally, close friends and/or family) that the user has started a trip. Internally, calmemaybe starts a timer, counting down until the estimated time of arrival. If the user ends their trip prior to the time of arrival, all is well and there is no cause for concern. However, if calmemaybe has not heard back from the user past their estimated time of arrival, it alerts all members of the user’s circle--encouraging them to actively check in on the user and ensure that everything is okay.
How we built it
We built calmemaybe as a Flask application using Ngrok with the Twilio API, making the most of the webhook functionality for receiving messages from the user, and sending replies with TwiML.
Our first step was to start with the basic functionality - getting a free Twilio number and sending messages via the Twilio API to our phones. Then we took it one step further because we wanted the ability to have back and forth conversations with our users. We utilized webhooks and TwiML to create a web application that was able to receive messages and respond accordingly. Because the webpage had to be public, we couldn’t just use the local flask server and used a tool called ngrok to create temporary publicly accessible tunnels (through a lot of googling!)
Our final step was to integrate a timer using multi-threading in order to allow the emergency message to be sent after the time it would take the user to reach their destination as prompted to. Two minutes after the user was meant to get home, the emergency message is sent to the friend if the user has not indicated their arrival at their destination. This reminds the friend to check in to see if their friend has gotten home safely.
Challenges we ran into
Our very first challenge was how to send a single text message through Twilio. Instead of directly saving our variables to our code, we needed to create a .env file and export variables and their values there. We learned about security concerns with pushing our code to a GitHub repository, and learned how to securely store our keys/values despite having a public project.
When integrating the timer, we realized that we needed a way to allow the user to continue being able to text updates simultaneously when the timer ran. We were able to accomplish this through threading, and a series of helper functions across classes.
Every time we realized we needed to integrate new functionality, whether it be a new API or framework, we had to read through online documentation, understand how to correctly download to our personal devices, and debug how each layer of complexity would build on our existing framework. Many times, we realized that due to the nature of Twilio requests, we were unable to access any variables created outside our request function from within the function. In finding workarounds to this challenge, we integrated lambda functions, and created our own additional classes and libraries.
Accomplishments that we're proud of
We are proud of our punny name, the fact that we learned how to use the Twilio API and Flask in such a short period of time, and how we were able to meet almost all of our deliverables for a working system! Oh, and the first time we got a text from our program to our numbers was a pretty sweet moment (even though it was a picture of a random robot telling us to run for the hills from a demo we found :).
What we learned
We’d never used any of the tools we worked with before, so there was a lot to learn! From how to register and create numbers through Twilio, to sending and receiving text messages, to building a public webhook by integrating Flask and Ngrok, and automating message replies using TwiML, our process involved constantly discovering new tools and learning how to integrate them into our project. We learned how to brainstorm and polish ideas, create a project plan with a Minimum Viable Product (MVP) and additional features, and ultimately weave together various technical components into our final product.
What's next for calmemaybe
So much! Next steps include:
- Integrating a database to allow for multiple users/a way to persist user circles across sessions
- Allowing for trip delays--a way to reset the timer when the user is okay, but will not get to their destination by their predicted time
- An easy to navigate user interface that sends out an indication that the trip has begun with just a selection of destination and a click of a button
- The time it would take to reach the destination would be calculated using Google Maps, and would not have to be entered in manually by the user

Log in or sign up for Devpost to join the conversation.