A real-time chat application built using Node.js, Socket.io, and Redis. This application allows users to join chat rooms, exchange messages, and see online users in real time.
- Real-Time Messaging: Users can send and receive messages instantly using Socket.io.
- Chat Rooms: Join different chat rooms and communicate with users.
- User Presence: Track online users using Redis for session management.
- Message History: Temporary storage of messages using Redis Streams.
- Responsive Design: User-friendly interface that works on different devices.
- Backend: Node.js, Express, Socket.io
- Redis: Used for session management, message broadcasting, logging history, and tracking user presence.
- Frontend: HTML, CSS, JavaScript (with Socket.io for real-time communication)
- Node.js (>=14.x)
- Redis (installed and running)
-
Clone the repository:
git clone https://github.com/Vrana710/ChatApp-Redis.git cd ChatApp-Redis
-
Install dependencies:
npm install
-
Start the Redis server: Make sure your Redis server is running. You can start it with the command:
redis-server
-
Run the application:
node app.js
-
Open your browser: Navigate to
http://localhost:3000
to access the chat application.
- Upon launching the application, users will be prompted to enter their name.
- Once connected, users can send messages by typing in the input field and pressing Enter.
- Messages will appear in the chat box with the sender's name.
- You can open multiple browser tabs to simulate different users chatting.
Watch the demo video of the ChatApp-Redis
Demo.mp4
Alternatively, you can view the video directly in the browser here.
Note: If you are not able to see the video, you may need to download it to view it properly.
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-YourFeature
). - Make your changes and commit them (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-YourFeature
). - Open a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.
If you have any questions or suggestions, feel free to contact me at [email protected].