Ethereum prove-it dapp. The frontend is developed using ReactJS while the smart contracts are developed using Solidity.
Prove-it allows users to prove the existence and integrity of some data such as files, images or videos.
The data is stored in a decentralized storage system called IPFS (InterPlanetary File System). The hash of the file as well as the description tags are stored in the smart contract which is later referenced in order to verify the authenticity of the data.
User logs in to the webapp. The dapp identifies the user's ethereum address. User clicks the 'Files' tab. The dapp displays the files previously uploaded with detailed information.
User logs in to the webapp. The dapp identifies the user's ethereum address. User can upload a file and add descriptive tags of the data. The file is stored on IPFS and the hash of the file is stored in a smart contract.
User logs in to the webapp. The dapp identifies the user's ethereum address. User can verify a file either with its hash or by uploading the file. The file details are displayed if the file exists on the blockchain.
A user logs into the web app. The app reads the user’s address and shows all of the data that they have previously uploaded. The user can upload some data (pictures/video) to the app, as well as add a list of tags indicating the contents of the data. Users can retrieve necessary reference data about their uploaded items to allow other people to verify the data authenticity. Users can privide a prove of a document by storing its hash in the blockchain.
Files uploaded are stored in IPFS. Do not upload sensitive personal information.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
These are the dependencies:
nodejs
npm
Truffle
MetaMask
ganache-cli
truffle-hdwallet-provider
Solidity
git
- nodejs - nodejs
- git - git
- ganache-cli - ganache
- Truffle - git
This is a step by step guide to set up the project.
Clone the project repository.
git clone https://github.com/demmojo/prove-it.git
Enter the project directory
cd prove-it
Install the node modules
npm install
Compile the smart contracts
truffle compile
Start the development blockchain network to work on a local network
ganache-cli
Migrate the smart contracts. The --reset option runs all the migration from the beginning.
truffle migrate --reset
Login to metamask with Ganache-cli seed phrases
copy the ganache-cli seed phrase and login to metamask and select localhost
Start the dapp
npm run start
A tab should pop up in your browser. Otherwise go to the following link.
http://localhost:3000/
This section describes how to run the automated tests for this dapp.
Enter the project root directory
cd prove-it
Run tests
truffle test
Follow the steps mentioned below to do testnet deployment.
-
Go to project directory and open truffle.js file
cd prove-it/truffle.js
-
Open metamask and assign the seed phrase to seedWords variable
seedWords = "seed phrase"
-
Go to command prompt and run the truffle migrate command
truffle migrate --network rinkeby
-
Deployed the dapp in rinkeby testnet. Contract address are present in
prove-it/deployed_addresses.txt
.
- Solidity - Smart Contract Language
- ReactJS - Frontend web framework
- IPFS - Decentralised Storage
- Metamask - Browser Extension
- coreui - Frontend Components
- npm - Package Management
prove-it is licensed under the MIT License - see the LICENSE.md file for details