Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A full-featured real-time chat application built with the MERN stack (MongoDB, Express, React, Node.js) and Socket.IO for real-time communication.

Notifications You must be signed in to change notification settings

Saurabhtbj1201/chat-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’¬ Real-Time Chat Application

A full-featured real-time chat application built with the MERN stack (MongoDB, Express, React, Node.js) and Socket.IO for instant communication.

Chat App Screenshot

πŸš€ Live Demo

πŸ”— https://master.d1mxcnht7o30t1.amplifyapp.com/


🧩 Features

  • ⚑ Real-time messaging using Socket.IO
  • πŸ” User authentication with JWT & Passport.js
  • 🌐 Social login (Google, Facebook, GitHub, Twitter)
  • πŸ§‘β€πŸŽ¨ Customizable user profiles & avatars
  • πŸ’¬ One-on-one and group chats
  • πŸ“Ά Online/offline status
  • ✍️ Typing indicators
  • πŸ“¬ Message status (sent, delivered, read)
  • πŸ‘οΈβ€πŸ—¨οΈ Read receipts
  • πŸ” User search
  • πŸ“± Fully responsive design
  • πŸ“§ Password reset via email

πŸ› οΈ Technology Stack

πŸ–₯️ Backend

Tech Description
Node.js JavaScript runtime
Express.js Web framework
MongoDB Database
Mongoose MongoDB object modeling
Socket.IO Real-time communication
JWT Authentication
Passport.js Authentication strategies
Bcrypt Password hashing
Nodemailer Email sending
Multer File uploads

🌐 Frontend

Tech Description
React UI library
React Router Routing
Context API State management
Axios HTTP client
Socket.IO Real-time client
Framer Motion Animations
React Icons UI icons
CSS3 Styling

πŸ“¦ Prerequisites

Ensure the following are installed on your system:

  • Node.js (v14.x or later)
  • npm (v6.x or later)
  • MongoDB (Local or Atlas)
  • Git

Setup Instructions

1. Clone the Repository

git clone https://github.com/Saurabhtbj1201/chat-app.git
cd chat-app

2. Backend Setup

# Navigate to backend folder
cd backend

# Install dependencies
npm install

# Create .env file
cp .env.example .env

Edit the .env file with your configuration:

MONGODB_URI=mongodb://<username>:<password>@cluster0.mongodb.net/chat-app?retryWrites=true&w=majority
JWT_SECRET=your_jwt_secret
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
FACEBOOK_APP_ID=your_facebook_app_id
FACEBOOK_APP_SECRET=your_facebook_app_secret
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
TWITTER_API_KEY=your_twitter_api_key
TWITTER_API_SECRET=your_twitter_api_secret
SENDGRID_API_KEY=your_sendgrid_api_key

3. Frontend Setup

# Navigate to frontend folder
cd frontend

# Install dependencies
npm install

# Create .env file
cp .env.example .env

Edit the .env file with your configuration:

REACT_APP_API_URL=http://localhost:5000/api
REACT_APP_SOCKET_URL=http://localhost:5000

4. Running the Application

# Start the backend server
cd backend
npm run dev

# In a new terminal, start the frontend server
cd frontend
npm start

Usage

  1. Register a new account or log in with an existing account.
  2. Complete your profile and upload a profile picture.
  3. Add friends or search for users to chat with.
  4. Start chatting in real-time!

Contributing

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/YourFeature)
  3. Make your changes
  4. Commit your changes (git commit -m 'Add some feature')
  5. Push to the branch (git push origin feature/YourFeature)
  6. Open a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❀️ by Saurabh Kumar

πŸ”— Connect With Me

LinkedIn Twitter Instagram Facebook Quora Blogger Medium Portfolio WhatsApp


About

A full-featured real-time chat application built with the MERN stack (MongoDB, Express, React, Node.js) and Socket.IO for real-time communication.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published