Skip to content

kaushikkumarbora/Land-Record-DApp

Repository files navigation

Land Record DApp

Setup and Start Network:

WARNING: This will stop and remove all running containers and delete all volumes.

git clone https://github.com/kaushikkumarbora/project-8thsem.git
cd project-8thsem
sh scripts/createArtifacts.sh
sh scripts/docker-images.sh
sh scripts/start_network.sh

Create Channel and join channel:

sh scripts/createChannels.sh

Package, Install and Commit Chaincode:

sh scripts/chaincodeInstallInstantiate.sh

Start Moitoring

cd prometheus-grafana
docker-compose up

Stop Moitoring

cd prometheus-grafana
docker-compose down
docker volume rm prometheus_data
docker volume rm grafana_storage

Start WebApp

cd web
# Delete previously created wallet
rm -rf wallets
# Make sure you are on node:lts/dubnium
npm start

Start Explorer

cd explorer
docker-compose up

Stop Explorer

cd explorer
docker-compose down
docker volume rm walletstore

About

Ledgers/Channels:

Channel Chaincode Methods
records recordschaincode queryAll, queryHistory, queryID, createRealEstate, getQueryResultForQueryString, recordPurchase
lending lendingchaincode queryAll, queryHistory, queryID, queryLending, initiateMortgage, getFicoScores, getInsuranceQuote, getQueryResultForQueryString, closeMortgage
books bookschaincode queryAll, queryHistory, queryID, queryBooks, getQueryResultForQueryString, initiateBooks, getAppraisal, getTitle, changeTitle

Land Record System - Orgs

Legend: R - Read, C - Create, U - Update

Organization Access and Participation Methods
records lending books
Land Registry RCU - R createRealEstate, recordPurchase, queryAll, queryHistory, queryID, getQueryResultForQueryString
Auditors/Regulators R R R queryAll, queryID, queryHistory, getQueryResultForQueryString
Lenders/Bank R RCU R queryAll, queryID, queryHistory, getQueryResultForQueryString, initiateMortgage, closeMortgage
Credit Bureaus R RU - queryAll, queryID, queryHistory, getQueryResultForQueryString, getFicoScores
Insurance Providers R RU R queryAll, queryID, queryHistory, getQueryResultForQueryString, getInsuranceQuote
Appraisers R - RCU queryAll, queryID, queryHistory, getQueryResultForQueryString, initiateBooks, getAppraisal
Title Companies R R RU queryAll, queryID, queryHistory, getQueryResultForQueryString, getTitle, changeTitle

Consensus Options:

  1. Raft (Only Crash Fault Tolerant)
  2. pBFT (Bad Scalability, Byzantine Fault Tolerant)
  3. BFT-SMART
  4. Nakamoto Consensus

Components:

  1. FrontEnd - SwaggerUI
  2. BackEnd
  3. Blockchain Network
  4. Monitoring
  5. Explorer

Data:

/* -------------------------------------------------------------------------------------------------
Define our struct to store real estates in records Blockchain, start fields upper case for JSON
only Registry can write to the blockchain, all others are readonly
---------------------------------------------------------------------------------------------------*/
type RealEstate struct {
	RealEstateID       string // This one will be part of our composite key (prefix + this)
	Address            string
	Value              float64
	Details            string // this will contain its status on the exchange
	Owner              string
	TransactionHistory json(value = 'string')
}

/* -------------------------------------------------------------------------------------------------
Define our struct to store customer details  in lending Blockchain, start fields upper case for JSON
Bank, Insurance and Fico can write to this blockchain
 -------------------------------------------------------------------------------------------------*/
type Mortgage struct {
	CustID             string // This one will be part of our composite key (prefix + this)
	RealEstateID       string //
	LoanAmount         float64
	Fico               float64
	Insurance          float64
	Appraisal          float64           //this we will get from books ledger
	Status             string            //status of the mortgage Pending -> FicoSet -> InsuranceSet -> Funded -> Rejected
	TransactionHistory json(value = 'string') //to hold details for auditing - includes the function called and timestamp
}

/* -------------------------------------------------------------------------------------------------
// Define our struct to store books (record of the appraisals and titles)  in Blockchain,
start fields upper case for JSON
only Titile and Appraiser can write to this blockchain
 -------------------------------------------------------------------------------------------------*/
type Books struct {
	RealEstateID       string // This one will be part of our composite key (prefix + this)
	Appraisal          float64
	NewTitleOwner      string
	TitleStatus        bool              //here we will store the results of title search which will be used by bank/lender to close the loan
	TransactionHistory json(value = 'string') //to hold details for auditing - includes the function called and timestamp
}

Demo

App

WebApp.mp4

Monitoring

Monitoring.mp4

Explorer

Explorer.mp4

Screenshot 2022-06-12 at 23-55-31 Hyperledger Explorer Screenshot 2022-06-12 at 23-55-07 Hyperledger Explorer Screenshot 2022-06-12 at 23-55-03 Hyperledger Explorer Screenshot 2022-06-12 at 23-54-49 Hyperledger Explorer Screenshot 2022-06-12 at 23-54-39 Hyperledger Explorer Screenshot 2022-06-12 at 23-54-14 Hyperledger Explorer Screenshot 2022-06-12 at 23-54-02 Hyperledger Explorer Screenshot 2022-06-12 at 23-53-53 Hyperledger Explorer Screenshot 2022-06-12 at 23-53-45 Hyperledger Explorer

Releases

No releases published

Packages

No packages published