This project aims to provide a real-time chat experience that's both scalable and secure. With a focus on modern technologies, we're building an application that's easy to use and maintain.
-
User Interaction:
- Users interact with the frontend application running in their browser. This includes actions like logging in, sending messages, and navigating through the chat interface.Frontend (React App):The frontend is responsible for rendering the user interface and handling user inputs.It communicates with the backend via HTTP requests (for RESTful APIs) and WebSocket connections (for real-time interactions).
-
Backend (Node.js/Express + Socket.io):
- The backend handles all the server-side logic.It processes API requests from the frontend to perform actions such as user authentication, message retrieval, and message storage.Socket.io is used to manage real-time bi-directional communication between the frontend and the backend. This allows for instant messaging features, such as showing when users are typing or when new messages are sent.
-
MongoDB (Database):
- MongoDB stores all persistent data for the application, including user profiles, chat messages, and any other relevant data.The backend interacts with MongoDB to retrieve, add, update, or delete data based on the requests it receives from the frontend.
- Real-time Messaging: Send and receive messages instantly using Socket.io
- User Authentication & Authorization: Securely manage user access with JWT
- Scalable & Secure Architecture: Built to handle large volumes of traffic and data
- Modern UI Design: A user-friendly interface crafted with React and TailwindCSS
- Profile Management: Users can upload and update their profile pictures
- Online Status: View real-time online/offline status of users
- Backend: Node.js, Express, MongoDB, Socket.io
- Frontend: React, TailwindCSS
- Containerization: Docker
- Orchestration: Kubernetes (planned)
- Web Server: Nginx
- State Management: Zustand
- Authentication: JWT
- Styling Components: DaisyUI
- Navigate to the
backenddirectory:
cd backend- Create a
.envfile and add the following content (modify the values as needed):
MONGO_URI=mongodb://root:admin@mongo:27017/chat-app?authSource=admin
JWT_SECRET=your_jwt_secret_key
PORT=5001Note: Replace
your_jwt_secret_keywith a strong secret key of your choice.
git clone https://github.com/Debjyoti2004/ChatLoop.gitFollow these steps to build and run the application:
- Build & Run the Containers:
cd ChatLoopdocker-compose up -d --build- Access the application in your browser:
http://localhost:8080
Follow these simple steps to get the project up and running on your local Host using docker.
git clone https://github.com/Debjyoti2004/ChatLoop.gitcd ChatLoopdocker network create chart-app-networkcd frontenddocker build -t chat-app-frontend .docker run -dp --network=chart-app-network 8080:80 chat-app-frontenddocker run -d -p 27017:27017 --name mongo mongo:latestcd backenddocker build -t chat-app-backend .docker run -dp --network=chart-app-network 5001:5001 --env-file .env chat-app-backend
http://localhost:5001/api/auth/testBackend API: http://localhost:5001
docker-compose logs -fOnce the backend and frontend containers are running, you can access the application in your browser:
Frontend: http://localhost:8080
You can now interact with the real-time chat app and start messaging!
We welcome contributions from DevOps & Developer of all skill levels! Here's how you can contribute:
Report bugs: If you encounter any bugs or issues, please open an issue with detailed information. Suggest features: Have an idea for a new feature? Open an issue to discuss it with the community. Submit pull requests: If you have a fix or a feature you'd like to contribute, submit a pull request. Ensure your changes pass any linting or tests, if applicable.
We invite you to join our community of developers and contributors. Let's work together to build an amazing real-time chat application!
- Star this repository to show your support
- Fork this repository to contribute to the project
- Open an issue to report bugs or suggest features
- Submit a pull request to contribute code changes
This project is licensed under the MIT License. See the LICENSE file for more details.


