Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 2 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 (4 months ago)
- Default Branch: master
- Last Pushed: 2024-09-10T11:31:47.000Z (4 months ago)
- Last Synced: 2024-10-31T13:05:06.171Z (2 months 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: 2
- 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 dependenciescd Server
npm install
Install frontend dependencies
cd ../client
npm installConfigure 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 backendcd Server
npm start
Run the frontendcd ../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 [email protected].