Giter Site home page Giter Site logo

shivamnema / supply-chain-management-blockchain-usecase Goto Github PK

View Code? Open in Web Editor NEW
75.0 9.0 52.0 324 KB

License: GNU General Public License v3.0

JavaScript 28.76% CSS 18.04% HTML 47.47% Solidity 5.73%
ethereum ethereum-dapp ethereum-blockchain nodejs blockchain geth geth-console dapp blockchain-technology supply-chain-management

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” --datadir data –networkid 123 –nodiscover –maxpeers 0 init genesis.json

Launch Geth Console:

$ geth –rpc –rpcport "8085" --rpcapi="db,eth,net,web3,personal" --datadir data –networkid 123 –nodiscover –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

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

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

Private block chain error: --datadir: command not found error

Hello,
I am trying/testing your app, but I am running into the following error when creating the private block chain: "--datadir: command not found"
I am new to this, but the syntax seems ok. Not sure what the problems?
Any help would be greatly appreciated.
Thanks

invalid command: "–rpc"

After installing all package I am getting invalid command: "-rpc"

shalikram@shalikram-HP-Pavilion-g4-Notebook-PC:~$ geth –rpc –rpcport “8085” --rpcapi=”db,eth,net,web3,personal,web3” --datadir data –networkid 123 –nodeiscover –maxpeers 0 init genesis.json
invalid command: "–rpc"

Looking for Contributors

Hi,
I am Looking to improve this project and I need some assistance with this project. Thus I'm looking for a contributor. If someone is interested please feel free to reach out to me.
Thanks.

Running out of gas

Hello,
I have been trying to deploy this smart contract for almost a week now and I keep running into some trouble. I have a question:

  1. Is there a way to have an infinite amount of gas so I don't run out? Or is there a way to change the cost of transactions to 0? Remix IDE keeps saying I have run out of gas.
    Thank you for your help!

Test Casse Login Not working

Not Able to Login with the Test case Login Provided.
`node server.js

Example app listening at http://:::5000

T: Manufacturer : 100 qwerty P: false

T: Manufacturer : 100 qwerty P: false

T: Manufacturer : 100 qwerty P: false
`
screenshot from 2018-05-29 16-54-06
After login Failed url redirect to
screenshot from 2018-05-29 16-54-23

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.