Certify - A Decentralized Certificate Issuance and Verification System powered by Ethereum Smart Contracts
Node Version Used: 14.16.1 NPM Version Used: 6.14.12
Add metamask plugin to your supported browser (chrome) from here and login
git clone https://github.com/deo002/Certify.git
cd Certify
There are two ways to set up local blockchain with Truffle Ganache, either with GUI or CLI.
- Create a
.env
file
Populate the following environment variables:
LOCAL_ENDPOINT=http://127.0.0.1:7545
NETWORK_ID=1337
The port number and network ID can be changed to your preference
An example
.env.example
file is created for reference. You can copy and paste the contents of the file and edit the variables.
- Download Truffle
Visit https://www.trufflesuite.com/truffle for more information
npm install -g truffle
Truffle helps us with deployment, testing, migration, etc.
- Install node dependencies
npm install
- Download Ganache GUI
Visit Truffle Ganache to download the application
- Create a ganache workspace & run ganache blockchain network
Click on 'New Workspace' and under 'Add Project', select the truffle-config.js
file in the Certify directory. This should create a new workspace project with the same truffle settings defined in the truffle-config.js
file.
Once created with the workspace open, the local ganache blockchain network should be running on the defined port and network ID.
Note: This blockchain network will be running as long as the Ganache GUI Application is open with the workspace.
- Deploy Smart Contracts
Npm scripts has been included for ease of contract deployment. You may view the commands used under package.json
for better understanding
In the root directory of Certify
truffle compile
npm run deploy:local
In your terminal/bash
- Install Ganache CLI
npm install -g ganache-cli
- Run Ganache blockchain network
npm run ganache
In the root directory of Certify
- Deploy Smart Contracts
npm run deploy:local
The client application (which is built with React.js) is located under the /client
folder in the directory.
cd client
- Install dependencies
npm install
- Create a
.env
file
Populate the following environment variables:
REACT_APP_LOCAL_ENDPOINT=http://127.0.0.1:7545
REACT_APP_NETWORK_ID=1337
The port number and network ID can be changed to your preference Use the same Infura project endpoint with instructions given above
An example
.env.example
file is created for reference. You can copy and paste the contents of the file and edit the variables.
- Start application
npm start
To use the front-end application running at http://localhost:3000/, connect to the Localhost Network in metamask.
Import in the account that you used to deploy the contracts using the private key of the account, you can find it in the key symbol of the Ganache UI beside your account.
There are 4 main Use Cases:
-
Registering Institutes by Central Authority
-
Issuing Certificates by Institutes
-
Revoking Certificates by Institutes
-
Viewing Certificates by Employers/Public