beFriendly

Find new friends in an interactive way!

Project overview

beFriendly is a web application developed using React and Express, and it's containerized into Docker image. The is app aimed at facilitating meaningful connections between users. Individuals can select their nicknames and enter a matchmaking pool to be paired with other random users. After getting paired, users are prompted by a set of 10 random questions about personality that need to be answered in 2 minutes. After answering, pairs can engage in dialogue within a dedicated chat room, with their answers displayed right next to the chat window.

Project features

  • Matchmaking system for pairing users into chatrooms.

  • Socket.io event listeners for handling user actions:

    • Connect / Disconnect.
    • Activity in chat.
    • Answering progress.
    • Sending messages.
  • Full chatting experience with modern features:ting.

    • Adding reactions to messages.
    • Replying to other messages.
    • Emoji selection menu.

System design

I wanted to keep everything as simple as possible because the app itself is pretty small and I wanted to deploy working website fast. Therefore, the architecture of the app is very simple. On the client side there's mainly three parent components that work as pages and on the server side I created two files: index.js where I implemented all the socket.io event listeners and utils.js which has all the logic for handling matchmaking and user states. Below I created a visualization of how user matchmaking is handled on the server:

User flow diagram

Testing

I wanted to check the performance of my Express server and matchmaking implementation so I ran load tests with Artillery. The results for javascript server were pretty good in my opinion. The server can handle about 2000+ users concurrently without any issue. Here is actual results from the test:

Testing screenshot