DEV Community

Cover image for I Built a Real-Time Chat App From Scratch — Then Realized That Wasn't Enough
Heghine
Heghine

Posted on

I Built a Real-Time Chat App From Scratch — Then Realized That Wasn't Enough

Source

GitHub: https://github.com/ZeroaNinea/Real-Time-Chat-App

Why I Built It

I started this project as a simple pet project to help me get a job.

I built a real-time chat application from scratch, solving problems step by step and turning it into something that actually worked.

But after finishing it, I didn't immediately start applying.

Instead, I thought:

"I need to learn more first."

So I spent the next seven months learning frameworks like React, Vue, Next.js, and Nest.js.

Only later did I realize something important:

I could have already started looking for a job.

After that, I spent two more months on LinkedIn and writing posts, but still didn't get results.

That's when it became clear:

  • Building projects is important.
  • Learning is important.
  • But knowing how to present yourself and reach people matters just as much.

The Biggest Challenge: WebSockets and Structure

One of the hardest parts of the project was working with WebSockets using Socket.io.

At the time:

  • I didn't fully understand how it worked.
  • I couldn't properly connect users to rooms.
  • all my Socket.io logic was in one huge file.

It quickly became difficult to manage.

The real issue wasn't just bugs — it was structure.

After refactoring:

  • I split the logic into smaller parts
  • separated responsibilities
  • made the system easier to understand

That was a turning point.


Mistakes I Made

A major mistake was not clearly separating real-time and non-real-time logic.

I relied heavily on WebSockets early on, which led to:

  • Mixing different types of functionality.
  • Unclear architecture.

If I were to rebuild it, I would:

  • Use REST APIs for standard operations.
  • Use WebSockets only where real-time updates are necessary.
  • Define clear boundaries from the beginning.

What I'd Improve

There's still a lot I want to improve:

Features

  • File uploads (images, videos, text files).
  • Highlighting the current channel.
  • Customizable themes (including dark mode variants).
  • Movable UI elements.

UX

  • Better message display and layout

Architecture

  • End-to-end encryption.
  • A separate service for encryption key rotation.

What I Learned

The biggest lesson wasn't technical.

It was this:

Building something real is necessary — but it's not enough on its own.

You also need to:

  • Show your work.
  • Communicate clearly.
  • Reach the right people.

Otherwise, even a solid project can go unnoticed.


Afterword

This project became more than just a chat app.

It taught me:

  • How to build real systems.
  • How to deal with complexity.
  • And how important visibility is.

If you're learning development, don't just build —
make sure people can actually see what you've built.

Top comments (0)