D-Healthcare
D-Healthcare is a blockchain-based decentralized application for storing and sharing of EMR (Electronic Medical Records) of patients. It provides an end-to-end solution for a healthcare system while securely storing patient medical records, and giving patients control over their data.
Prerequisites:
-
Truffle
- Truffle is a framework used for building blockchain based applications. It eases the process of writing and deploying smart contracts.
- Truffle can be installed with NPM via the command line
$ npm install -g truffle
- If NPM is not installed, it can installed using this link - https://nodejs.org/en/download/
-
Ganache
- Ganache is a tool, part of the Truffle suite, that creates a private Ethereum based blockchain on a local system and can be used for testing contracts and development purposes.
- Ganache can be installed using NPM
$ npm install ganache --global
- Alternatively, Ganache can be downloaded and installed from here - https://trufflesuite.com/ganache/
-
React
- ReactJS is a JavaScript library that is used for building user interfaces. It is one of the famous frontend frameworks for developing single page applications.
- First, we need to install create-react-app
npm install create-react-app
- This
create-react-app
can be used on the command line to create React projects
-
MetaMask
- Metamask is a browser extension that is used to manage crypto wallets and helps browsers connect to blockchain. It allows users to interact with decentralized applications.
- This browser extension for Chrome can be downloaded from here.
Steps to run:
- Clone this GitHub repository
- Run Ganache and copy the addresses provided from ganache to
Health.sol
- Open terminal and run:
truffle migrate --reset
- Copy the json files from
build/contracts
folder to frontend/abis
- Open another terminal and run the following commands:
cd frontend
npm i
npm start