Coder Social home page Coder Social logo

lorransutter / ekyc Goto Github PK

View Code? Open in Web Editor NEW
40.0 7.0 26.0 4.78 MB

KYC solution using Hyperledger Fabric

License: GNU General Public License v3.0

Shell 48.14% JavaScript 51.05% HTML 0.26% CSS 0.56%
hyperledger-fabric kyc nodejs chaincode reactjs blockchain

ekyc's Introduction

eKYC

Blockchain solution for sharing customer KYC information, using Hyperledger Fabric, Node.js and ReactJS. Presented as final assingment for BCDV1012 - dApp I from Blockchain Development program from George Brown College.

For architecture, flow diagrams and more detailed explanation, please check Project Documents folder.

Cherukkatil Naseer |  Henry Eriko Mwenge |  Lorran Sutter |  Raymond Lawal |  Wanja Mascarenhas |  Zakariya Jasat

🏃 How to run

This project was developed using a Google Cloud Platform virtual machine, so every step must be performed in a VM CLI under a sudo -s command.

Start your VM and save the highlighted External IP:

You must have Fabric samples to run this project. You will clone this project inside fabric-samples folder so as to this can use the files from bin and config folders.

Here you can see the folder structure and the main files mentioned in this section:

📦fabric-samples
 ┣ 📂bin
 ┣ 📂config
 ┗ 📂eKYC
   ┣ 📂api
   ┣ 📂chaincode
   ┣ 📂frontend
      ┗ 📂src
         ┗ 📂service
            ┗ 📜baseURL.json
   ┣ 📂test-network
   ┣ 📜.env
   ┣ 📜networkDown.sh
   ┗ 📜setUp.sh

Open your terminal in the fabric-samples folder and clone the project.

# Clone this repo
git clone https://github.com/LorranSutter/eKYC.git

# Go to the project folder
cd eKYC

To run the application you will need to set your own configurations of port, database, private key and encryption key. Create the following .env file in the indicated path and format with your customized configurations:

// ./.env

PORT_API=5000
PRIVATE_KEY="54AD766F231CCB0EA64156F1E5488"
ENCRYPTION_KEY="CoCKidLqlVuB8y1EYmKaye1UGoxtHmko1LmyqOHvVht="
MONGODB_URI_DEV="YOUR_DEV_MONGO_URI"

Now you will need two opened terminals to run the project. One for the API and another one for the frontend.

API will run on http://35.193.245.108:5000/

Frontend will run on http://35.193.245.108:3000/

## In the first terminal ##

# Go to the chaincode folder
cd chaincode

# Install dependencies
npm install

# Go to the API application
cd ../api

# Install dependencies
npm install
## In the second terminal ##

# Go to the frontend application
cd frontend

# Install dependencies
npm install

In order to connect frontend to the API, you will have to provide the base URL of the API in the following file:

## In the second terminal ##

# Go to the baseURL.json file
cd src/service/baseURL.json

{
    "baseURL": "http://35.193.245.108:5000"
}

Now you can start the network and perform all necessary set up running the following magic script:

## In the first terminal ##

# Go to the root
cd ..

# Run the set up script
./setUp.sh

Run the API application:

## In the first terminal ##

# Go to the API application
cd api

# Run API application
npm run start

# Or to use nodemon
npm run dev

Finally run the frontend application:

## In the second terminal ##

# Run the project
npm start

If you want to stop the network and delete all artifacts created, just run the next magic script below:

## In the first terminal ##

# Go to the root
cd ..

# Run the script
./networkDown.sh

Login credentials

Client

  • login: user01 / user02 / JonasKahnwald / MarthaNielsen / ClaudiaTiedemann / ElisabethDoppler / H.G.Tannhaus
  • password: 123456

Financial Institution

  • login: FI1 / FI2
  • password: 123456

📖 Resources and technologies 💻

  1. Chaincode

  2. API

    • Express.js - web application framework
    • MongoDB - NoSQL database
    • Mongoose - object data modeling (ODM) library for MongoDB and Node.js
    • Async - library to perform asynchronous operations
    • Express validator - middleware to validate data
    • Bcryptjs - library to perform cryptography
    • JWT. IO - JSON Web Tokens to allow, decode, verify and generate JWT
    • Dotenv - loads environment variables from a .env file
    • Fabric CA Client - SDK for Node.js to interact with HLF CA
    • Fabric Network - SDK for Node.js to interact with HLF
  3. Frontend

🍪 Credits

ekyc's People

Contributors

deadprez-101 avatar dependabot[bot] avatar lorransutter avatar mascarenhaswanja avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  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.