A simple real-time chat application built with React.js, Node.js, Express.js, and Socket.IO. This project demonstrates real-time communication between multiple users using WebSockets.
- 💬 Real-time messaging
- ⚡ Instant message updates using Socket.IO
- 👤 User name input
- 🎨 Modern and responsive UI
- 📱 Mobile-friendly design
- 🔄 Automatic message broadcasting to all connected users
- React.js (Vite)
- Socket.IO Client
- Bootstrap
- CSS3
- Node.js
- Express.js
- Socket.IO
- CORS
chat-app/
│
├── frontend/
│ ├── src/
│ │ ├── App.jsx
│ │ ├── App.css
│ │ └── main.jsx
│ ├── package.json
│ └── vite.config.js
│
├── backend/
│ ├── server.js
│ ├── package.json
│ └── node_modules/
│
└── README.md
git clone https://github.com/your-username/chat-app.gitcd backend
npm install
node server.jsBackend runs on:
http://localhost:5000
Open another terminal.
cd frontend
npm install
npm run devFrontend runs on:
http://localhost:5173
npm install socket.io-client bootstrapnpm install express socket.io cors| Event | Description |
|---|---|
send_message |
Sends a new chat message |
| Event | Description |
|---|---|
receive_message |
Receives the broadcasted message |
- User enters their name.
- User types a message.
- Clicking the Send button emits a
send_messageevent. - The server receives the message.
- Socket.IO broadcasts it to all connected users.
- Every connected client immediately displays the new message.
- 🔐 User Authentication
- 💬 Private Chat
- 👥 Online User List
- ⌨️ Typing Indicator
- 🕒 Message Timestamp
- 😀 Emoji Support
- 📎 File Sharing
- 🗑️ Delete Messages
- 💾 Store Chat History in MongoDB
- 🌙 Dark Mode
Hill Kalola
This project is licensed under the MIT License.
⭐ If you like this project, don't forget to Star the repository!
.png)
.png)
