Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lorransutter/ekyc
KYC solution using Hyperledger Fabric
https://github.com/lorransutter/ekyc
blockchain chaincode hyperledger-fabric kyc nodejs reactjs
Last synced: 5 days ago
JSON representation
KYC solution using Hyperledger Fabric
- Host: GitHub
- URL: https://github.com/lorransutter/ekyc
- Owner: LorranSutter
- License: gpl-3.0
- Created: 2020-06-28T18:06:12.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T20:44:54.000Z (almost 2 years ago)
- Last Synced: 2024-04-04T12:57:23.833Z (7 months ago)
- Topics: blockchain, chaincode, hyperledger-fabric, kyc, nodejs, reactjs
- Language: JavaScript
- Homepage:
- Size: 4.67 MB
- Stars: 37
- Watchers: 7
- Forks: 24
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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
## :runner: How to run
This project was developed using a [Google Cloud Platform](https://cloud.google.com/) 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](https://github.com/hyperledger/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.
``` sh
# 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:
``` json
// ./.envPORT_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/
``` sh
## 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
`````` sh
## 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:
```sh
## 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:
``` sh
## In the first terminal ### Go to the root
cd ..# Run the set up script
./setUp.sh
```Run the API application:
``` sh
## 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:
``` sh
## 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:
``` sh
## 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: 123456Financial Institution
* login: FI1 / FI2
* password: 123456## :book: Resources and technologies :computer:
1. Chaincode
- [Fabric samples](https://github.com/hyperledger/fabric-samples) - get started samples for Hyperledger Fabric
- [Fabric contract API](https://www.npmjs.com/package/fabric-contract-api) - contract interface to implement smart contracts
- [ESlint](https://eslint.org/) - pluggable JS linter2. API
- [Express.js](http://expressjs.com/) - web application framework
- [MongoDB](https://www.mongodb.com/) - NoSQL database
- [Mongoose](https://mongoosejs.com/) - object data modeling (ODM) library for MongoDB and Node.js
- [Async](https://caolan.github.io/async/v3/) - library to perform asynchronous operations
- [Express validator](https://express-validator.github.io/docs/) - middleware to validate data
- [Bcryptjs](https://www.npmjs.com/package/bcryptjs) - library to perform cryptography
- [JWT. IO](https://jwt.io/) - JSON Web Tokens to allow, decode, verify and generate JWT
- [Dotenv](https://www.npmjs.com/package/dotenv) - loads environment variables from a .env file
- [Fabric CA Client](https://www.npmjs.com/package/fabric-ca-client) - SDK for Node.js to interact with HLF CA
- [Fabric Network](https://www.npmjs.com/package/fabric-network) - SDK for Node.js to interact with HLF3. Frontend
- [Rimble](https://rimble.consensys.design/) - design system
- [ReactJS](https://reactjs.org/) - frontend library
- [React router dom](https://www.npmjs.com/package/react-router-dom) - routing and navigation for react apps
- [React-cookie](https://www.npmjs.com/package/react-cookie) - cookie interaction for React applications
- [Axios](https://www.npmjs.com/package/axios) - HTTP requests## :cookie: Credits
- [Encryption/Decryption code using cipher](https://github.com/zishon89us/node-cheat/blob/master/stackoverflow_answers/crypto-create-cipheriv.js#L2)