Giter Site home page Giter Site logo

yogdaan / blockchain-certification Goto Github PK

View Code? Open in Web Editor NEW
149.0 9.0 68.0 1.74 MB

Generation and validation of certificates using ethereum blockchain

License: GNU General Public License v3.0

Dockerfile 0.55% HTML 0.92% CSS 9.95% JavaScript 88.59%
ethereum ethereum-dapp web3js nodejs react docker blockchain certificates certificate-generation certificate-transparency

blockchain-certification's Introduction

Certificate Generation and Validation Using Blockchain

Docker Build Build Status Join the chat at https://gitter.im/yogdaan/blockchain-certification
Deploy

Built using Ethereum on local blockchain setup and deployed on Rinkeby test network.

Contract deployed at 0x89c34c6a0d4c7587e9120a533757f380f4676887
RPC Network Rinkeby Test Network

Steps to set up local development environment

Setting local blockchain

  1. We need to install CLI version of Ganache.

    npm install -g ganache-cli

    Ganache provides us our personal local blockchain network which we can use to develop our blockchain application. It also gives temporary test accounts with fake ethereum which we can use to run our apps. We need to start the RPC server before running our application.

  2. To start the RPC server run the command

    npm run ganache

    Windows user will need to run this command in separate command prompt or terminal.

  3. Deploy the smart contract to the local blockchain.

    npm run contract-deploy

The above 2 steps need to be run everytime you are running the project.

Setting local database

MongoDB server should be running as a background Process

  1. Open mongo in terminal using command mongo

  2. Then change the db using command

    use certification
  3. Then set DB user and password with the following command

    db.createUser({
      user: "<YOUR USER NAME>",
      pwd: "<YOUR USER PASSWORD>",
      roles: [{ role: "dbOwner", db: "certification" }]
    });
  4. Include these username and password in the .env file.

Now we can start the server

npm start

Deploying Smart Contract

The contract can be deployed in any test networks. We are using Rinkeby test network with help of truffle.

  1. First of all we need to have a metamask account. When we create an account in metamask a mnemonic is given to us. You can read how to get a mnemonic here.

  2. After that create a project in Infura. This will help us to use rinkeby network through infura.

  3. You will get an endpoint like this https://rinkeby.infura.io/yourapikey.

  4. Create a .env file in root directory and paste the previously genrated mnemonic and the endpoint URL in that. An example is also provided in .env.example file.

    For running in development environment and to use local blockchain network, use the LOCAL_ENDPOINT variable and replace the URL with your own local URL (These default values are filled already and shouldn't be changed unless until RPC server running on different port)

  5. Now you can deploy the smart contract using a single command:

    npm run deploy
  6. You will get a contract address of newly generated contract. Save this for further uses.

Testing app

To test the app run the command truffle test. RPC server should be running to run the tests.

Useful reads

Youtube Video for better understanding of the project

youtube-picture


Developers
Saurabh Thakur st

blockchain-certification's People

Contributors

amansharma07 avatar dependabot[bot] avatar madhurgupta10 avatar thakursaurabh1998 avatar xeon-zolt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blockchain-certification's Issues

Unable to run this project

Hi,

I tried installing this on Ubuntu 20.04, Amazon Linux, even docker, yet this is unable to deploy on any of the platform..

It returns error while running npm run contract-deploy

Please advice the configuration.

Security vulnerabilities

these are the 3 vulnerabilities which are used dependency of other packages and updating them can result in errors

  • we should setup a Travis CI pipeline for testing
  • patch the 3 vulnerabilities
    Screenshot from 2019-09-26 18-30-24

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.