Inspiration

After two years of isolation during the COVID-19 pandemic, we found it hard to make connections and rebuild friendships. To bring people back together, we created uKnight to drive people back together through spontaneous and low-friction interactions.

What it does

uKnight connects people through text while keeping their identities anonymous. Users text uKnight to match with another user. For conversations about more specific topics, users may input up to three interests and uKnight will use a machine learning algorithm to determine the best person to match them with. uKnight acts as a text bridge between two people to keep each person's phone number a secret so there's no risk .

How we built it

The backbone of our app uses Twilio to facilitate communication between users. When a user texts the uKnight phone number with !start, their information is held within a pool of numbers to be matched. When our machine learning algorithm matches two numbers, Twilio forwards all texts to the matching number. Users may stop chatting by texting !quit and may be matched with another user.

The Twilio app was built on a Python Flask app hosted on Google Compute Engine E2 instance, connecting to Twilio through HTTP webhooks. The app also connects to a MySQL database hosted on Google Cloud SQL to store phone numbers and user interests. The app has CircleCI integration, and each commit pushed to the Github repository is automatically ran against a suite of tests to ensure stability of our builds.

The front end website is a minimalist HTML5 setup hosted on Github Pages. We used a domain from Domain.com and redirected it to Github Pages by configuring DNS records. Github Actions is used to continuously integrate and deploy the website.

Challenges we ran into

A difficult design challenge early in the process was figuring out how to match users and how to track matched users. We settled on using a pool to store users to ensure fast lookups when matching users together.

One issue we had with implementation was getting the Twilio webhooks to hit a static IP address; that is, our E2 instance. We previously used ngrok, but the ngrok session expires after a few hours and the URL is dynamic. We finally resolved this by configuring our E2 firewalls and debugging the network traffic to determine the right endpoint to provide to Twilio.

Accomplishments that we're proud of

We're very proud of getting our application to run on Google Cloud. Having it run on a virtual machine in the cloud ensures that our application is not exposed to the instability of our local machines and ensures high uptime. Additionally, this makes it easily scalable so we can quickly handle an increase of load if more users join by increasing the database size or available computational power.

Our machine learning matching algorithm is also very novel. We found that simply matching interests as strings did not work very well, so we calculated a similarity score between interests which greatly helped our matching algorithm, so people with similar interests could be matched quickly.

What we learned

Building a full stack application has taught us a lot. We've learned a lot about developing on the cloud and all the nuances that come with it, such as network firewalls and ssh tunnels. We also were able to explore Twilio's SMS API in depth to get the most value out of texts. We also learned how to use machine learning to drive better matches among our diverse world and to create connections that may have not been possible before.

What's next for uKnight

Next, we hope for uKnight to connect even more people. We'll do this by expanding the functionality of the application to have more features such as group connections and multiple connections for a single person. We also hope to support voice messages in addition to SMS.

Share this project:

Updates