Skip to content

Latest commit

 

History

121 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RealTime chatrooms

A real-time chat room platform built with React, Node.js, Express, Socket.IO, and MongoDB. Users can create rooms, join with a unique code, chat instantly with others, and see live online activity.

Features

  • Unique client-based user system
  • Create and manage chat rooms
  • Join rooms using generated room codes
  • Real-time messaging with Socket.IO
  • Live online user count
  • Persistent message storage with MongoDB
  • Message history loading after refresh
  • Instant updates without page refresh
  • Modern responsive UI

Tech Stack

Frontend

  • React
  • TypeScript
  • Tailwind CSS
  • Zustand
  • Socket.IO Client
  • Vite

Backend

  • Node.js
  • Express.js
  • TypeScript
  • Socket.IO
  • MongoDB
  • Mongoose

Preview

2026-07-15.19-26-15.mov

How It Works

  1. User receives a unique client ID stored locally.

  2. Users can create a room or join an existing room using a code.

  3. When entering a room:

    • Username is created if needed.
    • User joins the Socket.IO room.
    • Previous messages are loaded from MongoDB.
  4. New messages are:

    • Saved in MongoDB.
    • Broadcast instantly to everyone in the room.

Running Locally

Clone repository

git clone
cd project-name

Backend Setup

cd backend
npm install

Create a .env file:

PORT=8000
MONGO_URI=your_mongodb_connection_string
FRONTEND=http://localhost:5173
GEMINI_API_KEY=<paste your gemini api key for message moderation>

Start server:

npm run dev

Frontend Setup

cd frontend
npm install

Create .env:

VITE_API_URL=http://localhost:8000

Start frontend:

npm run dev

Acknowledgments

I used AI tools like ChatGPT and Claude to help with the frontend development, including UI design ideas, component structure, and styling. The backend, real-time functionality, database setup, and overall project integration were built by me.


Future Improvements

  • User authentication
  • File sharing
  • Emoji reactions
  • Notifications
  • Typing indicators
  • Message moderation
  • Mobile app version

Author

Arham Kabir

Backend Developer focused on building scalable APIs and real-time applications.


License

This project is licensed under the MIT License.

About

A full-stack real-time chat application built with React, TypeScript, Node.js, Socket.IO, and MongoDB. Supports live messaging, user sessions, and real-time communication using WebSockets.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages