All work
Real-time2024

YASHCHAT

One-to-one chat over WebSockets

YASHCHAT interface

The problem

I wanted to understand how a real-time application moves messages between clients while retaining accounts, conversations, and message history.

My contribution

Built the application independently, covering registration and login, one-to-one conversation creation, the responsive chat interface, Socket.io messaging, MongoDB persistence, and light and dark themes.

Key decisions

  • 01Scoped Socket.io traffic to conversation rooms so messages are sent to the relevant one-to-one chat.
  • 02Authenticated socket connections with JWT before allowing a client to join a room or send a message.
  • 03Persisted messages through Mongoose and loaded recent conversation history when a client joins a chat.

Outcome

Completed the application and developed a practical understanding of real-time communication with WebSockets and Socket.io.

Next project

YASHSTORE