Building a Chat Application: Step-by-Step Guide — Features & Tech Stack — Part1

Application Requirements
I was building a chat application for one of my clients. The app had basic functionalities that every chat application does, such as
- one-to-one person chat
- typing indicators
- file uploads
- read receipts
- unread message count
- the ability to delete messages
Challenges I faced
However, when I was implementing it, it was difficult for me to figure out how to model the database. For example, if a user is chatting with another person, should the message be added to both users’ records?
I struggled to find good resources online that explained how to model the database and implement the features in a chat application. That’s why I decided to write about my experience and how I solved the issues. My solution may not be perfect, but it solved my client’s issues and met their requirements.
Features I’ll cover in the Series
I am creating a full series where I will explain the code, including working examples and source code. The features I will be covering include
- one-to-one person chat
- group chat
- typing indicators
- file uploads
- read receipts
- unread message count
- delete messages
- audio call
- video call
Technology I’ve Picked
I will be using the following technologies
- MongoDB
- ExpressJs
- Socket.io
- Vitest
- TypeScript
- Docker
- NextJS 14
- Monorepo using Turbo
I hope you find it helpful. And stay tuned.
To read part2 of the series “Building a Chat Application — Bootstrapping an application”.
If you have any questions please do let me know in the comment section. If you want to support me, buy me a coffee here. Thanks for your time and support. Happy Coding.