Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 [email protected].