RatChat is a WebSocket-based real-time messaging application designed for secure and efficient communication. It supports features such as encrypted messaging, file sharing, and multiple chatrooms.
https://rat-chat.netlify.app/
https://uptime-kuma-production-4845.up.railway.app/status/rat-chat
- Real-Time Messaging: Communicate instantly with other users using WebSocket technology.
- Encrypted Messaging: Messages are encrypted for secure communication.
- File Sharing: Upload and download files
- Multiple Chatrooms: Create and join chatrooms for group discussions.
- Typing Indicators: See when other users are typing in real-time.
- Online Users List: View a list of currently online users.
- Direct Messaging: Send private messages to specific users.
- Channel Management: Create, join, and manage chatrooms dynamically.
- Ensure you have Python 3.8 or later installed.
- Clone the repository or download the
server.pyfile. - Install the required dependencies:
pip install -r requirements.txt
- Start the server:
python3 server.py
- The server will run on
ws://0.0.0.0:8765by default. You can modify the host and port in theserver.pyfile if needed.
- Navigate to the
srcdirectory of the project. - Install the required dependencies for the web app:
npm install
- Start the development server:
npm start
- Open your browser and navigate to
http://localhost:3000to access the RatChat web client.
- Firebase Setup: Ensure you have a Firebase project set up and provide the credentials file path via the
FIREBASE_ADMIN_CREDS_PATHenvironment variable. - Uploads Directory: Files uploaded by users are stored in the
uploadsdirectory. - Logs Directory: Server logs are stored in the
logsdirectory.
The server.py script is the backbone of RatChat. It handles WebSocket connections, manages chatrooms, and processes messages and file uploads. The server is designed to be lightweight and efficient, making it suitable for local or cloud deployment.
- Handles WebSocket connections for real-time communication.
- Manages chatroom creation, deletion, and user membership.
- Processes file uploads in chunks
- Logs messages and events to Firestore for persistence.
Contributions are welcome! If you'd like to contribute to RatChat, please fork the repository and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.