Giter VIP home page Giter VIP logo

supply-chain-management-blockchain-usecase's Introduction

Supply-Chain-Management---BlockChain-UseCase

Supply Chain Management System

“Supply Chain Management”, Using this supply chain management a user can view the journey of mobile phone from the manufacturer to it's user. Through blockchain technology we can create a trusted, transparent system of this supply chain.

The API performs following functions:

  • Registering Stakeholders(Manufacturer, Distributor and User) by providing Name, Password and type. It returns UserID.
  • Login user with the User Id and Password.
  • Register the mobile for the auction.
  • View the mobile and Track the owners and journey in the supply chain.
  • Transferring the ownership of the mobiles.

Tech Stack

This supply chain management system uses multiple technologies:

And of course Dillinger itself is open source with a public repository on GitHub.

Installation

Node.js v6+ to run.

$ curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
$ sudo apt-get install -y nodejs

Installing Ethereum Package:

$ sudo apt-get install software-properties-common
$ sudo add-apt-repository -y ppa:ethereum/ethereum
$ sudo apt-get update
$ sudo apt-get install ethereum

Testing

Want to contribute? Great! Try these commands to work on this:

Open your favorite Terminal and run these commands.

Create local chain:

$ geth –rpc –rpcport “8085” --rpcapi=”db,eth,net,web3,personal,web3” --datadir data –networkid 123 –nodeiscover –maxpeers 0 init genesis.json

Launch Geth Console:

$ geth –rpc –rpcport “8085” --rpcapi=”db,eth,net,web3,personal,web3” --datadir data –networkid 123 –nodeiscover –maxpeers 0 console

Create new account (in geth console):

personal.newAccount(“passphrase”)

Mine some ether

miner.setEtherbase(personal.listAccounts[0]); miner.start()

Deploy the smart contract

loadScript(“mobilechain.js”)

P.S.: mobilechain.js file is in the directory and it's the web3 deploy form of smart contract.

Unlock Account 0th using this syntax

personal.unlockAccount(address, “password”, timeout)

P.S.: You can also use eth.accounts[0] in place of address for the 0th account in the geth.

Running node server instance using another terminal window

$ nodemon server.js

P.S.: Here I'm using nodemon for testing purpose.

Verify the deployment by navigating to your server address in your preferred browser.

127.0.0.1:5000

Todos

  • Write MORE Tests
  • Be happy to add functionalities and create PRs.

License

GNU

Free Software, Hell Yeah!

supply-chain-management-blockchain-usecase's People

Contributors

shivamnema avatar

Watchers

 avatar  avatar

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.