A real-time, secure, and scalable messaging platform built with Node.js, Express, MongoDB, Socket.io, and React.
Deployed Link:- https://chatwaveio.netlify.app/
- Real-time messaging with Socket.io
- Secure user authentication with JWT
- MongoDB for data storage
- Modern React frontend with Tailwind CSS
- User presence tracking
- Typing indicators
- Message read receipts
- Responsive design
- Node.js
- Express
- MongoDB
- Socket.io
- JWT Authentication
- Redis (optional, for caching)
- React
- Tailwind CSS
- Socket.io Client
- React Router
- React Hot Toast
- Node.js (v14 or higher)
- MongoDB
- npm or yarn
-
Navigate to the backend directory:
cd backend -
Install dependencies:
npm install
-
Create a
.envfile in the backend directory with the following variables:PORT=5000 MONGODB_URI=mongodb://localhost:27017/chatwave JWT_SECRET=your_jwt_secret_key_here JWT_EXPIRE=30d CLIENT_URL=http://localhost:5173
-
Start the backend server:
npm run dev
-
Navigate to the frontend directory:
cd frontend/client -
Install dependencies:
npm install
-
Create a
.envfile in the frontend/client directory with the following variables:VITE_API_URL=http://localhost:5000
-
Start the frontend development server:
npm run dev
- Make sure MongoDB is running on your local machine
- Update the
MONGODB_URIin the backend.envfile if needed
- Install Redis on your machine
- Uncomment and update the Redis configuration in the backend
.envfile
POST /api/auth/register- Register a new userPOST /api/auth/login- Login userPOST /api/auth/logout- Logout userGET /api/auth/me- Get current user
GET /api/chat/conversations- Get all conversationsGET /api/chat/messages/:conversationId- Get messages for a conversationPUT /api/chat/messages/read- Mark messages as readDELETE /api/chat/messages/:messageId- Delete a messageGET /api/chat/users/search- Search users
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Socket.io for real-time communication
- MongoDB for database
- React for frontend framework
- Tailwind CSS for styling