View on GitHub

A scalable, containerized analytic and application framework for creating interactive web applications around long running (batch style) analytics.

Create an application using Rt 106

You can create a custom application using Rt 106 in four different ways, listed here in increasing level of customization and effort required:

The Rt 106 API Reference Guide provides a complete listing of the REST APIs available from rt106-server and the AngularJS services available from rt106-app.

The examples provided with the source release (e.g. rt106-rad-seed, rt106-path-seed) follow the second variant of the second approach, serving an AngularJS application from a second web server. This document provides a guide to building your own custom application using this approach.

Creating an AngularJS application with rt106-app

The easiest approach is to start with a copy of rt106-rad-seed or rt106-path-seed, depending on whether you are developing an application for radiology or pathology. These two seed projects are structurally similar.

Development

Within either of the seed applications, creating a custom application requires modifying a small number of files.

rt106-app/index.html

index.html loads style sheets, Rt 106 components, and third-party Javascript libraries, as well as setting up the AngularJS environment.

Bootstrap v4 is used to structure the web-based user interface. index.html should be straightforward to understand given familiarity with AngularJS and Bootstrap.

The structure of the rt106-rad-seed/rt106-app/index.html file is:

From this starting point, you can evolve the HTML / CSS / AngularJS for you application.

JavaScript functions called from rt106-app/index.html are defined in the controller script, described in the next section.

rt106-app/controllers/rt106*Controller.js

rt106*Controller.js is the AngularJS controller and provides functions that are called by index.html. The controller code calls the Rt 106 AngularJS services and REST API which are documented in the Rt 106 API Reference.

The structure of this file is as follows

rt106-app/css/rt106*Styles.css

rt106*Styles.css are the CSS styles specific for your application to supplement the CSS styles defined by the Rt 106 platform.

Building your application

Template files

Additional files that may need to be modified for your applciation:

File  
.bowerrc Used to tell bower where to install packages. No changes usually needed.
.dockerignore Modify as needed, add any files that should never be included in the Docker image.
.gitignore Modify as needed.
bower.json Modify as needed to update application metadata and dependencies (Javascript libraries).
docker-compose.yml Modify to set the name of the application and to specify the algorithms to use.
Dockerfile Modify as needed - install additional libraries or to copy files to different locations.
entrypoint.sh No changes usually needed.
package.json Modify as needed to update application metadata and dependencies.
README.md Update to document the application.
webrebuild.sh Optional convenience script to manage the Docker image lifecycle.

Building the application Docker image

To build the docker container for the rad seed:

$ docker build -t rt106/my-rt106-app:latest .

If you use HTTP proxies in your environment, you may need to build using:

$ docker build -t rt106/my-rt106-app:latest  --build-arg http_proxy=$http_proxy --build-arg https_proxy=$https_proxy  --build-arg no_proxy=$no_proxy .

Running the System

To run your application:

$ docker-compose up

and point a web browser (Chrome recommended) to localhost:81. Docker Compose will download the rest of the Rt 106 system from Docker Hub.