Skip to content

Web interface for network meta-analysis based on the gemtc R package


Notifications You must be signed in to change notification settings


Repository files navigation


User interface for evidence synthesis based on the gemtc R package and Patavi. For more information on all components of the ADDIS project, please refer to the overall readme.


The Gemtc-web system consists of several components:

Overview of the gemtc-web architecture

The web frontend talks to a NodeJS backend, which performs user and data management, and queues R tasks in patavi. Data are stored in a PostgreSQL database, and patavi model results are also cached there. Patavi R tasks expose a websocket URL to the frontend, which listens there for progress updates and results. Running gemtc model tasks requires at least one patagi gemtc worker.

Prerequisites for running gemtc-web

  • A PostgreSQL instance with an initialised database. You can create one in a docker container by running the script. Make sure to change the passwords from the default.

If you already have a postgresql database you can use, it can be initialised as follows (change passwords as desired):


Create a .pgpass in the user home to store the database password the file should contain a line with the following format hostname:port:database:username:password


Create the schema (shell script)

for i in changesets/create-database-changeset-*.sql; do psql -h localhost -U gemtc -d gemtc -f $i; done
  • A patavi-server instance along with a rabbitMQ service. see the patavi repository for installation and running instructions.

  • At least one gemtc patavi worker, started by executing the script.

Running as Docker container

Building the image (optional)

You can build a new local image by executing the script.

The script also lets you specify the signin method via command line arugment. The current options are Google OAuth 2.0 (GOOGLE) and username/password (LOCAL). The default signin method is Google OAuth 2.0.

For local signin, there are several further dependencies (assuming a version of NodeJS of 10.x) to generate the users and passwords:

sudo npm -g install yarn
sudo npm -g install npx

After installing these dependencies, you can add users for the LOCAL signin method by using the script.

Running the container

Execute the script.

If you built the container with a specific login method arugment, you should run the script with the same one.



Note that you should probably change the default settings in the script (e.g. check whether the link arguments match the names of your containers). The script also assumes that the sql database and patavi server and worker are already set up and running. The run script runs the addis/gemtc image, which will be pulled from docker hub by default.


If you wish to run the application locally for development, follow these steps:

  • (Optional) Initialise and update the scss from the drugis main project

    git submodule init git submodule update

  • Compile the scss to css using compass

    compass compile

  • Use yarn to install the dependencies


  • Ensure that your prerequisites are in place (see above)

  • Setup environment variables

    export GEMTC_GOOGLE_SECRET=9ROcvzLDuRbITbqj-m-W5C0I
    export DB_HOST=<pc-name>
    export GEMTC_DB=gemtc
    export GEMTC_DB_USERNAME=gemtc
    export GEMTC_DB_PASSWORD=develop
    export GEMTC_HOST=http://localhost:3001
    export PATAVI_HOST=localhost
    export PATAVI_PORT=3000
    export PATAVI_API_KEY=someApiKey
    export SECURE_TRAFFIC=false

Note: this google key/secret combination expects the server to run at localhost:3001

Build the application

yarn build-prod

Run the application

yarn start

Now visit the app at http://localhost:3001

Running tests

The Angular app is tested by karma:

yarn karma start

The node backend is tested by mocha:

yarn mocha

To run nightwatch integration tests:

yarn test-end-to-end