“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.
- 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.
This supply chain management system uses multiple technologies:
- Ethereum Blockchain- Ethereum Blockchain Stack (Tool used: Geth)
- VS-Code - Text Editor for writing code
- Twitter Bootstrap - great UI boilerplate for modern web apps
- node.js - evented I/O for the backend
- Express - fast node.js network app framework @tjholowaychuk
- web3.js - Ethereum Javascript API
- jQuery
And of course Dillinger itself is open source with a public repository on GitHub.
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
Want to contribute? Great! Try these commands to work on this:
Open your favorite Terminal and run these commands.
$ geth –rpc –rpcport “8085” --rpcapi=”db,eth,net,web3,personal,web3” --datadir data –networkid 123 –nodeiscover –maxpeers 0 init genesis.json
$ geth –rpc –rpcport “8085” --rpcapi=”db,eth,net,web3,personal,web3” --datadir data –networkid 123 –nodeiscover –maxpeers 0 console
personal.newAccount(“passphrase”)
miner.setEtherbase(personal.listAccounts[0]); miner.start()
loadScript(“mobilechain.js”)
P.S.: mobilechain.js
file is in the directory and it's the web3 deploy form of smart contract.
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.
$ 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
- Write MORE Tests
- Be happy to add functionalities and create PRs.
GNU
Free Software, Hell Yeah!