The basic requirements to run the projects are node.js and npm.
- Open the project repo.
- Run
npm ito install all the dependencies.
- Ganache homepage Download and install Ganache.
- github page of Download and install IPFS Desktop
- For Reference - (https://docs.ipfs.eth.link/install/command-line/#official-distributions)
- Install Node lite-server by running the following command on your terminal
npm install -g lite-server
- Download Metamask as a browser extension.
- Open Ganache and click on settings in the top right corner.
- Under Server tab:
- Set Hostname to 127.0.0.1
- Set Port Number to 8545
- Enable Automine
- Under Accounts & Keys tab:
- Enable Autogenerate HD Mnemonic
- Open your terminal and run
ipfs init - Then run
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin "['*']" ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials "['true']" ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods "['PUT', 'POST', 'GET']"
- After installing Metamask, click on the metamask icon on your browser.
- Click on TRY IT NOW and set it up
- Stop when Metamask asks you to create a new password.
- Install Truffle using
npm install truffle -g - Compile Contracts using
truffle compile
- Open Ganache.
- Make sure to configure it the way mentioned above.
- Open new Terminal and deploy contracts using
truffle migrate - Copy deployed contract address to src/app.js
var agentContractAddress = '0x75E115394aacC7c6063E593B9292CB9417E4cbeC';- Connect metamask to localhost:8485
- Click on import account
- Select any account from ganache and copy the private key to import account into metaMask
- Start the IPFS Desktop Application
- Open a new terminal window and navigate to
/PROJECT_DIRECTORY/app/. - Run
npm start. - Open
localhost:3000on your browser. - The dApp is up and running locally.
- Open the sub-dir named as WEB APP
- Go to the app.py
- Run
python app.py - Open
localhost:5000on your browser. - The web app is up and running locally.
- It can also be directly accessed via the medledger as it is linked to it