A modern, real-time chat application built with Node.js, Express, Socket.io, MongoDB, and React.
- Real-time messaging with Socket.io
- User authentication and registration
- Live chat rooms with instant message delivery
- Modern React UI with responsive design
- Redux state management for efficient data handling
- Real-time notifications for new messages
- User online/offline status
- Node.js - Runtime environment
- Express.js - Web framework
- Socket.io - Real-time communication
- MongoDB - Database
- JWT - Authentication
- React - UI library
- Vite - Build tool
- Redux Toolkit - State management
- Socket.io Client - Real-time client
- CSS3 - Styling
Convox/
├── backend/ # Backend server
│ ├── config/ # Database configuration
│ ├── controllers/ # Route controllers
│ ├── middleware/ # Authentication middleware
│ ├── models/ # Database models
│ ├── routes/ # API routes
│ ├── socket/ # Socket.io configuration
│ └── index.js # Server entry point
├── frontend/ # React application
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── redux/ # Redux store and slices
│ │ └── config.js # Configuration
│ └── package.json
└── README.md
- Node.js (v14 or higher)
- MongoDB
- npm or yarn
-
Clone the repository
git clone https://github.com/PankajSingh34/Convox.git cd Convox -
Install backend dependencies
cd backend npm install -
Install frontend dependencies
cd ../frontend npm install -
Set up environment variables Create a
.envfile in the backend directory:MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret PORT=5000
-
Start the backend server
cd backend npm start -
Start the frontend development server
cd frontend npm run dev -
Open your browser Navigate to
http://localhost:5173(or the port shown in your terminal)
- Register a new account or Login with existing credentials
- Start chatting with other users in real-time
- Send messages that appear instantly for all online users
- See who's online and their current status
POST /api/users/register- User registrationPOST /api/users/login- User login
GET /api/messages- Get all messagesPOST /api/messages- Send a new message
connection- User connectsdisconnect- User disconnectssendMessage- Send a messagenewMessage- Receive a new message
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Pankaj Singh
- GitHub: @PankajSingh34
- Socket.io for real-time communication
- React team for the amazing UI library
- MongoDB for the database solution
- Express.js for the robust backend framework
⭐ Star this repository if you find it helpful!