Mashoora, meaning "advice" in Arabic, is an administrative system designed to connect customers seeking legal guidance with qualified lawyers.
This project aims to streamline the process of finding legal help and ensure a smooth communication channel between both parties.
In able to run the application fully, These are the prerequisites:
-
Clone the repository
git clone https://github.com/homeo26/mashoora.git
-
Navigate to the project directory.
cd mashoora
-
You must edit the
application.properties
by inserting your database configs, API keys etc. -
Make sure to run those
SQL
commands to allow the Role Relationships to be activated as the following commands:INSERT INTO roles(name) VALUES('ROLE_CUSTOMER'); INSERT INTO roles(name) VALUES('ROLE_LAWYER'); INSERT INTO roles(name) VALUES('ROLE_ADMIN');
-
You must run the Spring boot server
-
To activate the lawyer bot Adel, you must install those libraries:
# You might need to use 'sudo' before the commands # You might need to install the libraries in virtual environments like conda or venv pip install google-generativeai pip install flask flask-sqlalchemy
Note: in order to be able to
pip install google-generativeai
andpip install flask flask-sqlalchemy
it is highly recommended to install those libraries in a virtual python enviroment.Take a look on the following link: Install packages in a virtual environment using pip and venv
-
Run the python Flask app by running the following command.
# cd into the directory of the AdelChatbot.py file and python3 it python3 mashoora/src/main/python/AdelChatbot.py
-
[Optional] inable to enable HTTPS run the following commands:
- install
mkcert
- on macOS:
-
brew install mkcert brew install nss # If you use Firefox
-
# cd into the maven project cd mashoora/mashoora
-
# Create and Install a Local CA: mkcert -install
-
# Generate Certificates for localhost: mkcert localhost
-
# Convert the PEM files to a PKCS12 keystore: openssl pkcs12 -export -out keystore.p12 -inkey localhost-key.pem -in localhost.pem -name tomcat # password = mashoora-zfx1
-
# Create the ssl directory under src/main/resources and move the keystore.p12 file there: mkdir -p src/main/resources/ssl mv keystore.p12 src/main/resources/ssl/
-
# Clean and rebuild your project to ensure it picks up the new resources: ./mvnw clean package ./mvnw spring-boot:run
- install