Skip to content

slonigiraf/slon-ui

Repository files navigation

Recommendation letter example UI

This UI shows how to create a recommendation letter that is backed by tokens that can be slashed from referee in a case of fraud.

The UI was built on top of a Substrate Front End Template.

Using The UI

Installation

# Clone the repository
git clone https://github.com/slonigiraf/recommendation-letter-example-ui.git
cd recommendation-letter-example-ui
yarn install

Testing

cd recommendation-letter-example-ui
yarn test

Usage

yarn start
  • Or in production mode:
yarn build

and open build/index.html in your favorite browser.

UI workflow

As a referee

  • Select a referee's account from the account selector (right top corner). We selected ALICE.
  • Tap the "Referee tab"
  • Type text of a recommendation letter, paste a public key of worker and an amount of token to stake on the recommendation.
  • Click the "Create" button.
1 step
  • Show the QR code to the worker (or take a photo / screenshot of the QR code to show later, for example, if you test this repo from a single computer you will need this QR code on the next step)
2 step

As a worker

  • Select a worker's account from the account selector (right top corner). We selected BOB.
  • Tap the "Worker tab" and then the "Add letter about me" button
3 step
  • Scan the QR-code that the referee showed to you
4 step
  • See that the letter was uploaded to your account
5 step
  • Tap on the recommendation letter to show it to an employer
  • If the employer wants to re-examine your skill mentioned in the letter, paste the employer's public key and tap the "Sign" button
6 step
  • Show the QR code to the employer (or take a photo / screenshot of it to show later, for example, if you test this repo from a single computer you will need this QR code on the next step)
7 step

As an employer

  • Select an employer account from the account selector (right top corner). We selected BOB_STASH.
  • Tap the "Employer tab" and then the "Scan a letter about a worker" button
8 step
  • Scan the QR-code that the worker showed to you
9 step
  • See that the worker recommendation letter was uploaded to your account
10 step
  • Have a look at account balances: the referee (ALICE) and the employer (BOB_STASH) all have the same balance of 1.1529 MUnit
11 step
  • If the employer thinks that the recommendation was fake and wants to get a reimbursement from the referee then he taps on the letter and then pushes "Get a reimbursement" button
12-1 step
  • The transaction goes to a blockchain
12-2 step
  • Balances will be updated: 0.001 MUnit will be transferred from the referee (ALICE) to the employer (BOB_STASH) as the result of reimbursement transaction
13 step
  • After it the recommendation letter will be marked as "Canceled"
14 step
  • And can't be used twice for penalization of the referee
15 step
# slon-ui

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages