- This project aims to develop a blockchain-based eVault system for legal records, leveraging Hyperledger technology. The system ensures security, transparency, and accessibility for all stakeholders involved in legal proceedings. It allows for storing, managing, and sharing legal records securely and efficiently while integrating with existing legal databases and case management systems.
-
Smart Contracts: Manages access, permissions, and transactions securely.
-
User-friendly Interfaces: Provides intuitive interfaces for lawyers, judges, clients, and other stakeholders.
-
IPFS Network: Allows uploading, retrieval, tracking changes, and sharing legal documents.
-
Privacy and Confidentiality: Ensures data privacy through access controls, encryption, and authentication mechanisms.
-
Integration: Seamlessly integrates with existing legal databases and case management systems.
- Client: EJS , CSS, JavaScript
- Server: Node, Express
- Blockchain: Hyperledger Fabric
- Database: CouchDB
- File Storage: InterPlanetary File System (IPFS)
- Authentication: Digital signature
- Git
- Curl
- Node
- CouchDB
- IPFS
- Jq
- Docker and Docker-compose
- Installation Commands:
docker pull ipfs/go-ipfs
docker run -d --name=ipfs_host ipfs/go-ipfs:latest
docker exec -it ipfs_host /bin/sh
ipfs init
ipfs daemon
- Command for converting file to hash :
ipfs add path/to/file
- Command for retrieving the file from hash :
ipfs get [hash]
- Command to extract content from hash :
ipfs cat [hash]
- Hyperledger Fabric is more compatible with Linux. Therefore, I used Linux Ubuntu OS. Run the following command to install Hyperledger Fabric:
curl -sSLO https://raw.githubusercontent.com/hyperledger/fabric/main/scripts/install-fabric.sh && chmod +x install-fabric.sh
- If the link does not work on your device, open the link on another device, copy the script, and then run it on your device:
chmod +x install-fabric.sh
./install-fabric.sh
-
Change the configuration of all
core.yaml
files from LevelDB to CouchDB in peer section. -
In the
test-network
directory, change the database option tocouchdb
in thenetwork.config
file.
cd path/to/fabric-samples/test-network
./network.sh down
sudo ./network.sh up -s couchdb
sudo ./network.sh createChannel -c mychannel
sudo ./network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-javascript -ccl javascript
- Before starting the application, set up the folders like
application-javascript
,chaincode-javascript
andtest-application
. Modify these files as per your requirements and also modify the wallet.js in node modules to store the user information as you want . Inapplication-javascript
and then follow these commands:
cd path/to/evault_blockchain/asset-transfer-basic/application-javascript
npm init
npm i
npm start
git clone https://github.com/nihal1521/AI-Block-Chain-Based-E-vault-for-storing-legal-records
cd path/to/fabric-samples/test-network
./network.sh down
sudo ./network.sh up -s couchdb
sudo ./network.sh createChannel -c mychannel
sudo ./network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-javascript -ccl javascript
- Before starting the application, set up the folders like
application-javascript
,chaincode-javascript
andtest-application
. Modify these files as per your requirements and also modify the wallet.js in node modules to store the user information as you want . Inapplication-javascript
and then follow these commands:
cd path/to/evault_blockchain/asset-transfer-basic/application-javascript
npm init
npm i
npm start
Portainer : http://localhost/127.0.0.1:9000
- Install Docker interface Portainer with the following commands:
docker volume create portainer_data
docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data --name portainer portainer/portainer
CouchDB : http://localhost/127.0.0.1:5984/_utils
- CouchDB is automatically installed using Docker during the network setup, and CouchDB containers will also be managed by Docker. The default username is
admin
, and the password isadminpw
.
Hyperledger Explorer : http://localhost/127.0.0.1:8081
- Install Hyperledger Explorer with the following commands:
cd path/to/fabric/fabric-samples/token-sdk/explorer
docker-compose down -v
docker-compose up -d
- Note: The username is
exploreradmin
, and the password isexploreradminpw
. Before installation, make the required changes in theconnection-profile
.
Hyperledger Explorer Database : http://localhost/adminer.php
- Install php-pgsql and Adminer with the following commands:
sudo apt-get update
sudo apt-get install php php-pgsql
wget https://github.com/vrana/adminer/releases/download/v4.8.1/adminer-4.8.1.php -O adminer.php
sudo mv adminer.php /var/www/html/adminer.php
sudo apt-get install apache2
- Note: For the server address, go to the Docker interface and check the IP address. The username is
hppoc
, the password ispassword
, the database isfabricexplorer
, and the system ispostgresql
.