A distributed chat application with a C-based client/server and a Python (Flask) authentication system.
client/- C client code.server/- C server code.flask_auth/- Flask authentication system for user management.include/- Header files for the C application.build/- Compiled binaries.logs/- Log files (optional).assets/- Project assets (e.g., images, logos)..gitignore- Specifies files and directories to ignore in Git.README.md- This file.
Run the following command to clone the repository:
git clone https://github.com/med1001/Privora.git
cd PrivoraEnsure that you have GCC and Make installed. If not, install them using:
sudo apt update && sudo apt install build-essentialBefore building the project, ensure that the libcurl is installed using the following command on Ubuntu-based systems:
sudo apt-get install libcurl4-openssl-dev- Navigate to the
server/directory and compile the server:cd server make # Builds the server
- Navigate to the
client/directory and compile the client:cd ../client make # Builds the client
After building, you can run the client and server from the build/ directory in both client and server:
cd build
./server & # Start the server in the background
./client # Start the clientThe Flask authentication system handles user account creation and private messaging authentication.
Ensure you have Python 3.8+ installed. If not, install it using:
sudo apt install python3 python3-venv python3-pip- Navigate to the
flask_auth/directory:cd flask_auth - Create and activate a virtual environment:
source venv/bin/activate - Install dependencies:
pip install -r requirements.txt
Before running the Flask authentication server, you need to properly set up the .env file. The .env file should contain the following environment variables:
SMTP_SERVER=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=your_email@example.com
SMTP_PASSWORD=your_smtp_password
FROM_EMAIL=your_email@example.com
- SMTP Credentials: These are necessary for sending confirmation emails and password recovery notifications.
- Security Note: Do not push your
.envfile to any public repositories to protect sensitive information. Instead, add it to your.gitignorefile and share it securely with your team if needed. - You can create a
.env.examplefile without the sensitive values to demonstrate the expected structure of the.envfile.
Start the authentication server with:
python auth_server.pyBy default, Flask runs on http://127.0.0.1:5000/.
To remove compiled binaries and build artifacts, run:
make cleanRun this command separately in both server/ and client/ directories if needed.
- Add private chat functionality between two users.
Feel free to contribute! Fork the repo, make your changes, and submit a pull request.
This project is open-source and available under the GNU General Public License v3.0.
