bkrem / quanti-team

:link: A TenderMint blockchain API to make collaborative work measurable & quantifiable
BSD 2-Clause "Simplified" License
16 stars 1 forks source link
blockchain collaboration paper proof-of-concept quantification tendermint

QuantiTeam

About

The abstract below has been taken from my MSc thesis paper QuantiTeam: Blockchain architecture as a medium to verify collaborative work. The full paper is available in PDF format here.

The ability to work proficiently in collaboration with others is highly valued within a large number of social contexts. Yet, a person’s ability to do so is scarcely quantifiable in any meaningful way. The goal of this project was therefore to examine the feasibility of constructing a system which can verify and quantify collaborative work. The project was set in the specific context of attempting to solve student disengagement, as the larger concept arose from this concrete problem.

The project attempts to provide a high level of potential for true verification and quantification of collaborative data by utilising a distributed data structure known as a blockchain. Following an analysis of how the proposed system could be structured in terms of interactions between a client and the blockchain, an API was constructed to provide as much functionality as was feasible within the time available. Additionally, a simple client-side mobile application was developed to showcase the API’s functionality in a concrete manner.

While the project falls short of establishing a manner to truly verify and quantify collaborative work with a distributed blockchain, it demonstrates that such an endeavour is certainly feasible given more time and expertise in the topic area, thus providing a basis for future work to create a bona fide system for verification and quantification of team work.

Installation

Dependencies

The following dependencies are required to run a local development instance of QuantiTeam's Tendermint blockchain:

To install the project's Node.js dependencies, ensure your present working directory (pwd) is quantiteam/chain and run:

npm install

Setting up

First, let's move into QuantiTeam's API directory with the following command:

cd chain

Creating a local dev simplechain:

Running a local development chain

Assuming we now have a functioning simplechain instance, let's boot it up and configure some local environment variables. In the repo's root directory run the following two shell scripts:

. ./chain-up.sh; . ./envsetup.sh

We can easily verify whether the simplechain instance is running as expected by following its log output:

npm run chainlog

Running the Node.js chain service

Now that we have a local development chain running which we can interact with, let's spin up the chain service which will act as our API router to interface with the local chain itself.

Deploying contracts

First, let's compile and deploy our Solidity smart contracts in the contracts directory:

# `$addr` should be defined from previously running `envsetup.sh`
npm run compile -- $addr

Anytime a change is made to the smart contracts, compile should be run to deploy these changes to the running simplechain instance.

Running tests

Next, we'll want to run QuantiTeam's test suite to ensure everything is working as expected:

npm test

This should also provide a coverage report once all unit tests have run.

Booting the service

The chain service itself can be built & booted simply with:

npm run build

Anytime a change is made to the node server, build should be run as it builds a new service container via docker and replaces it with the previous one via eris.
Please refer to package.json for more detailed insights into which shell commands each NPM script executes.

API

QuantiTeam's API exposes the following HTTP endpoints:

Stable

Users

/user/taken
/user/signup
/user/login
/user/profile/:username

Tasks

/tasks/:username
/task
/task/completed/:token

Teams

/team/taken/:teamname
/team
/team/:teamname
/team/add-member

Experimental

Shutting down

To shut down the local chain and the docker-machine instance, simply run:

. ./chain-down.sh