TasinIshmam / blockchain-academic-certificates

Academic certificate issuing and verification application using Hyperledger Fabric and Nodejs
61 stars 33 forks source link
blockchain cryptography express hyperledger-fabric nodejs verifiable-credentials

Academic Certificates on the Blockchain

The academic certificate verification platform using blockchain technology is used to issue, manage and verify academic certificates in a secure and distributed manner. This project addresses the need for a secure digital platform to issue and verify academic certificates without intervention from the original certificate issuer (University).

solution-overview

The core functionality of this application are :

Architecture Overview

architecture-overview

The following technologies are used on the application

Network Users

The users of the platform include - Universities, Students and Certificate Verifiers (Eg - Employers). The actions that can be performed by each party are as follows

Universities

Students

Verifier

To learn more about how selective disclosure and decentralized verifications work, read about verifiable credentials.

Getting Started

IMPORTANT NOTE: The instructions for building this project are out of date. I'm unfortunately not in a position right now to test and update these instructions. If you're able to get the project up and running properly. a pull request to update the following instructions is appreciated!

Related Issue: #4

Prerequisites

In order to install the application, please make sure you have the following installed with the same major version number.

1) Hyperledger fabric version 2.1.x.

2) Node version 12.x.

3) MongoDB version 4.0.x

4) Latest version of NPM package manager

Starting Fabric Network

1) Clone the repo

    git clone https://github.com/TasinIshmam/blockchain-academic-certificates.git

2) Start the fabric test-network with couchdb

    # at fabric-samples

    cd test-network
    ./network.sh up createChannel -ca -c mychannel -s couchdb

3) Package the chaincode situated in the chaincode directory.
1) Follow the instructions here 2) Note: Make sure in the final package instruction to name the package appropriately. By default it's named fabcar_1

4) Install the chaincode according to the instructions here.(I'm referencing the instructions for Fabric version 2.1, please switch to the docs of your appropriate installed version).

Starting Web Application

Make sure mongodb and fabric network are running in the background before starting this process.

1) Go to web-app

    # at blockchain-academic-certificates
    cd web-app

2) Install all modules

   npm install
   npm install --only=dev  # For dev dependencies

3) Create .env file

    touch .env 

4) Specify environment variables in .env file. 1) Specify MONGODB_URI_LOCAL to your mongodb database. 2) Specify EXPRESS_SESSION_SECRET as a long random secret string. 3) Specify CCP_PATH as the connection profile of org1 in your test network. The path for this should be ~/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/connection-org1.json
4) In FABRIC_CHANNEL_NAME and FABRIC_CHAINCODE_NAME specify the channel and chaincode label respectively used during fabric network installation. 5) Sample .env file

        MONGODB_URI_LOCAL = mongodb://localhost:27017/blockchaincertificate
        PORT = 3000
        LOG_LEVEL = info
        EXPRESS_SESSION_SECRET = sdfsdfddfgdfg3242efDFHI234 
        CCP_PATH = /home/tasin/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/connection-org1.json
        FABRIC_CHANNEL_NAME = mychannel
        FABRIC_CHAINCODE_NAME = fabcar_1

5) Start the server in development mode

    npm run start-development

Project Link: https://github.com/TasinIshmam/blockchain-academic-certificates