๐Ÿ”จBuild executables and run manually

If you want to manually build every component with debug information, then build and run the services and packages in the following sequence: Interfaces, Logger Helper, Message Broker, Logger Service, Auth Service, IPFS, Guardian Service, UI Service, and lastly, the MRV Sender Service. See below for commands.

Prerequisites for Manual Installation

Build and start each component

Install, configure and start all the prerequisites, then build and start each component.

Services Configuration:

  • for each of the services create the file ./<service_name>/.env to do this copy, past and rename the file ./<service_name>/.env.template

    For example:

    in ./guardian-service/.env:

        GUARDIAN_ENV="develop"

    If need to configure OVERRIDE uncomment the variable in file ./guardian-service/.env:

        OVERRIDE="false" 
  • configure the file ./<service_name>/configs/.env.<service>.<GUARDIAN_ENV> file: to do this copy, past and rename the file ./<service_name>/.env.<service>.template

    following previous example:

    in ./guardian-service/configs/.env.guardian.develop:

OPERATOR_ID="..."
OPERATOR_KEY="..."
  • Setting up Chat GPT API KEY to enable AI Search and Guided Search:

    For setting up AI and Guided Search, we need to set OPENAI_API_KEY variable in ./ai-service/configs/.env* files.

    OPENAI_API_KEY="..."

NOTE: Once you start each service, please wait for the initialization process to be completed.**

  1. Clone the repo

git clone https://github.com/hashgraph/guardian.git
  1. Install dependencies

yarn
  1. Build @guardian/interfaces package

 yarn workspace @guardian/interfaces run build
  1. Build @guardian/common package

yarn workspace @guardian/common run build
  1. Build and start logger-service service

To build the service:

 yarn workspace logger-service run build

Configure the service as previously described. Do not need special variables configuration.

To start the service:

yarn workspace logger-service start
  1. Build and start auth-service service

To build the service:

yarn workspace auth-service run build

Configure the service as previously described. Do not need special variables configuration.

To start the service:

yarn workspace auth-service start

Note: For correct start of auth-service it is necessary to fill in JWT_PRIVATE_KEY and JWT_PUBLIC_KEY, which are RSA key pair. You can generate it in any convenient way, for example, using this service https://travistidwell.com/jsencrypt/demo/.

  1. Build and start policy-service service

To build the service:

yarn workspace policy-service run build

Configure the service as previously described. Do not need special variables configuration.

To start the service:

yarn workspace policy-service start
  1. Build and start worker-service service To build the service:

yarn workspace worker-service run build

Configure the service as previously described. Update IPFS_STORAGE_API_KEY value in ./worker-service/configs/.env.worker file.

To start the service:

yarn workspace worker-service start
  1. Build and start notification-service service

To build the service:

Yarn:

yarn workspace notification-service run build

Npm:

npm --workspace=notification-service run build

Configure the service as previously described. Update OPERATOR_ID and OPERATOR_KEY values in ./guardian-service/configs/.env.worker file as in the example above.

To start the service (found on http://localhost:3002):

Yarn:

yarn workspace notification-service start

Npm:

npm --workspace=notification-service start
  1. Build and start guardian-service service

To build the service:

yarn workspace guardian-service run build

Configure the service as previously described. Update OPERATOR_ID and OPERATOR_KEY values in ./guardian-service/configs/.env.worker file as in the example above.

To start the service (found on http://localhost:3002):

 yarn workspace guardian-service start
  1. Build and start api-gateway service

To build the service:

yarn workspace api-gateway run build

Configure the service as previously described. Do not need special variables configuration.

To start the service (found on http://localhost:3002):

yarn workspace api-gateway start
  1. From the mrv-sender folder

To build the service:

npm install
npm run build

Configure the service as previously described. Do not need special variables configuration.

To start the service (found on http://localhost:3005):

npm start
  1. From the ai-service folder

To build the service:

Yarn:

yarn workspace ai-service run build

Npm:

npm --workspace=ai-service run build

Configure the service as previously described. Do not need special configuration variables.

Yarn:

yarn workspace ai-service start

Npm:

npm --workspace=ai-service start
  1. From the frontend folder

To build the service:

npm install
npm run build

To start the service (found on http://localhost:4200)

npm start

Browse to http://localhost:3000 and complete the setup. To get more info, please check: Launching Guardian

Last updated