A real-time chat application built with Node.js, MongoDB, JWT, and Socket.io for the backend, and Next.js for the frontend.
- Real-time messaging with WebSocket using Socket.io
- User authentication with JWT
- Chat rooms and user management
- Responsive design
The backend is built with Node.js and provides the following features:
- Node.js: Server-side runtime environment.
- MongoDB: NoSQL database for storing user and chat data.
- JWT: JSON Web Tokens for secure user authentication.
- Socket.io: Real-time bidirectional event-based communication.
The frontend is developed with Next.js and includes:
- Next.js: React framework for server-side rendering and static site generation.
- Node.js (v14 or later)
- MongoDB instance
Clone the repository
git clone https://github.com/yourusername/your-repo.git
cd your-repo
Install backend dependencies
cd Server
npm install
Install frontend dependencies
cd ../client
npm install
Configure environment variables
Create a .env file in the Server directory and add your MongoDB connection string and other configurations:
.env
MONGO_URI=mongodb://localhost:27017/yourdbname
JWT_SECRET=your_jwt_secret
Run the backend
cd Server
npm start
Run the frontend
cd ../client
npm run dev
The frontend will be available at http://localhost:3000.
Usage
Open http://localhost:3000 in your browser.
Register a new account or log in with an existing one.
Join chat rooms and start messaging in real-time.
Contributing
Feel free to open issues or submit pull requests to improve the application.
Contact For any questions or support, please contact jithinbinoyp@gmail.com.