https://github.com/jithinbinoy2000/nextjs-chatapp-websocket
Real-Time Chat Application With NextJS, WebSocket ,and Authentication
https://github.com/jithinbinoy2000/nextjs-chatapp-websocket
bycr chat-application mongodb nextjs14 socket-io websocket
Last synced: 4 months ago
JSON representation
Real-Time Chat Application With NextJS, WebSocket ,and Authentication
- Host: GitHub
- URL: https://github.com/jithinbinoy2000/nextjs-chatapp-websocket
- Owner: jithinbinoy2000
- Created: 2024-09-09T09:45:00.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-09-10T11:31:47.000Z (almost 2 years ago)
- Last Synced: 2025-03-28T20:35:55.704Z (about 1 year ago)
- Topics: bycr, chat-application, mongodb, nextjs14, socket-io, websocket
- Language: JavaScript
- Homepage: https://next-js-chat-app-websocket.vercel.app
- Size: 444 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Chat Application
A real-time chat application built with Node.js, MongoDB, JWT, and Socket.io for the backend, and Next.js for the frontend.
## Features
- Real-time messaging with WebSocket using Socket.io
- User authentication with JWT
- Chat rooms and user management
- Responsive design
## Backend
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.
## Frontend
The frontend is developed with Next.js and includes:
- **Next.js**: React framework for server-side rendering and static site generation.
## Installation
### Prerequisites
- Node.js (v14 or later)
- MongoDB instance
### Setup
**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.