/kaoto-ui

Frontend for the Kaoto project to provide an easy-to-use integration framework based on Apache Camel.

Primary LanguageTypeScriptApache License 2.0Apache-2.0

GitHub release (latest by date including pre-releases) GitHub license

GitHub code size in bytes GitHub commit activity GitHub contributors

🧪 Unit Tests (Jest) 🧪 codecov

Quality Gate Status Reliability Rating Maintainability Rating Security Rating

Twitter Follow YouTube Channel Subscribers

Kaoto UI

This is the user interface for Kaoto Backend. Kaoto is an easy-to-use visual integration framework based on Apache Camel.

Kaoto UI Screencapture

Running it with Docker

For trial purposes, there is a docker image that can be run as described on the quickstarter.

Installing with the operator in a kubernetes environment

Follow the instructions on https://github.com/KaotoIO/kaoto-operator/

Contributing

If you want to run Kaoto-ui in your machine, follow these instructions. Remember that you need a backend running.

Requirements

  • Node >= 16
  • Yarn (3.x)

Install & Setup

  1. Install dependencies:
yarn install
  1. From the packages/kaoto-ui folder, duplicate the .env.example file and name it .env.
  2. Update KAOTO_API in the file with the correct host for the API backend. If using Kaoto locally, this should be http://localhost:8081, but please check.

Development

Run the app in development mode:

# From the packages/kaoto-ui/
yarn start

alternatively from the root folder

# From the root folder
yarn workspace @kaoto/kaoto-ui run start

Open http://localhost:1337 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

Tests

Unit Tests

Run all Jest and React Testing Library unit tests:

# From the packages/kaoto-ui/
yarn test

alternatively from the root folder

# From the root folder
yarn workspace @kaoto/kaoto-ui run test

Launches the test runner in the interactive watch mode.
Tests are colocated and live as closely to corresponding code as possible.

End-to-End (E2E) Tests

E2E tests are located in the /cypress directory. Run all Cypress E2E tests headlessly:

// in the browser
yarn workspace @kaoto/kaoto-ui run e2e

// headlessly
yarn workspace @kaoto/kaoto-ui run e2e:headless

// with a specific browser
// options: chrome, chromium, edge, electron, firefox
// or specify a path: /usr/bin/chromium
yarn workspace @kaoto/kaoto-ui run e2e --browser firefox

See the Cypress docs for more information. There are also GitHub Actions workflows in .github/workflows that run the tests automatically on opening a pull request.

Storybook

Storybook builds are enabled for all non-Dependabot pull requests to kaoto-ui, thanks to Chromatic. It gives you the ability to view stories for each pull request, which makes it easy to share development of new UI components with team members. Storybook also makes it easy to keep presentational components isolated. You can learn more about how to create a story for your UI component here.

To run Storybook locally: yarn workspace @kaoto/kaoto-ui run storybook

To publish to Chromatic: yarn workspace @kaoto/kaoto-ui run chromatic

Build

yarn workspace @kaoto/kaoto-ui build

Builds the app for production to the dist folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!