Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

109 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’¬ Chat Karo

A modern full-stack real-time chat application built with the MERN Stack, Socket.IO, and JWT Authentication.

🚧 Status: Actively Under Development

Live Demo Backend API License


πŸ“‘ Table of Contents

  • About
  • Features
  • Tech Stack
  • Project Architecture
  • Folder Structure
  • Screenshots
  • Installation
  • Environment Variables
  • Running Locally
  • API Overview
  • Socket Events
  • Roadmap
  • Known Issues
  • Future Improvements
  • Learning Outcomes
  • Deployment
  • Contributing
  • Author

πŸ“– About

Chat Karo is a real-time chat application built to explore production-level full-stack development using the MERN Stack.

The project focuses on:

  • REST API Development
  • JWT Authentication
  • Real-Time Communication using Socket.IO
  • MongoDB Database Design
  • Redux State Management
  • Secure Backend Architecture
  • Cloud Deployment

This project is continuously improving as I learn more advanced backend and frontend concepts.


✨ Features

βœ… Currently Available

  • User Registration
  • User Login
  • JWT Authentication
  • Protected Routes
  • Real-Time Messaging
  • Online User Status
  • Responsive User Interface
  • MongoDB Integration
  • REST APIs
  • Socket.IO Communication
  • Secure Password Hashing
  • Cloud Deployment

🚧 Upcoming Features

  • Emoji Support

  • User Profiles

  • Friend Requests

  • Push Notifications

  • File Sharing

  • Image Sharing

  • Message Reactions

  • Message Delete

  • Message Edit

  • User Search


πŸ›  Tech Stack

Frontend

  • React.js
  • Vite
  • Redux Toolkit
  • React Router DOM
  • Axios
  • Socket.IO Client
  • CSS

Backend

  • Node.js
  • Express.js
  • MongoDB
  • Mongoose
  • JWT
  • Socket.IO
  • bcrypt
  • Cookie Parser
  • Multer

πŸ— Project Architecture

                User
                  β”‚
                  β–Ό
         React + Redux Frontend
                  β”‚
     REST API + Socket.IO Client
                  β”‚
                  β–Ό
         Express.js Backend
          β”‚               β”‚
          β”‚               β”‚
     JWT Authentication   Socket.IO
          β”‚               β”‚
          β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
                  β”‚
             MongoDB Atlas

πŸ“‚ Folder Structure

Chat-App
β”‚
β”œβ”€β”€ Backend
β”‚   β”œβ”€β”€ Controller
β”‚   β”œβ”€β”€ Middleware
β”‚   β”œβ”€β”€ models
β”‚   β”œβ”€β”€ routes
β”‚   β”œβ”€β”€ Sockets
β”‚   β”œβ”€β”€ uploads
β”‚   β”œβ”€β”€ Utilities
β”‚   β”œβ”€β”€ app.js
β”‚   β”œβ”€β”€ server.js
β”‚   β”œβ”€β”€ package.json
β”‚   └── package-lock.json
β”‚
β”œβ”€β”€ Frontend
β”‚   β”œβ”€β”€ public
β”‚   β”œβ”€β”€ src
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ vite.config.js
β”‚   β”œβ”€β”€ eslint.config.js
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ package-lock.json
β”‚   └── README.md
β”‚
└── README.md

πŸ“Έ Screenshots

πŸ” Login Page

Login Page


πŸ“ Register Page

Register Page


πŸ‘₯ User Search

User Search


πŸ’¬ | User Chat

User Search


πŸ‘€ User Profile

User Profile


πŸ–₯ Frontend Structure

Frontend Structure


βš™οΈ Backend Structure

Backend Structure


πŸ—„οΈ Database

Database


πŸ”Œ API Testing

Postman


⚑ Socket.IO Flow

Socket.IO

πŸš€ Installation

Clone the repository

git clone https://github.com/Code-with-saurabh/Chat-app.git

Go inside the project

cd Chat-app

Backend Setup

cd Backend

npm install

npm start

Frontend Setup

cd Frontend

npm install

npm run dev

πŸ”‘ Environment Variables

Backend (.env)

PORT=

MONGO_URI=

JWT_SECRET=

CLIENT_URL=

Frontend (.env)

VITE_API_URL=

VITE_SOCKET_URL=

🌐 Live Demo

Frontend

https://chat-karo-test-1.abasthan.app/login


Backend

https://fold-wry-gecko.abasthan.app/


πŸ“‘ API Overview

Method Endpoint Description
POST /register Register User
POST /login Login User
POST /logout Logout User
GET /users Get Users
GET /messages Fetch Messages
POST /message Send Message

⚑ Socket Events

Event Description
connection User Connected
disconnect User Disconnected
sendMessage Send Message
receiveMessage Receive Message
onlineUsers Update Online Users

πŸ›£ Roadmap

  • βœ… Authentication

  • βœ… JWT Authorization

  • βœ… Socket.IO Integration

  • βœ… Real-Time Messaging

  • βœ… Online Users

  • ⏳ Typing Indicator

  • ⏳ Notifications

  • ⏳ Image Sharing

  • ⏳ File Upload

  • ⏳ Dark Mode


🐞 Known Issues

  • Some UI improvements are in progress.
  • Performance optimizations are ongoing.
  • More validations will be added in future releases.

πŸ“ˆ Future Improvements

  • Docker Support
  • Redis Caching
  • PostgreSQL + Prisma
  • CI/CD Pipeline
  • Unit Testing
  • Integration Testing
  • AWS Deployment
  • Nginx Reverse Proxy
  • Kubernetes Deployment
  • WebRTC Video Calling

🎯 Learning Outcomes

During this project I learned:

  • Full Stack Application Development
  • REST API Design
  • MongoDB Schema Design
  • Authentication using JWT
  • Password Hashing
  • Socket.IO
  • Redux Toolkit
  • Cloud Deployment
  • Backend Folder Structure
  • Production-Level Project Organization

πŸš€ Deployment

Service Platform
Frontend Abasthan
Backend Abasthan
Database MongoDB Atlas

🀝 Contributing

Contributions are welcome.

If you'd like to improve the project:

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push your branch
  5. Open a Pull Request

πŸ‘¨β€πŸ’» Author

Saurabh Sharma

MERN Stack Developer

GitHub: https://github.com/Code-with-saurabh


⭐ Support

If you found this project helpful,

Please consider giving it a ⭐ on GitHub.

It helps motivate me to continue building and improving open-source projects.


Made with ❀️ by Saurabh Sharma

About

A real-time chat application built with React. This project allows users to create an account, join chat rooms, and send messages in real-time. The application utilizes WebSocket for real-time communication and is designed to be user-friendly and responsive.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages