A real-time chat application built with React, Node.js, Socket.io, and MongoDB.
- Real-time messaging
- Group chats
- Direct messages
- User authentication
- Typing indicators
- Message notifications
Frontend: React, Chakra UI, Socket.io-client
Backend: Node.js, Express, Socket.io
Database: MongoDB
Authentication: JWT
# Start all services
docker-compose up --build
# Access the application
# Frontend: http://localhost:3000
# Backend: http://localhost:5000- Install dependencies
npm install
cd client && npm install && cd ..- Environment Setup
# Create .env file with:
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
JWT_EXPIRE=2d
NODE_ENV=development- Run the application
# Terminal 1 - Backend
npm run server
# Terminal 2 - Frontend
npm run clientPre-configured test accounts:
- test1@example.com / password123
- test2@example.com / password123
- test3@example.com / password123
- guest@example.com / 123456
prchat/
├── client/ # React frontend
├── controllers/ # Express controllers
├── middleware/ # Auth middleware
├── models/ # Database models
├── routes/ # API routes
├── server.js # Express server
└── docker-compose.yml
MIT