Creating a real-time chat system from scratch using WebSockets, Prisma, and PostgreSQL.


I'm building a full-stack collaborative app inspired by tools like Notion and Slack. The vision? Real-time chat, shared documents, and even AI features like summarizing and explaining content.

This is Part 1 of the journey — where I built the chat system that powers real-time communication between users in the same room.


🛠️ Tech Stack

  • Frontend: React + Tailwind CSS
  • Backend: Node.js + Express
  • Database: PostgreSQL (via Neon)
  • ORM: Prisma
  • WebSocket: ws library

✨ Features

  • ✅ Signup / Login / Logout with JWT
  • ✅ Join or create chat rooms
  • ✅ Real-time messaging via WebSockets
  • ✅ Typing indicators (who’s typing?)
  • ✅ Messages stored in PostgreSQL
  • ✅ Secure token-based auth

Each chat room works like a real-time space where users can message, see typing activity, and stay synced with others instantly.


🖼️ Preview

_
See how the chat app works


🧠 Key Learnings

  • WebSocket architecture for multiple rooms requires clean message protocols and user-session tracking.
  • Prisma makes schema modeling and database integration straightforward.
  • Building a custom typing indicator system was surprisingly fun!

🔮 What’s Next?

The chat system is just the beginning. Here’s what’s coming up:

  • 📝 Collaborative documents with Tiptap + Hocuspocus
  • 🤖 AI integration for:
    • Chat summarization
    • Contextual explanations of documents

This is shaping up to be a real-time, AI-powered team workspace tool.


🔗 GitHub Repo

👉 Check out the code on GitHub


Thanks for reading! This is part of a devlog-style series where I’ll be building the entire app in public. If you're interested in collaborative tools, AI integration, or full-stack dev, follow along. 🚀