This is a private chat room application that allows users to chat with each other in real time.
The primary goal of this repository is to provide an easy-to-deploy and manage chat system. As a client, you can start a server on an old computer or any machine you no longer need, configure the IP, and you’re ready to go.
Here, I provide an overview of the server options available for deploying the chat system and its database.
I use Ubuntu Server to host MongoDB, the website, and the API. To assist with deployment, I have created a tool called the Deployment Center to help streamline the process.
You can also deploy the server on Windows using the same tool, though additional steps may be required to install and configure MongoDB.
This application uses MongoDB as the database because of its excellent compatibility with both Linux and Windows environments. For more information on how the database is used, refer to the MongoDB Documentation or the Python Database Implementation.
The website is a Flask application that interacts with the database and serves the web app.
Clients will interact with the MongoDB server to log in, generate chatrooms, send messages, and join chatrooms. For further details, refer to the Client App Documentation.
The website will be the most commonly used client because it offers enhanced security. For more information on setting up and using the website client, refer to the Web Client Documentation.
To get the application up and running, follow these steps for installation.
-
Install Dependencies:
- Ensure that you have Python 3 and pip installed. You can install them using:
sudo apt update sudo apt install python3 python3-pip
- Install MongoDB:
sudo apt install mongodb
- Install Flask (for the website server):
pip install Flask
- Ensure that you have Python 3 and pip installed. You can install them using:
-
Clone the Repository:
git clone https://github.com/aiirondev/chat-room.git cd chat-room
-
Configure the Server:
- Follow the Deployment Center instructions to set up the server and MongoDB on your machine.
- Update configuration files to set the correct IP address for the server.
-
Start the Server:
- Run the MongoDB service:
sudo service mongodb start
- Launch the Flask website:
python3 app.py
- Run the MongoDB service:
-
Access the Website:
- Open a web browser and navigate to
http://<your-server-ip>:5000
.
- Open a web browser and navigate to
OR just run the Installation-Linux.sh file as $ source Installation-Linux.sh
.
-
Install Dependencies:
- Install Python 3 and pip from the official Python website.
- Install MongoDB following the MongoDB installation guide for Windows.
- Install Flask:
pip install Flask
-
Clone the Repository:
git clone https://github.com/yourusername/chat-room.git cd chat-room
-
Configure the Server:
- Follow the Deployment Center instructions to set up the server and MongoDB on your Windows machine.
- Update the configuration files to set the correct IP address for the server.
-
Start the Server:
- Run MongoDB manually if necessary (using
mongod
in the command prompt). - Start the Flask website by running:
python app.py
- Run MongoDB manually if necessary (using
-
Access the Website:
- Open a web browser and navigate to
http://<your-server-ip>:5000
.
- Open a web browser and navigate to
For proper usage, please read through all of the documentation, or refer to the User Guide.
The security of the application is a top priority. Below are some of the key security measures implemented:
-
End-to-End Encryption: Messages are encrypted before being sent to the server, ensuring that even if the server is compromised, the messages remain unreadable by attackers. The server does not have access to the encryption keys. Learn more about encryption.
-
NoSQL Database: MongoDB is used as the database, which mitigates the risk of SQL injection attacks.
This project is licensed under the Apache 2.0 license. See the LICENSE file for more details.