This repository contains a full-stack chat application built using the MERN stack (MongoDB, Express.js, React, Node.js). The chat application is designed with various features to enhance user experience, including real-time updates using WebSockets, online status indicators, file uploads/attachments, and auto-scrolling, among others.
- Real-time Communication: Utilizes WebSockets for instant messaging and updates.
- Online Indicator: Shows when users are online/offline.
- File Uploads/Attachments: Allows users to share files during chats.
- Auto-Scrolling: Automatically scrolls to the latest message in active chats.
- Frontend: React.js
- Backend: Node.js, Express.js
- Database: MongoDB
To run this application locally, you need to have Node.js and MongoDB installed on your machine.
-
Clone this repository:
git clone https://github.com/KrlosDev/mern-chat.git
-
Install dependencies:
cd client npm install
cd api npm install
- Create a .env file in the root directory and provide the following variables:
MONGODB_URI=your_mongodb_connection_string PORT=5000 # or any other port you want to use for the server
- Start the client:
npm run dev
- Start the server:
npm start
Contributions are welcome! Please fork this repository and create a pull request with your improvements.