trustification / trustify-ui

Trustify UI component.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

frontend

CI

dev-env

Requisites

  • NodeJS 20. Use nvm to install NodeJS
nvm install 20
nvm use 20
  • Backend. Clone trustify and there execute:
cargo run --bin trustd

It will start the backend in http://localhost:8080

Install dependencies

npm clean-install --ignore-scripts

Init the dev server

npm run start:dev

Known issue: after installing the dependencies for the first time and then executing npm run start:dev you will see an error config/webpack.dev.ts(18,8): error TS2307: Cannot find module '@trustify-ui/common' or its corresponding type declarations Stop the command with Ctrl+C and run the command npm run start:dev again and the error should be gone. This only happens the very first time we install dependencies in a clean environment, subsequent commands npm run start:dev should not give that error. (bug under investigation)

Open browser at http://localhost:3000

Environment variables

ENV VAR Description Default value
TRUSTIFY_API_URL Set Trustification API URL http://localhost:8080
AUTH_REQUIRED Enable/Disable authentication true
OIDC_CLIENT_ID Set Oidc Client frontend
OIDC_SERVER_URL Set Oidc Server URL http://localhost:8090/realms/trustify
OIDC_SCOPE Set Oidc Scope openid
ANALYTICS_ENABLED Enable/Disable analytics false
ANALYTICS_WRITE_KEY Set Segment Write key null

Mock data

Enable mocks:

export MOCK=stub

Start app:

npm run start:dev

Mock data is defined at client/src/mocks

crate

Note

When using the crate it is expected to build the UI always in Prod mode

About

Trustify UI component.


Languages

Language:TypeScript 95.8%Language:JavaScript 2.8%Language:Rust 0.9%Language:Dockerfile 0.2%Language:EJS 0.1%Language:CSS 0.1%Language:Shell 0.1%