✨ Inspiration

Quarantining is hard, and during the pandemic, symptoms of anxiety and depression are shown to be at their peak πŸ˜”[source]. To combat the negative effects of isolation and social anxiety [source], we wanted to provide a platform for people to seek out others with similar interests. To reduce any friction between new users (who may experience anxiety or just be shy!), we developed an AI recommendation system that can suggest virtual, quarantine-safe activities, such as Spotify listening parties🎡, food delivery suggestions πŸ”, or movie streaming πŸŽ₯ at the comfort of one’s own home.

🧐 What it Friendle?

Quarantining alone is hardπŸ˜₯. Choosing fun things to do together is even harder 😰.
After signing up for Friendle, users can create a deck showing their interests in food, games, movies, and music. Friendle matches similar users together and puts together some hangout ideas for those matched. πŸ€πŸ’– I

πŸ§‘β€πŸ’» How we built Friendle?

To start off, our designer created a low-fidelity mockup in Figma to get a good sense of what the app would look like. We wanted it to have a friendly and inviting look to it, with simple actions as well. Our designer also created all the vector illustrations to give the app a cohesive appearance. Later on, our designer created a high-fidelity mockup for the front-end developer to follow.

The frontend was built using react native.

arch diagram

We split our backend tasks into two main parts: 1) API development for DB accesses and 3rd-party API support and 2) similarity computation, storage, and matchmaking. Both the APIs and the batch computation app use Firestore to persist data.

☁️ Google Cloud

For the API development, we used Google Cloud Platform Cloud Functions with the API Gateway to manage our APIs. The serverless architecture allows our service to automatically scale up to handle high load and scale down when there is little load to save costs. Our Cloud Functions run on Python 3, and access the Spotify, Yelp, and TMDB APIs for recommendation queries. We also have a NoSQL schema to store our users' data in Firebase.

πŸ–₯ Distributed Computer

The similarity computation and matching algorithm is powered by a node.js app which leverages the Distributed Computer for parallel computing. We encode the user's preferences and Meyers-Briggs type into a feature vector, then compare similarity using cosine similarity. The cosine similarity algorithm is a good candidate for parallelizing since each computation is independent of the results of others.

We experimented with different strategies to batch up our data prior to slicing & job creation to balance the trade-off between individual job compute speed and scheduling delays. By selecting a proper batch size, we were able to reduce our overall computation speed by around 70% (varies based on the status of the DC network, distribution scheduling, etc).

😒 Challenges we ran into

  • We had to be flexible with modifying our API contracts as we discovered more about 3rd-party APIs and our front-end designs became more fleshed out.
  • We spent a lot of time designing for features and scalability problems that we would not necessarily face in a Hackathon setting. We also faced some challenges with deploying our service to the cloud.
  • Parallelizing load with DCP

πŸ† Accomplishments that we're proud of

  • Creating a platform where people can connect with one another, alleviating the stress of quarantine and social isolation
  • Smooth and fluid UI with slick transitions
  • Learning about and implementing a serverless back-end allowed for quick setup and iterating changes.
  • Designing and Creating a functional REST API from scratch - You can make a POST request to our test endpoint (with your own interests) to get recommended quarantine activities anywhere, anytime 😊

e.g. curl -d '{"username":"turbo","location":"toronto,ca","mbti":"entp","music":["kpop"],"movies":["action"],"food":["sushi"]}' -H 'Content-Type: application/json' ' https://recgate-1g9rdgr6.uc.gateway.dev/rec'

πŸš€ What we learned

  • Balancing the trade-off between computational cost and scheduling delay for parallel computing can be a fun problem :)
  • Moving server-based architecture (Flask) to Serverless in the cloud ☁
  • How to design and deploy APIs and structure good schema for our developers and users

⏩ What's next for Friendle

  • Make a web-app for desktop users 😎
  • Improve matching algorithms and architecture
  • Adding a messaging component to the app
+ 4 more
Share this project:

Updates