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
sh scripts/createChannels.sh
sh scripts/chaincodeInstallInstantiate.sh
cd prometheus-grafana
docker-compose up
cd prometheus-grafana
docker-compose down
docker volume rm prometheus_data
docker volume rm grafana_storage
cd web
# Delete previously created wallet
rm -rf wallets
# Make sure you are on node:lts/dubnium
npm start
cd explorer
docker-compose up
cd explorer
docker-compose down
docker volume rm walletstore
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 |
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 |
- Raft (Only Crash Fault Tolerant)
- pBFT (Bad Scalability, Byzantine Fault Tolerant)
- BFT-SMART
- Nakamoto Consensus
- FrontEnd - SwaggerUI
- BackEnd
- Blockchain Network
- Monitoring
- Explorer
/* -------------------------------------------------------------------------------------------------
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
}