Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Oink Logo Banner

OINK: The Open-INcentive-Kit

The goal of Oink is to provide an easy-to-extend framework for simple, secure, robust, and reliable incentive-based studies.

We are initially developing Oink as part of the GridWatch project, specifically for the DumsorWatch deployment in greater Accra, however the long-term aim is for Oink to live as a standalone entity to accelerate and ease future studies.

Getting Started

Right this second, everything is a pretty rough around the edges, and getting started will require having your head reasonably well wrapped around the Firebase and Firestore ecosystems.

Installations / Prerequisites

  1. The first step is to install the Firebase CLI tools, be sure to follow the steps to log in to firebase too.

  2. Oink deployments work via branches. The master branch is affiliated with no project. Currently the dumsorwatch branch represents the live code for the deployed DumsorWatch project and the paymenttoy branch is a test branch for running Oink code prior to deployment (and matches the PaymentToy google project).

  • If you want to test out a specific project:

    • Check out the appropriate branch (e.g. git checkout paymenttoy)
    • Head to src/firebase_project/functions and run firebase functions:config:get > .runtimeconfig.json. Careful, these are private variables that are made available by the firebase environment, things such as passwords. Don't commit this file! (It's .gitignored)

NOTE: At this point, you've configured this directory to this project. Changing branches will not change to another project as these two magic hidden files are .gitignored. Currently, we strongly advise one checkout of this repo for each firebase project you have.

  1. Some of the support scripts will need you to have the Python firestore library installed: pip install --upgrade google-cloud-firestore

  2. You will also need the Google Cloud SDK, be sure to get through gcloud auth login from their setup directions.

  3. The firebase cloud runs a pretty out of date version of node, so install the Node Version Manager (nvm). Once you have that set up, grab the current firebase node version, which as of this writing is nvm install 6.11.5 (once) and nvm use 6.11.5 (every terminal session).

Digging in

Head into the src to start learning about how Oink works.


Licensed under either of

at your option.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


The Open-INcentive-Kit



Apache-2.0, MIT licenses found

Licenses found






No releases published


No packages published