Skip to content

How to Start Development Server

Technology Stack

PAIG provides a platform for AI governance. It allows users to governance and audits the data on one platform. PAIG uses the following technologies:
* Web Application Framework: ReactJS
* Backend: FastAPI (Python)
* Database: Relational Database like SQLite, MySQL, PostgreSQL etc (default sqlite)

How to Start Web Server

Prerequisites

  • Python: >=3.10
  • NodeJS: =14.17.5

Steps to run the development Web Server

  1. Fork the repository https://github.com/privacera/paig.
    Bash
    git clone https://github.com/YOUR_USERNAME/paig.git
    
  2. Run the script to build the web UI.
    Bash
    cd scripts
    source ./build_ui.sh
    
  3. Change directory to the root level of the repository.
  4. Go to the backend directory. bash cd backend
  5. Create a virtual environment.
    Bash
    python3 -m venv venv
    
  6. Activate the virtual environment.
    Bash
    source venv/bin/activate
    
  7. Install the dependencies.
    Bash
    pip install -r requirements.txt
    
  8. Change directory to the paig.
    Bash
    cd paig
    
  9. Run the web server.
    Bash
    python __main__.py run --paig_deployment dev|prod --config_path <path to config folder> --host <host_ip> --port <port>
    
    One Such example is:
    Bash
    python __main__.py run --paig_deployment dev --config_path conf --host "127.0.0.1" --port 4545
    
    Note: Admin user credentials.
    Bash
    1
    2
    3
    PAIG URL: http://127.0.0.1:4545
    username: admin
    password: welcome1
    

How to Start/Build Web UI

Prerequisites

  • NodeJS: =14.17.5

Steps to run the development web UI

  1. Fork the repository https://github.com/privacera/paig.
    Bash
    git clone https://github.com/YOUR_USERNAME/paig.git
    
  2. Change directory to the frontend/webapp repository
  3. Install the dependencies
    Bash
    npm install
    
  4. Web UI configuration, including proxy configuration, can be found in the config/path.js file. Proxy should be set to web server url.
    JavaScript
    target: 'http://127.0.0.1:4545',
    
  5. Run the web UI
    Bash
    npm start
    
    Note: Admin user credentials.
    Bash
    username: admin
    password: welcome1
    

How to Create Web UI Build with Script

You can use the script to build the web UI. The script will create the build and copy the build to the backend templates folder. 1. Run the script to build the web UI.

Bash
cd scripts
source ./build_ui.sh

How to Create Web UI Build Manually

  1. Change directory to the frontend/webapp repository
  2. Run the command to install the dependencies
    Bash
    npm install
    
  3. Run the command to create the build
    Bash
    npm run build
    
  4. The build will be created in the public folder
  5. Copy the build to the web server so that it can be served through the web server.
    Bash
    mv public/styles/fonts  public/static/styles && rm -rf public/styles && cp -r public/*  ../../backend/paig/templates/
    

Logging

PAIG provides a way to configure logging configurations and level. You can edit logging configuration to customize logging for PAIG.