Outbreak Science Rapid PREreview is an application for rapid, structured reviews of outbreak-related preprints. The platform allows any researcher with an ORCID iD to provide a quick high-level evaluation of preprints via a series of questions to assess the originality and soundness of the research findings. Aggregated data from these reviews is visualized to allow readers to identify the most relevant information. This tool has the capacity to be transformative for on-the-ground health workers, researchers, public health agencies, and the public, as it can quickly unlock key scientific information during an outbreak of infectious diseases.
Outbreak Science Rapid PREreview is a project born from the collaboration of PREreview and Outbreak Science.
PREreview is an open project fiscally sponsored by the non-profit organization Code for Science & Society. PREreview's mission is to increase diversity in the scholarly peer review process by empowering all researchers to engage with preprint reviews.
Outbreak Science is a non-profit organization aimed at advancing the science of outbreak response, in particular by supporting early and open dissemination of data, code, and analytical results.
This collaborative project is mainly funded by the Wellcome Trust Open Research Fund, but has also received support from the Mozilla Foundation.
Outbreak Science Rapid PREreview focuses on providing the best infrastructure to request / provide / analyze feedback (structured reviews) on existing preprints relevant to the outbreak community.
The feedback should be of use to:
Outbreak Science Rapid PREreview does not focus on:
git
is used for versioning in this project.
Docker is used to manage services for local development.
This repo also contains configuration files for Visual Studio Code's Remote Containers which reduces the need to manually execute Docker commands; see the Visual Studio Code manual for more information about how to use these.
docker-compose -f .devcontainer/docker-compose.yml up --build
This command will keep running in the shell to display log output from all services; you can stop the server by typing Control+C.
docker-compose -f .devcontainer/docker-compose.yml exec web bash
The source folder will appear in the container as /workspace
; change to that directory before running any npm
commands.
You can edit these files with your preferred editor and the container will stay updated.
docker-compose -f .devcontainer/docker-compose.yml logs
You can optionally name a service whose logs you want to view; the default is to show logs for all services.
Service names are defined in docker-compose.yml
and include 'web', 'cache', 'db'.
You should have everything needed to follow the rest of this README.
At the root of this repository run:
npm install
If you are having permission issues with npm
checkout
https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally
Please note the section above labelled 'Running commands in the container.'
npm run init
to setup the databases.
To seed the app with some data run:
npm run seed
After, run:
npm start
and visit http://127.0.0.1:3000/
If you want to start from an empty state (or reset the DB to an empty state) you can run:
npm run reset
To work (or test / demo) the extension you can:
npm start
)npm run extension:watch
that will build and watch the extension in the
extension
directory. ! DO NOT EDIT THE FILES THERE or do not tack them on
git, with the exception of manifest.json
, fonts/
, icons/
and
popup.html
.chrome://extensions/
, be sure to toggle the "developer mode",
click on "load unpacked" and select the content of the extension
directory.npm run extension:watch-firefox
that will build and watch the extension in the
extension
directory. ! DO NOT EDIT THE FILES THERE or do not tack them on
git, with the exception of manifest.json
, fonts/
, icons/
and
popup.html
.about:debugging
, and click on "Load Temporary Add-on" and
select the extension/manifest.json
file.Never run npm run extension:watch
and npm run extension:watch-firefox
at
the same time as they will overwrite each other. If you did:
ctr+c
in each shell)killal node
to be sure you no longer have node processes runningnpm start
and one of the extension watcher npm run extension:watch
OR npm run extension:watch-firefox
npm install
version
property of the extension/manifest.json
filenpm run extension:build
npm run extension:pack
extension.zip
file to the Chrome web storenpm install
version
property of the extension/manifest.json
filenpm run extension:build-firefox
npm run extension:pack-firefox
extension-firefox.zip
file to the Firefox web
storeNote: to include the unbundled source code of the extension (asked by Mozilla
add on) run npm run extension:pack-src
and include the following text when you
upload the generated extension-src.zip
:
The extension is built with webpack (config is webpack-extension.config.js). See more details on the README.md file. The source code is also available on GitHub: https://github.com/prereview/rapid-prereview/
This supposes that you have followed the instruction from the rest of this README.
Suggested steps:
docker-compose -f .devcontainer/docker-compose.yml up
.npm run seed
or npm run reset
to either seed the database with
sample data (or start from a clean state)npm start
to start the web servernpm run extension:watch
and update the extension in
your browser (see section above for instructions)When you are done with the demo you can use docker-compose down
to shut down the server.
cd
into this repositorygit fetch
followed by git merge origin/master
npm install
If you want to work on component in isolation run:
npm run storybook
and visit http://127.0.0.1:3030/.
To add stories, add a file that ends with .stories.js
in the ./src/components
directory.
Once cloudant and redis are running run:
npm test
Several CouchDB views can give access to usage statistics. For instance, logging
in to Cloudant and visiting
/rapid-prereview-docs/_design/ddoc-docs/_view/byType?group_level=1
will report
a breakdown of the counts per types.
We use Azure and IBM Cloudant.
We use Azure App Service and run 2 apps:
rapid-prereview
for the web serverrapid-prereview-service
for a process that takes care of:
These 2 apps are run on the same service plan (rapid-prereview-service-plan
).
The databases are hosted on IBM Cloudant (CouchDB) and are composed of 3 databases:
rapid-prereview-docs
(public) storing the roles, reviews and requests for reviewsrapid-prereview-users
(private) storing all the user data (and the links user <-> role)rapid-prereview-index
(private) storing the preprint with reviews or request for
reviews search indexWe use Azure Cache for Redis to store:
We use Sendgrid (from the Azure marketplace) for emails.
Be aware that all the following will source the production environment variables (see the Azure section below for information to get them).
npm run cloudant:init
to create the databases and push the design documentsnpm run cloudant:set-security
to secure the databasesnpm run cloudant:get-security
to verify the security
objectTo update the design documents run: npm run cloudant:ddocs
.
To seed the production database (for demos only) run: npm run cloudant:seed
(!! note that this performs a hard reset and delete all data in the databases
before seeding).
To reset the production database (for demos only) run: npm run cloudant:reset
(!! note that this performs a hard reset and delete all data in
the databases).
Visit https://portal.azure.com/ All the resources we used are defined in a
rapid-prereview
resource group.
az login
to login to the CLI./get-private.sh
(if you
later update those files, run ./put-private.sh
to upload them back)npm run build
(after having run npm install
)./deploy-app.sh
to deploy the app and ./deploy-service.sh
to deploy the serviceTo see the logs, run ./log-app.sh
or ./log-service.sh
. We use
pino for logging.
Apps can be restarted with ./restart-app.sh
and ./restart-service.sh
.
To reset the redis cache run: npm run azure:reset-cache
. Be aware that this
will source the production environment variables.
To reset all redis data (including sessions) run: npm run azure:reset-redis
. Be aware that this will source the production environment
variables.
Some basic info about the service health can be found at https://rapid-prereview-service.azurewebsites.net/
Backups are stored in a blob storage container on azure.
az login
to login to the CLInpm run backup
Be aware that this will source the production
environment variables.