Issuing badges to credit authors for their work on academic papers
JavaScript CSS HTML Shell
Latest commit 665e11d Sep 22, 2016 @josmas josmas committed with josmas migration script for badge instance data
Permalink
Failed to load latest commit information.
bin migration script for badge instance data Sep 29, 2016
docs swap pdf file for a png for markdown Jun 2, 2016
public
scripts disabling integration tests for Travis from pull requests due to encr… May 16, 2016
src Rename jade to pug Jun 2, 2016
templates adds count for a certain badge earned by a user May 16, 2016
test changes package version to semver compat, and renames a test after up… Jun 2, 2016
.editorconfig adds .editorconfig from mofo-style Mar 20, 2016
.eslintrc.yaml changes for rule no-lonely-if in new linter Mar 17, 2016
.gitignore migration script for badge instance data Sep 29, 2016
.travis.yml changes travis settings to build with node v4 Jun 3, 2016
CONTRIBUTING.md Merge branch 'separateTests' of https://github.com/josmas/PaperBadger Mar 24, 2016
LICENSE add badges Apr 17, 2015
Procfile Update npm scripts, remove deprecated sendfile May 8, 2015
README.md upgrading to node 4.4.5; both the docker setup and the deployment set… Jun 3, 2016
app.json node app Apr 16, 2015
default.env
docker-compose.yml open up ports for direct access to mongo and redis (dev) Sep 29, 2016
package.json set 4 seconds as the timeout value for integration tests Jun 3, 2016
webpack.config.js Initial upgrade to latest mofo-style version Mar 7, 2016

README.md

PaperBadger Build Status

Join the chat at https://gitter.im/mozillascience/PaperBadger

Issuing badges to credit authors for their work on academic papers

As the research environment becomes more digital, we want to test how we can use this medium to help bring transparency and credit for individuals in the publication process.

Using Paper Badger

You can display contributorship badges for science on your own site! Researchers earn badges for their specific contributions to an academic paper. A researcher who worked on investigation earns a prestigious investigation badge for that paper.

The PaperBadger widget enables anyone, from publishers to individual researchers, to easily display badges on a website by including just a few lines of script with the relevant doi (digital object identifier) and a designated <div> in your view file. Authors can add the script to their own sites to display badges earned, while publishers can use the script to display all badges associated with a paper:

You can either use paper-badger-widget.js (documentation), which supports old browsers or widget.js (documentation), which is in development and currently only supports evergreen browsers and IE9+.

Current Users

Two journals, GigaScience (BioMed Central) and Journal of Open Research Software (Ubiquity Press) have added the Paper Badger widget to their papers.

JORS example: A Web-based modeling tool for the SEMAT Essence theory of software engineering

Live Example

Contributing

Project Roadmap: #17

Want to help? We love new contributors! Please review our contributing guidelines and take a look at some good first bugs.

Getting Started

Are you ready to contribute to Paper Badger? This section will help you set up your own development version of the Contributorship Badges prototype.

Clone (or Fork) PaperBadger and enter the directory: git clone https://github.com/mozillascience/PaperBadger && cd PaperBadger

For an overview of the architecture of the system and other details, visit the docs section.

Environment variables

If you would like to override the default configuration, create an .env file in your favourite text editor and use default.env as a template (do not delete or modify default.env).

If you would like to develop against the hosted custom badgekit-api we have running specifically for PaperBadger testing, your environment values should look this:

    # default port is 5000
    export PORT=5000
    export SESSION_SECRET=USE_SOMETHING_GOOD_LIKE_puUJjfE6QtUnYryb

    # Badges
    export BADGES_ENDPOINT=http://badgekit-api-test-sciencelab.herokuapp.com/
    export BADGES_KEY=master
    export BADGES_SECRET=#############
    export BADGES_SYSTEM=badgekit

    # ORCID Auth
    export ORCID_AUTH_CLIENT_ID=#############
    export ORCID_AUTH_CLIENT_SECRET=#############
    export ORCID_AUTH_SITE=#############
    export ORCID_AUTH_TOKEN_PATH=#############
    export ORCID_REDIRECT_URI=#############

Ask @acabunoc for ones marked ###########. Our custom BadgeKit API code can be found here. Feel free to change PORT to any available port.

Run using Docker

You can use Docker to bring up a quick instance of the app to develop against. This way you don't need to have node, MongoDB, and redis installed on your host.

  • Make sure you have Docker (>=1.10) and docker-compose (>=1.6) installed.
  • Setup your environment variables as explained in the previous section
  • start the service with docker-compose up
  • visit the running service
    • If on Linux host: http://localhost:5000
    • If not Linux: http://(docker_host_ip):5000 (You can find your docker IP with docker-machine ip default)

This setup will create 3 containers:

  • paperbadger_paperbadger_1 contains the PaperBadger code, mapped to the /src volume
  • paperbadger_mongo_1 is the MongoDB container with a DB called test
  • paperbadger_redis_1 is the redis server

You can connect to the main container by using docker exec -it paperbadger_paperbadger_1 /bin/bash. ctrl+c will stop the three containers.

Run locally

  • Make sure you have at least node version 4.4.5 installed. Installing node through nvm is recommended, so you don't need to use sudo in the next step.
  • Install PaperBadger's Node dependencies: npm install
  • Make sure MongoDB and redis-server are running and locally accessible. You can install these from their official website or use your favorite package manager.
  • Setup your environment variables as explained in a previous section
  • Run npm start, and open up http://localhost:5000/ in your favourite web browser!

API Endpoints


This work is a collaboration with publishers BioMed Central (BMC), Ubiquity Press (UP) and the Public Library of Science (PLoS); the biomedical research foundation, The Wellcome Trust; the software and technology firm Digital Science; the registry of unique researcher identifiers, ORCID; and the Mozilla Science Lab.