Skip to content

Latest commit

 

History

History
141 lines (94 loc) · 3.96 KB

README.md

File metadata and controls

141 lines (94 loc) · 3.96 KB

ChRIS logo ChRIS_ui

License Last Commit Code Size codecov

This repository contains the reference UI for ChRIS, allowing users to create and interact with dynamic containerized workflows. The ChRIS UI is written primarily in TypeScript and React, and uses the PatternFly React pattern library.

Screenshot from 2023-12-05 09-22-38

Try it now! --> https://app.chrisproject.org

Quickstart

git clone https://github.com/FNNDSC/ChRIS_ui.git
cd ChRIS_ui
npm ci
npm run dev:public

Development

There are two modes of development:

  • "local": runs the ChRIS backend locally. Requires Docker, and uses more disk space + slower startup time.
  • "public": use the global, public testing server. This is the easier option, especially for non-Linux OS.
Alternatively, start the backend in development mode (click to expand)
Get the backend running from ChRIS_ultron_backEnd
$ git clone https://github.com/FNNDSC/ChRIS_ultron_backEnd.git
$ cd ChRIS_ultron_backEnd
$ ./make.sh -U -I -i
Tearing down the ChRIS backend

You can later remove all the backend containers and release storage volumes with:

$ cd ChRIS_ultron_backEnd
$ sudo rm -r FS
$ ./unmake.sh

If your backend is accessible from a host other than localhost, e.g. you are using a cloud or remote development server, run cp .env .env.development.local then edit .env.development.local with your backend API URL.

1. Dependencies

You need Node version 20 or 21.

git clone https://github.com/FNNDSC/ChRIS_ui.git
cd ChRIS_ui
npm ci

Local Development Dependencies

No extra dependencies are required when using the "public" server.

If you intend on developing with the "local" server, you will need Docker and Docker Compose to run the backend and helper scripts.

2. Run the development server

Either using the "public" server:

npm run dev:public

Or, start a local backend and run the "local" server:

npm run dev:local

Build for production

Source-to-image must be used to build this project for deployment.

s2i build https://github.com/FNNDSC/ChRIS_ui quay.io/fedora/nodejs-20 s2ichrisui

Analytics

Ackee can be used for website analytics. Set the environment variables VITE_ACKEE_SERVER and VITE_ACKEE_DOMAIN_ID to send analytics to an Ackee instance.

Testing

ChRIS_ui does unit tests using vitest and end-to-end (E2E) tests using Playwright.

Unit Tests

Unit tests are defined in *.test.ts files inside src.

It is recommended to leave this command running while developing ChRIS_ui.

npm test

End-to-End Tests

End-to-end tests are located under tests/.

The end-to-end testing framework, Playwright, requires some system dependencies. On first run, you will be prompted to install these dependencies.

npm run test:e2e  # run tests using "public" backend

npm run test:e2e:local  # run tests using "local" backend

For more information, consult the wiki: https://github.com/FNNDSC/ChRIS_ui/wiki/E2E-Testing-with-Playwright