A scalable real-time chat application built with modern technologies to provide live messaging, user authentication, and online/offline status tracking. Designed with a responsive UI and containerized for easy deployment.
- Real-Time Messaging: Instant communication using WebSockets via Socket.IO.
- User Authentication: Secure login and registration system.
- Online Status Updates: Tracks user availability with Redis.
- Persistent Chat History: Stores messages and conversation data in PostgreSQL.
- Scalable and Portable: Dockerized for seamless deployment and scaling.
- Enhanced User Experience: Includes chat search, unread message indicators, and a responsive interface.
- Frontend: React, Chat UI Kit
- Backend: Node.js, Express.js
- Real-Time Communication: Socket.IO
- Database: PostgreSQL
- Caching and Status Management: Redis
- Containerization: Docker
- Ensure you have the following installed:
- Node.js
- Docker
- React
- Clone the Repository:
git clone https://github.com/yourusername/real-time-chat-app.git cd real-time-chat-app
- Run the Docker:
docker-compose up
- Start Backend:
cd backend npm install npm start
- Start Frontend:
cd frontend npm install npm start
root/
├── backend/
│ ├── msg_db.js # Database queries for messages
│ ├── SocketServer.js # Socket.IO server logic
│ ├── server.js # Express server setup
│ ├── search.js # Search functionality
│ ├── login_register.js # User login and registration
│ ├── init.sql # SQL file for database initialization
│ ├── docker-compose.yaml # Docker Compose configuration
├── frontend/
│ ├── src/
│ │ ├── App.css # Stylesheets
│ │ ├── login.jsx # Login page
│ │ ├── home.jsx # Home page contains the main app
- /api/login: logs in the user
- /api/register: registers an user
- /api/store: Store chat messages.
- /api/retrieve: Retrieve chat history.
- /api/prevchats: Fetch user’s recent chats.
- /api/search: search an user
- Group chats and file sharing.
- adding encryption for messages to improve security
- Deployment on cloud platforms like AWS/GCP.