Important!
- Overview
- Requirements
- Installation
- Setup
- Usage
This is MoonlayQuotation web application, its main functionality include the creation and processing of quotations.
- Python Version: 3.12.5
- Environment Variable: GOOGLE_API_KEY, DB_URI, DB_HOST, DB_USER, DB_PASSWORD, DB_NAME, DB_PORT, FLASK_HOST, FLASK_PORT, FLASK_DEBUG, VITE_KEYCLOAK_URL, VITE_KEYCLOAK_CLIENT_ID, VITE_KEYCLOAK_REDIRECT_URI, VITE_API_BASE
- Required Libraries: Refer to requirements.txt and yarn.lock
- Clone the Repository using git clone command.
-
Navigate into the frontend folder
-
run command yarn install or yarn i
-
Navigate into the server folder.
-
(Optional) Create a virtual environment in the project folder using python -m venv venv, activate virtual environment using ".\venv\Scripts\activate" for windows and "source venv/bin/activate" for mac.
-
Download all required libraries and modules through the requirements.txt file.
- Run the command "pip install -r requirements.txt".
-
Navigate into the moonlay-quotation folder in docker using the docker CLI, there should be a docker-compose.yml file.
-
run the command docker compose build to build the containers.
-
run the command docker compose up to run the containers.
-
Configure the .env file
- The env file should be named .env and be placed in original moonlay-hr folder alongside the gitignore and docker-compose.yml.
- the env file should contain the environment value for:
DB_URI Full database connection string for connecting to a MySQL database using mysql+mysqlconnector. DB_HOST Hostname or IP address of the database server. DB_USER Username for database authentication. DB_PASSWORD Password for database authentication. DB_NAME Name of the specific database to connect to. DB_PORT Port number on which the database server is running (default for MySQL: 3306). FLASK_HOST Host address for running the Flask backend (e.g., 0.0.0.0 to allow access from any IP). FLASK_PORT Port number on which the Flask server will listen (default: 5000). FLASK_DEBUG Debug mode toggle (True for enabling debug mode, useful during development).VITE_KEYCLOAK_URL Base URL of the Keycloak authentication server. VITE_KEYCLOAK_REALM The Keycloak realm to authenticate users against. VITE_KEYCLOAK_CLIENT_ID Client ID used for identifying the frontend application in Keycloak. VITE_KEYCLOAK_REDIRECT_URI URL where Keycloak redirects users after successful login. VITE_API_BASE localhost url for backend.
- Run the Program
- navigate to the server folder, Run the command "flask run" to run the flask backend of the application.
- navigate to the mantine-template-main folder and run the command "yarn dev" to run the moonlayHR frontend.