Giter Site home page Giter Site logo

sinardyas / blockchain-document-management-system Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mparfenchuk/blockchain-document-management-system

0.0 1.0 0.0 1.16 MB

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

Shell 10.36% JavaScript 86.81% HTML 0.45% Gherkin 2.38%

blockchain-document-management-system's Introduction

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

blockchain-document-management-system's People

Contributors

mparfenchuk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.