A real-time chat application where users can join rooms using unique room codes and chat with others. Built with React for the frontend and WebSocket for real-time communication.
- Real-time messaging: Users can send and receive messages instantly.
- Room-based chat: Users can join a room with a unique room code.
- Light/Dark mode: Toggle between light and dark themes.
- Copy room code: Users can copy the room code to share with others.
- Responsive UI: The app is designed to be responsive and work seamlessly across different devices.
- Frontend: React, Tailwind CSS
- Backend: WebSocket server for real-time communication
- WebSocket: For communication between frontend and backend
-
Clone the repository
git clone https://github.com/your-username/flash-chat.git cd flash-chat
-
Install frontend dependencies
Navigate to the frontend directory and install the necessary packages:
cd frontend npm install
-
Install backend dependencies
Navigate to the backend directory and install the necessary packages:
cd ../backend npm install
-
Start the Backend server
In the backend directory, start the WebSocket server:
npm run dev
-
Start the Frontend server
In the frontend directory, start the React development server:
npm run dev
The application should now be running at https://flash-chat-frontend-host.onrender.com.
- On the homepage, create a new room by clicking Create New Room. A unique room code will be generated.
- Share the room code with others to invite them.
- You can toggle between light mode and dark mode by clicking the theme button at the top.
- Join a room by entering the room code and your username.
- Chat in real time with other users in the same room.
- The room code can be copied to the clipboard by clicking on the copy icon next to the room code.
flash-chat/
│
├── frontend/ # React frontend
│ ├── public/ # Static files
│ ├── src/ # React components and logic
│ └── package.json # Frontend dependencies
│
├── backend/ # WebSocket server
│ ├── src/ # WebSocket server code
│ └── package.json # Backend dependencies
│
└── README.md # Project documentation
If you'd like to contribute to this project, feel free to fork the repository, create a new branch, and submit a pull request. Contributions are welcome!
This project is licensed under the MIT License - see the LICENSE file for details.