DriveNet-App is a front-end application for DriveNet, a demonstration Hyperledger Fabric blockchain network that allows users to submit transactions that modify car records. It is based on the enhanced fabcar smart contract.
To see the DriveNet-App in action, it is usually simplest to join an instance of the DriveNet network using the registry at fabnetworks.org. Once you have joined the network, you will be given a URL for your DriveNet-App instance.
Log on to the DriveNet-App using credentials supplied to you as part of the joining process. Then you can use the UI to browse the ledger, and create, delete and modify car records.
In order to install and run DriveNet-App on OCP:
-
Run
git cloneto create a local copy of your repo. -
Run
npm installto install pre-requisites. -
Copy a valid IBP conection profile for your DriveNet network into the root of your repo (alongside
package.json) and call the filedrivenet-gateway.json. This is the network that the DriveNet-App will connect to. -
run
npm run buildto make sure you can build the repo. -
Log into your OCP cluster.
-
In the root of your repo, create a file called
.envthat is based on .sample.env. -
Modify the following values in the file:
# JWT settings
SIGNING_SECRET="your secret"
# Wallet settings
HASH_SALT="your-salt"
where the values are random sequences of characters. The value of SIGNING_SECRET is used for signing tokens sent with API calls; HASH_SALT is used to produce hash-values for the application.
-
Save the file.
-
Create a new OCP project:
oc new-project drivenet
oc project drivenet
- Create the credentials:
oc create secret generic drivenetcredentials --from-env-file .env
(To redeploy credentials in the future, run oc delete secret drivenetcredentials and then re-run the create command).
- Deploy the DriveNet UI to your cluster:
npm run nodeshift
If you have any questions or suggestions on the DriveNet-App, please contact [email protected].
