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
MongoDB ,
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>/.envto do this copy, past and rename the file./<service_name>/.env.templateFor 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>.templatefollowing 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.**
Clone the repo
git clone https://github.com/hashgraph/guardian.gitInstall dependencies
yarnBuild @guardian/interfaces package
yarn workspace @guardian/interfaces run buildBuild @guardian/common package
yarn workspace @guardian/common run buildBuild and start logger-service service
To build the service:
yarn workspace logger-service run buildConfigure the service as previously described. Do not need special variables configuration.
To start the service:
yarn workspace logger-service startBuild and start auth-service service
To build the service:
yarn workspace auth-service run buildConfigure the service as previously described. Do not need special variables configuration.
To start the service:
yarn workspace auth-service startBuild and start policy-service service
To build the service:
yarn workspace policy-service run buildConfigure the service as previously described. Do not need special variables configuration.
To start the service:
yarn workspace policy-service startBuild and start worker-service service To build the service:
yarn workspace worker-service run buildConfigure 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 startBuild and start notification-service service
To build the service:
Yarn:
yarn workspace notification-service run buildNpm:
npm --workspace=notification-service run buildConfigure 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 startNpm:
npm --workspace=notification-service startBuild and start guardian-service service
To build the service:
yarn workspace guardian-service run buildConfigure 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 startBuild and start api-gateway service
To build the service:
yarn workspace api-gateway run buildConfigure the service as previously described. Do not need special variables configuration.
To start the service (found on http://localhost:3002):
yarn workspace api-gateway startFrom the mrv-sender folder
To build the service:
npm install
npm run buildConfigure the service as previously described. Do not need special variables configuration.
To start the service (found on http://localhost:3005):
npm startFrom the ai-service folder
To build the service:
Yarn:
yarn workspace ai-service run buildNpm:
npm --workspace=ai-service run buildConfigure the service as previously described. Do not need special configuration variables.
Yarn:
yarn workspace ai-service startNpm:
npm --workspace=ai-service startFrom the frontend folder
To build the service:
npm install
npm run buildTo start the service (found on http://localhost:4200)
npm startBrowse to http://localhost:3000 and complete the setup. To get more info, please check: Launching Guardian
Last updated