• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

nparfen/Blockchain-Document-Management-System: Simple document management system ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

nparfen/Blockchain-Document-Management-System

开源软件地址:

https://github.com/nparfen/Blockchain-Document-Management-System

开源编程语言:

JavaScript 86.7%

开源软件介绍:

Blockchain Document Management System

Simple document management system with Hyperledger Fabric blockchain using Hyperledger Composer API, IPFS, MongoDB, Express.js, GraphQL, React.js and Material-UI

Watch the video

Prerequisite

  • Operating Systems: Ubuntu Linux 14.04 / 16.04 LTS (both 64-bit), or Mac OS 10.12
  • Docker (version 17.03 or higher)
  • npm (v5.x)
  • Node (version 8.9 or higher - note version 9 is not supported!)
    • to install specific Node version you can use nvm. Example:
      • nvm install 8.12.0
      • nvm use v8.12.0
  • Hyperledger Composer
  • IPFS (v0.4.17 or higher)
  • MongoDB
    • for example you can use cloud hosted MongoDB by mlab.com

Steps

1. Clone the repository

Clone the Blockchain Document Managemen System repo locally. In a terminal, run:

git clone https://github.com/nparfen/Blockchain-Document-Management-System.git

2. Deploy the network

Start Docker. The fabric setup scripts will be in the /fabric directory. Start fabric and create peer admin card:

cd fabric/
./downloadFabric.sh
./startFabric.sh
./createPeerAdminCard.sh

Now, we are ready to deploy the business network to Hyperledger Fabric. This requires the Hyperledger Composer chaincode to be installed on the peer,then the business network archive (.bna) must be sent to the peer, and a new participant, identity, and associated card must be created to be the network administrator. Finally, the network administrator business network card must be imported for use, and the network can then be pinged to check it is responding.

  • Generate a business network archive in the root of the project:
cd ../
composer archive create -t dir -n .
  • Install the business network:
composer network install --card PeerAdmin@hlfv1 --archiveFile [email protected]
  • Start the business network:
composer network start --networkName nykredit-network --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card
  • Import the network administrator identity as a usable business network card:
composer card import --file networkadmin.card
  • Check that the business network has been deployed successfully, run the following command to ping the network:
composer network ping --card admin@nykredit-network

If the command returns successfully, your setup is complete.

3. Run IPFS

ipfs init
ipfs daemon

4. Run Application

Go into the api folder and install the dependency:

cd api/
npm install

Connect your mongodb instance to save data about transactions for filtering, searching and paginating. Create .env file in the api folder and fill it with yours values. Also put down JWT secret for JWT token and enter preffered port for the server.

APP_PORT=
JWT_SECRET=
DB_USERNAME=
DB_PASSWORD=
DB_HOST=
DB_PORT=
DB_NAME=

Then run the server:

npm start

If evetything is okay you will see two links of the server (basic and for websockets).

Go to the client folder and install the dependency:

cd client/
npm install

In the client folder create .env file and put that server links.

REACT_APP_API=
REACT_APP_WEBSOCKET=

Then start the web application:

npm start

The application should now be running at: http://localhost:3000




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
victorb/magnet-to-ipfs发布时间:2022-06-23
下一篇:
JGAntunes/ipfs-testbed: An IPFS testbed for Kubernetes using Toxiproxy发布时间:2022-06-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap