This repo contains the generally reusable parts of the orchestrator ui grouped and exposed as pages, components and elements such as icons. It is meant to be used together with an app that includes this library through NPM. For ease of development we have added the orchestrator example app implementation as a submodule in the folder /aps/wfo-ui.
To install and run the app:
git clone git@github.com:workfloworchestrator/orchestrator-ui-library.git
git submodule init
git submodule update
# Optionally: to update to the latest version of the git submodule instead of the ones currently pinned to the repo run
git submodule update --remote
cp apps/wfo-ui/.env.example apps/wfo-iu/.env
# change the values in the env file to point to your orchestrator backend
# set auth=false or follow the directions below this sections
npm install
npm run dev
This makes the orchestrator ui run on http://localhost:3000
Using websockets is controlled by NEXT_PUBLIC_USE_WEBSOCKET, when set to 'true' the application tries to open a websocket to ORCHESTRATOR_WEBSOCKET_URL that defaults to ws://localhost:8080 to get updates as they happen. The messages received through this endpoint are used to invalidate the frontend cache that triggers a refetch of data were needed.
AUTH_ACTIVE
env variable to false or use setup below with auth.Setup auth with keycloak in docker.
cp apps/wfo-ui/.env.example apps/wfo-ui/.env
.
KEYCLOAK_ADMIN
and KEYCLOAK_ADMIN_PASSWORD
to your own values.NEXTAUTH_SECRET
: is NextAuth internal for JWT encryption and easily created with command openssl rand -base64 32
.NEXTAUTH_URL
: should be the base url to the auth page: ${FRONTEND_URL}/api/auth
.NEXTAUTH_ID
: name of the provider which is shown in the Sign in with {NEXTAUTH_ID}
, default is keycloak
.docker compose up -d
to start keycloak.apps/{folder}
env):
http://{YOUR_KEYCLOAK_DOMAIN}/realms/{YOUR_REALM}
in your env as variable NEXTAUTH_ISSUER
.ClientID
. (.env.example
default is orchestrator-client
)Client authentication
and Authorization
.Valid redirect URIs
and Web Origins
:
Valid redirect URIs
with {FRONTEND_URL}/api/auth/callback/{PROVIDER}
, with default provider its env variable NEXTAUTH_ID
. (eg http://localhost:3000/api/auth/callback/keycloak
)Web Origins
with {FRONTEND_URL}
. (eg http://localhost:3000/
)Credentials
and copy the Client secret and paste it into your env file. (NEXTAUTH_CLIENT_SECRET
)turbo dev
.ClientID
. (set the client id in your env (OAUTH2_RESOURCE_SERVER_ID
)).Client authentication
and Authorization
.Credentials
and copy the Client secret and pase it into your env file. (OAUTH2_RESOURCE_SERVER_SECRET
)OAUTH2_AUTHORIZATION_ACTIVE
to False
. if you do have authentication, you should set OAUTH2_TOKEN_URL
to the inspection endpoint of your auth provider.Each PR, which typically addresses an existing ticket from the issue list, should have a reference to the issue (eg use the issue number in the branch name). Furthermore the PR should include a changeset describing the changes of the PR, which will become part of the changelog in NPM.
npm run packages:changeset
major
, minor
or patch
).md
file in the .changeset
folderOnce the pull-request with a changeset file is merged to the main branch another PR is opened by the Changesets-bot to update the version numbers of the packages. When this pull request gets merged to main an automatic publish to NPM will be performed.
Just merge the Version Packages
PR into main, and the packages will be published to npm automatically.
The storybook can be run from the packages/orchestrator-ui-components/ folder, run:
npx storybook dev
Story book can be inspected on http://localhost:61834/.