A simple, real-time chat application built with Next.js and Socket.IO. This application allows users to join a chat room, see other online users, and engage in private conversations.
- Real-time messaging using Socket.IO
- User presence (online/offline status)
- Private messaging between users
- Typing indicators
- Responsive design using Tailwind CSS
- Node.js (v14 or later)
- npm or yarn
-
Clone the repository:
git clone git@github.com:Raccoon254/nextjs-chat-application.git
or
git clone https://github.com/Raccoon254/nextjs-chat-application.git
-
Navigate to the project directory:
cd nextjs-chat-application
-
Install dependencies:
npm install
or
yarn install
-
Create a
.env.local
file in the root directory and add your environment variables:NEXT_PUBLIC_SOCKET_URL=http://localhost:3000
-
Start the development server:
npm run dev
or
yarn dev
-
Open your browser and navigate to
http://localhost:3000
- Enter your name and click "Join" to enter the chat room.
- You'll see a list of other online users on the left side of the screen.
- Click on a user's name to start a private conversation with them.
- Type your message in the input field at the bottom and click "Send" or press Enter to send the message.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.