Skip to content

EMRChain is a blockchain-based web application for managing Electronic Medical Records (EMRs) securely and efficiently.

License

Notifications You must be signed in to change notification settings

arjunrajasekharan/EMRChain

Repository files navigation

EMRChain

EMRChain is a blockchain-based web application for managing Electronic Medical Records (EMRs) securely and efficiently.

Requirements

Ensure the following tools are installed on your system before starting:

  • Node.js: Version >= 10.16 and npm >= 5.6
  • Git: Installed and configured
  • Truffle: Install globally using npm install -g truffle
  • MetaMask: Extension added to your browser
  • Ganache: Development blockchain for testing
  • IPFS: Install globally with npm i --location=global ipfs

Built With

  • Ethereum: Blockchain platform
  • Solidity: For smart contracts
  • Truffle: Development framework for Ethereum
  • React.js: Frontend framework
  • Bootstrap: UI framework

Instructions

1. Clone the Repository

git clone https://github.com/EMRChain/EMRChain.git

2. Install Dependencies

Navigate to the project directory and install the required dependencies:

npm install

3. Deploy Smart Contracts

  1. Configure the Ethereum network or provider in the truffle-config.js file.

  2. Compile the smart contracts:

    truffle compile
  3. Deploy the smart contracts:

    truffle migrate

4. Run the React Development Server:

npm start

5. Run IPFS Locally

Install IPFS globally:

npm i --location=global ipfs

Start the IPFS daemon:

jsipfs daemon

Open the IPFS web UI in your browser: http://127.0.0.1:5002/webui

Configure IPFS to avoid forbidden errors during image uploads:

jsipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://127.0.0.1:5002", "http://localhost:3000", "http://127.0.0.1:5001", "https://webui.ipfs.io"]'
jsipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST"]'

6. Run the Backend Server

Open Anaconda Prompt.

Navigate to the project directory using cd.

Activate the virtual environment:

conda activate myenv

Run the server:

python manage.py runserver

7. Start All Components

Start React development server:

npm start

Start IPFS:

jsipfs daemon

Notes

  • Always ensure that the IPFS server (jsipfs daemon) is running before attempting to upload files.
  • Check for proper MetaMask configuration to interact with the Ethereum network.
  • Follow the configurations mentioned above to avoid common issues during setup.

About

EMRChain is a blockchain-based web application for managing Electronic Medical Records (EMRs) securely and efficiently.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published