This repository contains the source code for chat.io, a real-time chat application built with the MERN stack (MongoDB, Express, React, Node.js) and Socket.IO. The app allows users to engage in live chat conversations, displays online users, and features a modern and simple design that is responsive across all devices.
- Real-time messaging: Engage in live chat conversations with other users.
- Online users display: See a list of users who are currently online.
- Responsivity: The app is designed to work seamlessly on all devices, including desktops, tablets, and mobile devices.
- Modern and simple design: The user interface is clean and intuitive, providing a smooth and enjoyable chat experience.
- Frontend: React
- Backend: Node.js and Express
- Database: MongoDB
- Real-time communication: Socket.IO
- Node.js and npm installed on your machine
- MongoDB database connection
-
Clone the repository:
git clone https://github.com/Younesfdj/Chat.io.git
-
Install the dependencies:
cd Chat.io/client && npm install cd Chat.io/server && npm install cd Chat.io/socket && npm install
-
Create a
.env
file in the server directory and provide the following environment variables:MONGODB_URI=<your-mongodb-connection-uri> PORT = 5000 JWT_SECRET =<secret_code> JWT_EXP = 30d
-
Start the development server in socket/server/client:
npm run dev
-
Open your browser and visit
http://localhost:5173
to access the chat.io application.
The project structure is organized as follows:
client
: Contains the React frontend code.server
: Contains the Node.js and Express backend code.socket
: Contains the Socket.io configuration.
This project is licensed under the MIT License.
Enjoy using Chat.io!