Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
[submodule "third-party/mipav-to-niivue"]
path = third-party/mipav-to-niivue
url = git@github.com:chhsiao1981/mipav-to-niivue.git
[submodule "third-party/chris-backend"]
path = third-party/chris-backend
url = git@github.com:FNNDSC/chris-backend.git
67 changes: 14 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,82 +16,43 @@ This repository contains the reference UI for ChRIS, allowing users to create an
```shell
git clone https://github.com/FNNDSC/ChRIS_ui.git
cd ChRIS_ui
git submodule update --init --recursive
pnpm install
pnpm run dev:public

# start chris-backend
pnpm run chris-backend:up

# in another terminal
pnpm start
```

### docker-compose

1. setup `docker_compose.env` based on [docker_compose.env.tmpl](https://github.com/FNNDSC/ChRIS_ui/blob/branch-7.0/docker_compose.env.tmpl)
1. setup `docker_compose.env` based on [docker_compose.env.tmpl](https://github.com/FNNDSC/ChRIS_ui/blob/main/docker_compose.env.tmpl)
2. `docker compose --env-file docker_compose.env -f docker-compose.yaml up -d`


## 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.

<details>
<summary>
<strong>
Alternatively, start the backend in development mode (click to expand)
</strong>
</summary>

##### Get the backend running from ChRIS_ultron_backEnd

```bash
$ 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:

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

</details>

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.
### 1. Clone the repository

```shell
git clone https://github.com/FNNDSC/ChRIS_ui.git
cd ChRIS_ui
git submodule update --init --recursive
pnpm install
```

#### 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:
### 2. Run the chris-backend in local

```shell
pnpm run dev:public
pnpm run chris-backend:up
```

Or, start a local backend and run the "local" server:
### 3. Start development (in another terminal)

```shell
pnpm run dev:local
pnpm start
```

## Container Image
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
"private": true,
"version": "0.0.0",
"scripts": {
"start": "pnpm run dev:local",
"dev": "pnpm run dev:local",
"dev:local": "pnpm run test:prepare && vite",
"start": "pnpm run dev:metal",
"dev:legacy": "pnpm run test:prepare && vite",
"dev:public": "vite -c testing/publicCUBE/vite.config.ts",
"dev:metal": "vite",
"build": "vite build",
Expand All @@ -29,6 +28,9 @@
"get-dicoms": "./testing/getDicoms.mjs",
"list-mrns": "./testing/miniChRIS/scripts/list_mrns.sh",
"upload-dicom": "./testing/miniChRIS/scripts/upload2orthanc.sh",
"__chris-backend:comment": "# chris-backend:* commands are for running ",
"chris-backend:up": "cd third-party/chris-backend; scripts/run-docker-compose.sh; scripts/run-dev.sh; cd ../..",
"__dev-utils:comment": "# biome: lint, fix, and fmt. vite: preview",
"lint": "biome lint .",
"fix": "biome check --apply .",
"fix:unsafe": "biome check --apply-unsafe .",
Expand Down
1 change: 1 addition & 0 deletions third-party/chris-backend
Submodule chris-backend added at 59cb2b