This project is not maintained anymore. And may not work with latest ethereum. |
Supply chain management on blockchain using Angular 4 + Truffle + IPFS + Ethereum
There are 2 small parts to successfully running this project.
- Node.js
- IPFS
- Truffle Framework (
npm install -g truffle
or on linuxsudo npm install -g truffle
) - Testrpc (
npm install -g ethereumjs-testrpc
or on linuxsudo npm install -g ethereumjs-testrpc
)
git clone https://github.com/shekhar-shubhendu/supply-chain.git
cd supply-chain
npm install
npm install -g @angular/cli@latest
(linux users might have to do:sudo npm install -g @angular/cli@latest
)
- Open a new terminal and start IPFS daemon with
ipfs daemon
- Start testrpc in new terminal with
testrpc -l 47000000000000
. - From inside the project directory run
truffle compile
to compile your contracts - And
truffle migrate
to deploy those contracts to the network - Now finally, start the project with
npm start
. Navigate tohttp://localhost:4200/
. The app will automatically reload if you change any of the source files. - Make sure there are no errors in browser console
- This project uses your keystore file to login to the application.
- For now, the accounts that can login are hardcoded in
auth.service.ts
with there role. Future builds will feature a screen for proper role and account management. - You can find the keystore for default accounts and there password in 'keys' folder.
/login
/retailer
/distributor
/manufacturer
/supplier
- Access IPFS from browser (Remove separate script for IPFS upload).
- Angular4 (Typescript/Javascript)
- Truffle (Solidity)
- IPFS
- Node.js
- Express