Skip to content
/ UI Public

User interface backend. Part of user-web-facing.

License

Notifications You must be signed in to change notification settings

kclconsult/UI

Repository files navigation

UI (ui)

User interface backend.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Before starting, download and install shiny.

Other service communication

Receives messages from: message-passer (install) ...

Sends messages to: message-passer (install) ...

Download

(Recommended) Create an SSH key and clone this repository.

git clone git@github.kcl.ac.uk:consult/ui.git

(Alternative) Clone this repository using HTTPs, suppling username and password:

git clone https://github.kcl.ac.uk/consult/ui.git

Documentation

View.

Editing

This is an shiny project. The majority of the logic is contained within app.R.

Once a file is edited, stage, commit and push changes from the root folder as follows:

git add .
git commit -m "[details of changes]"
git push

Building and Running

To run locally, a shiny server (service) is required, with the content of dashboard loaded at the appropriate route (e.g. /srv/shiny-server/dashboard).

Repository updates can be copied to a location like this using copy-shiny.sh.

Environment variables, which are populated during production by ShinyProxy and Docker, should be specified in the shiny server user's R environemnt variable file (.Renviron):

MESSAGE_PASSER_PROTOCOL=[protocol]
MESSAGE_PASSER_URL=[url]
SHINYPROXY_USERNAME=[patient ID known to the message-passer]

Alternatively, dashboard can be run from within R using runApp("dashboard").

Alternatively, the shiny application can be run as a standalone docker image. Uncomment the appropriate lines in docker-compose.yml, and then run:

docker-compose up dashboard

Running the tests

--

Deployment

In production, login is handled by ShinyProxy, which operates by controlling access to a dockerised version of a Shiny application, which in this case is the CONSULT dashboard.

To dockerise the CONSULT dashboard run

./build-docker-image.sh

being sure to specify the host information of the message-passer in this file if necessary.

To build and run ShinyProxy so that it can serve a login page, and then subsequently run the dockerised version of the dashboard for each user, run docker-compose:

docker-compose build
docker-compose up -d

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

Produced as part of the CONSULT project.

CONSULT project

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgments

About

User interface backend. Part of user-web-facing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published