blockapps / track-and-trace

Demo app that uses STRATO to track products through a supply chain using OAuth and Private chains

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Track and Trace Demo App

Demo app that uses STRATO to track products through a supply chain using OAuth and Private chains.

Setup

Pre-requisites

  1. Install Docker from https://www.docker.com
  2. Install docker-compose from https://docs.docker.com/compose/install/
  3. STRATO node running with parameters:
     - HTTP_PORT=8080
     - NODE_HOST=localhost:8080
     - OAUTH_ENABLED=true
     - OAUTH_DISCOVERY_URL=https://keycloak.blockapps.net/auth/realms/public/.well-known/openid-configuration
     - OAUTH_CLIENT_ID=public-dev
     - OAUTH_CLIENT_SECRET=d93cde7e-5de1-4f59-80d2-31017c444f0c
    

Example command to start STRATO with the correct parameters:

HTTP_PORT=8080 \
  NODE_HOST=localhost:8080 \
  OAUTH_ENABLED=true \
  OAUTH_DISCOVERY_URL=https://keycloak.blockapps.net/auth/realms/public/.well-known/openid-configuration \
  OAUTH_CLIENT_ID=public-dev \
  OAUTH_CLIENT_SECRET=d93cde7e-5de1-4f59-80d2-31017c444f0c \
  ./strato --single

Run Track and Trace

Clone Track and Trace demo application:

git clone https://github.com/blockapps/track-and-trace.git
cd track-and-trace

NOTE: STRATO-1565_compatibilityWithOauth this version of blockapps-sol will be used for new version

Token setup:

cd server

Now create .env file and add all the tokens from here: Get tokens

Run application with docker

To run application against the STRATO node running locally (uses config server/config/docker.config.yaml by default):

docker-compose up -d

To run application with the custom configuration - create the new config file at server/config/mycustomconfig.config.yaml and run application as follows:

SERVER=mycustomconfig docker-compose up -d

This will make the application use server/config/mycustomconfig.config.yaml configuration file instead of the default.

Wait for all containers to report healthy status in the output of docker ps, then visit http://localhost

Note: to avoid running the deploy script (when running with previously deployed contracts on the blockchain, e.g. on multinode) - copy the deploy file from initial deployment (docker exec track-and-trace_track-and-trace-server_1 cat config/docker.config.yaml) to the T&T source directory on the new node: server/config/docker.deploy.yaml and rebuild track-and-trace-server docker image. This will make T&T to use existing contracts. For custom SERVER choose the filename accordingly: server/config/mycustomconfig.deploy.yaml

Run application without docker (for development/debugging)

Install dependencies
cd server
yarn build
Start api server
yarn install
SERVER=localhost yarn deploy
SERVER=localhost yarn start
Start nginx

Note: Your interface might be different

On Linux your IP can be obtained by ifconfig.

cd nginx-docker
#
HOST_IP=$(ipconfig getifaddr en0) docker-compose up -d
Start UI
cd ui
yarn install
REACT_APP_URL=http://localhost yarn start

Usernames for oauth server

Password for all users is 1234

Tokens

This app uses oauth for authentication. To get admin token and master tokens, use

cd server
yarn install
# `SERVER=mycustomconfig` here refers to config file located at: `config/mycustomconfig.config.yaml`:
sudo SERVER=mycustomconfig yarn token-getter

Follow the displayed URL and sign-in using OAuth provider login page using credentials of each of the above-mentioned users

These tokens can be provided on the command line as ADMIN_TOKEN and MASTER_TOKEN respectively. The recommended way is to store these tokens in the .env file under the /server folder. A valid .env file is as follows:

The .env with pre-created demo tokens:

ADMIN_TOKEN=eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJMNkVKeVVTNGlHZGlxUkw3UFpLTGVHNWJyelFOZjM2YkVqbGZIdElPQm5ZIn0.eyJqdGkiOiIxZmQ2MWQzNS1mYTdiLTQ5M2ItYjY1MS1kODliNWFhNjY4NDIiLCJleHAiOjIwMjY2NjI0NzUsIm5iZiI6MCwiaWF0IjoxNTk0NjYyNDc1LCJpc3MiOiJodHRwczovL2tleWNsb2FrLmJsb2NrYXBwcy5uZXQvYXV0aC9yZWFsbXMvcHVibGljIiwiYXVkIjoiYWNjb3VudCIsInN1YiI6ImZmOWM2NWZmLWVmY2MtNGFkMS04MmViLWY4NTAzZDM2ZWYzYSIsInR5cCI6IkJlYXJlciIsImF6cCI6InB1YmxpYy1kZXYiLCJhdXRoX3RpbWUiOjE1OTQ2NjI0NzUsInNlc3Npb25fc3RhdGUiOiI4YzllMGU4Ni00OGJhLTQ0MjAtOTNlMy0zNzhlYjQyNmU1MDkiLCJhY3IiOiIxIiwiYWxsb3dlZC1vcmlnaW5zIjpb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3BlIjoib3BlbmlkIGVtYWlsIHByb2ZpbGUiLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwibmFtZSI6IlRyYWNrIGFuZCBUcmFjZSBSZXRhaWxlciIsInByZWZlcnJlZF91c2VybmFtZSI6InJldGFpbGVyQHR0LmFwcCIsImdpdmVuX25hbWUiOiJUcmFjayBhbmQgVHJhY2UiLCJmYW1pbHlfbmFtZSI6IlJldGFpbGVyIiwiZW1haWwiOiJyZXRhaWxlckB0dC5hcHAifQ.aMmmvuzyu_SYM5iO91zUM5ZsXldXz4Lih3rVog5Ybj8S2F0ePFCLTcy_3FfGVJOfCFo7ok7qO0eCcu90WsKu5TzDoeI9QwOogD51Bjf-Hl5acSIZUuV288w3JdXXEwvVTzXfCVAd_jxXX8CSzDmGV1czuU8oamwtcH68ETMD5iMn4rqkO_HBu3q48HPzfTu0wPXK7JTOItyeARR3PFU-flL4Rh5MzgX5IdiS8CBr9AqNEKAhj55zAcfq-SrjA2DKX4fmwP-q2jfZrIUyYdDuECBF70FUQq29G3QeXnhFejBNusY-TdDQZbm8jbRcTxV83JkD8M52-RFy8RoGd-Ccpg

Run tests

cd server
yarn install
yarn build
yarn test

Usage Guide

The above tokens correspond to four different users in in four different roles:

  1. manufacturer@tt.app in Manufacturer role : This user can create the original asset
  2. distributor@tt.app in Distributor role : This user can bid on an asset after its creation
  3. retailer@tt.app in Retailer role : Similar to the distributor role but could be expanded in the future.
  4. regulator@tt.app in Regulator role: This user can see the audit history for all assets and bidding activity

Basic flow

  1. A manufacturer logs in and creates an asset
  2. Manufacturer makes asset available for bidding
  3. A Distributor can then bid on this asset. The bid is created on private chain (state channel) and the bid information can only be accessed by the asset owner (manufacturer), distributor and regulator
  4. The owner of the asset (manufacturer) can accept or reject the bid. If the bid is accepted, the owner of the asset changes to the user that placed the bid.
  5. This same process then repeats between the distributor and retailer.

Creating an asset

Manufacturer creating an asset

Request Bids

Manufacturer requesting bids

Placing a Bid

Distributor placing a bid

Accepting a Bid

Manufacturer accepting a bid

Viewing Audit Logs

Regulator views audit trail

Additional information

Run with minishift

Run STRATO on minishift with OAuth configured for track-and-trace

These are the steps to run this app against the STRATO deployed in minishift (local Openshift). STRATO should be deployed in minishift using blockapps/strato-openshift, branch update-to-4.4 (until merged to master):

./deploy_strato_minishift.sh

Follow the steps, enter:

OAUTH discovery url: https://keycloak.blockapps.net/auth/realms/public/.well-known/openid-configuration
STRATO v4.2-compatible OAuth : yes
uiPassword: any

Your STRATO should become available at http://node-strato.$(minishift ip).nip.io (where $(minishift ip) resolves to your local minishift vm ip) This may take few minutes.

Run track-and-trace app against STRATO in minishift

To run track-and-trace against STRATO in minishift:

  1. edit server/config/minishift.config.yaml by changing the url to http://node-strato.$(minishift ip).nip.io (resolve the IP first)
  2. from track-and-trace root dir execute:
SERVER=minishift docker-compose up -d --build

Done. The application should be available on http://localhost in few minutes.

About

Demo app that uses STRATO to track products through a supply chain using OAuth and Private chains


Languages

Language:JavaScript 86.4%Language:Solidity 11.3%Language:Dockerfile 0.7%Language:HTML 0.6%Language:CSS 0.5%Language:Shell 0.4%