Our Online Review Creation/Management solution using Blockchain named "AsalReviews"
We have three folders for three different layers
This folder contains all Hyperledger Fabric related cryptographic material, channel artifacts, genesis block,chaincode and docker-compose YAML files.
This folder is a Web server based on Node.js and Express.js framework. It facilitates following things -
- Acts like a Web server that wraps all the Fabric interaction logic as REST API (GET, POST endpoints).
- Acts as client for Fabric network by using Fabric-Client NODE SDK
- Bridge between an user interface layer and fabric network layer.
This folder is Customer's interface developed using Angular 6. This consumes REST API to contact with Web server.
- Node.js version 8.9.0+ (but not higher than 9.0)
- Docker and Docker Compose (latest)
- Golang (latest) with $GOPATH set
- Chaincode installed to $GOPATH/src/github.com/chaincode
Network consortium consists of:
Orderer organization - Used RAFT ordering mechanism with one orderer node
Two Organization each consisting of two peer nodes each.
Peer organization 1 - Asalreviews.com
Peer organization 2 - Seller.com
World State Database - CouchDB
External Database - MongoDB
Make sure you are in the Network directory.
cd network/fabric-network
./network.sh up createChannel -c review -ca -s couchdb
./network.sh deployCC -ccn review -ccp ../chaincode/ -ccl go -c review -ccv 1.0 -ccs 1
couchDB is running on port 7984 and 8984
Make sure you are in the WebServer directory
cd ../asal-reviews-api
Note: I am using node version 8.17.0 with npm version 6.13.4
You cannot use a node version above 9.0!!!
npm install
nodemon app.js
The server will started on port 9084 (localhost:5000)
This uses a module called 'nodemon' to restart the server whenever a change is made
Start the Angular app Make sure you are in the FrontEnd directory
cd ../asal-reviews-ui
npm install
ng serve
The server will started on port 4200 (localhost:4200)
Login as "customer" or as "guest" (no login needed)