{"id":13625172,"url":"https://github.com/mattdean1/blockchain-supply-chain","last_synced_at":"2025-05-02T09:30:46.237Z","repository":{"id":43583895,"uuid":"119429604","full_name":"mattdean1/blockchain-supply-chain","owner":"mattdean1","description":"⛓ Supply Chain on Hyperledger Fabric","archived":false,"fork":false,"pushed_at":"2020-06-16T10:40:08.000Z","size":23750,"stargazers_count":144,"open_issues_count":3,"forks_count":50,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-07T00:37:29.206Z","etag":null,"topics":["blockchain","hyperledger","hyperledger-composer","hyperledger-fabric","supply-chain"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mattdean1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-29T19:20:58.000Z","updated_at":"2025-02-26T12:15:08.000Z","dependencies_parsed_at":"2022-07-12T18:19:12.643Z","dependency_job_id":null,"html_url":"https://github.com/mattdean1/blockchain-supply-chain","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattdean1%2Fblockchain-supply-chain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattdean1%2Fblockchain-supply-chain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattdean1%2Fblockchain-supply-chain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattdean1%2Fblockchain-supply-chain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattdean1","download_url":"https://codeload.github.com/mattdean1/blockchain-supply-chain/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252015717,"owners_count":21680815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","hyperledger","hyperledger-composer","hyperledger-fabric","supply-chain"],"created_at":"2024-08-01T21:01:51.618Z","updated_at":"2025-05-02T09:30:41.221Z","avatar_url":"https://github.com/mattdean1.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# blockchain-supply-chain\n\nA technical framework for improving traceability in supply chain systems using blockchain. Developed as part of my final year project at University. See [dissertation.pdf](/dissertation.pdf) for further discussion.\n\n\u003e Improving Supply chain systems offers benefits to quality, cost, and regulatory compliance, but\ninteroperability between organisations is an obstacle. This project addresses the issue of interoperability through the introduction of blockchain technology, implementing a complex supply chain model from literature on the Hyperledger platform.\n\n\u003eThe process of translating a supply chain network model to an implementation is described in\ndetail; coupled with the the complexity of the network model chosen, this allows the system to\nbe generalised well to a variety of supply chain use cases. The system includes infrastructure,\napplication and integration layers, providing an end-to-end reference implementation for creation\nof supply chain systems in enterprise.\n\n# Prequisites\n\n* Docker\n* Postman\n* Node.js / npm\n* yarn\n\n# Install\n\n## Download Fabric Docker images\n\n```\ncurl -sSL https://goo.gl/6wtTN5 | bash -s 1.1.0-rc1\n```\n\n([docs](https://hyperledger-fabric.readthedocs.io/en/release-1.1/samples.html#binaries))\n\n## Install Composer command line tools\n\n```\nnpm i -g composer-cli@0.16.3 composer-rest-server@0.16.3 passport-github\n```\n\n## Import sample participant identities\n\n```\ncd network\n./importIdCards.sh\n```\n\n## Enable authentication for API server\n\n[Create a new OAuth application on GitHub](https://github.com/settings/applications/new)\n\n* Application name: `composer-rest-server`\n* Homepage URL: `http://localhost:3000/`\n* Application description: `OAuth application for the multi-user mode of composer-rest-server`\n* Authorization callback URL: `http://localhost:3000/auth/github/callback`\n\n# Run\n\n## Start the network\n\n```\n# in 'network' directory\nexport COMPOSE_PROJECT_NAME=biswas\n./deployNetwork.sh\n```\n\n## Start the API server\n\n```\nexport COMPOSER_PROVIDERS='{\n  \"github\": {\n    \"provider\": \"github\",\n    \"module\": \"passport-github\",\n    \"clientID\": \"REPLACE_WITH_CLIENT_ID\",\n    \"clientSecret\": \"REPLACE_WITH_CLIENT_SECRET\",\n    \"authPath\": \"/auth/github\",\n    \"callbackURL\": \"/auth/github/callback\",\n    \"successRedirect\": \"/\",\n    \"failureRedirect\": \"/\"\n  }\n}'\n\ncomposer-rest-server -c grower-network-admin@biswas -a true -m true\n```\n\nThe API explorer is now located http://localhost:3000/explorer.\n\n# Interacting with the network\n\n## Import identities into API server\n\n* Navigate to http://localhost:3000/auth/github and authenticate with GitHub\n* Find the `/wallet/import` endpoint at the bottom of the list in the API explorer\n* Import the admin identity card from `./network/fabric/id-cards/grower-network-admin/card` using the name `admin`\n* Import the identity cards for the sample network participants from `./network/fabric/id-cards/users` using the same endpoint. The names should be the same as the name of the card, i.e. the file `distributor.card` should be imported as `distributor`\n\n## Add sample data using Postman\n\n* Navigate to the [end-to-end test run documentation](https://documenter.getpostman.com/view/2277062/integration-tests/RVu2nAni) and click 'Run in Postman'\n* Select the imported `sample-env` environment\n* Display your OAuth access token in the explorer by clicking 'show'. Copy this into your Postman environment as the value for the key `accessToken`\n* Run the requests using the collection runner\n\n## View traceability information\n\n* Copy your OAuth access token into line 9 of `./frontend/src/controllers/api.js`\n* Start the web application by running `yarn start` inside `./frontend`\n* Copy the value of `bottleID` from the Postman environment\n* Navigate to the frontend at http://localhost:3001/\n* Search for the copied bottleID.\n\n\u003cimg src=\"docs/frontend.png\" width=\"600\"\u003e\n\n# Development\n\n## Unit tests\n\n```\n# in ./network/composer\nnpm t\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattdean1%2Fblockchain-supply-chain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattdean1%2Fblockchain-supply-chain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattdean1%2Fblockchain-supply-chain/lists"}