Skip to content

alfaqi/HealthTrust

Repository files navigation

HealthTrust Platform

Live Demo: HealthTrust (Toronet testnet)

Video: HealthTrust

Accounts for testing:

  • Admin
    • Address: 0xfb29a4e3a100fbafd368f2a74e907cf4e276e10f
    • Password: toronet
  • Doctor 1
    • Address: 0xb72ab84f684537f992e9d9d1ef6cadb03854f148
    • Password: toronet
  • Doctor 2
    • Address: 0xd65959409f7a87f4f153851969330002cdd11cb6
    • Password: toronet
  • Doctor 3
    • Address: 0x054cf4979a65e9686269c8e6a3872a600e4d55db
    • Password: toronet
  • Patient 1
    • Address: 0xb678706b2dc47642acb3f93ce87e8703712ef329
    • Password: toronet
  • Patient 2
    • Address: 0x52d7f2bfd31bb3f801340b75f7d9f9635dfa241d
    • Password: toronet

Description

HealthTrust is a blockchain-based healthcare system that facilitates secure and transparent medical record management. This platform ensures the integrity and accessibility of medical reports, connecting patients and doctors in a decentralized and efficient way.

Features

  1. Secure Medical Reports:

    • Encrypt your medical report in the blockchain, ensuring that only authorized individuals (you and doctors) can access it.
    • Only the doctor involved can add the medical report.
  2. Downloadable PDF Reports:

    • Easily download your medical report as a PDF file for convenient offline access.
  3. IPFS Integration:

    • Save your medical report to IPFS, enhancing accessibility and permanence.
  4. Livestreaming Capabilities:

    • Integrated livestream functionality allows for real-time interaction with healthcare providers, facilitating remote consultations and support.
  5. Chat Messenger (Integrated within HealthTrust Platform):

    • Utilize the chat messenger for real-time interaction with doctors to discuss health concerns before providing the medical report.

HealthTrust Platform

Getting Started

Setting Up MetaMask and Adding Toro Token

Follow these steps to configure MetaMask and add Toro Token:

Step 1: Install MetaMask Extension in Chrome
Step 2: Connecting to Toronet With MetaMask
Step 3: Add Toro Token into MetaMask

Step 1: Install MetaMask Extension in Chrome

To install MetaMask, follow the instructions provided.

https://www.geeksforgeeks.org/how-to-install-and-use-metamask-on-google-chrome/

Step 2: Connecting to Toronet With MetaMask

  1. Inside of MetaMask, click the toggle that by default says Ethereum Mainnet.
  2. Then select Custom RPC.
  3. Set the name to Toronet Test Network.
  4. Set the New RPC URL to the current public RPC address for the Toronet testnet:
https://testnet.toronet.org/rpc/
  1. Set ChainID to
54321
  1. Set the blockchain explorer to
https://testnet.toronet.org/
  1. The rest of the entries on the interface are optional and not required.

Step 3: Add Toro Token into MetaMask

  1. On the Add Token page, click on the Custom Token tab to expand the search window.
  2. Enter the token address in the field called Token Address:
0x21fe4779B8b8e00Fb76e754A1D527ad758DfEdE7
  1. In most cases, the Token Symbol and Decimals of Precision will autofill; otherwise, refer to the token project’s documentation for these details.
  2. Click Next to proceed.
  3. You will be redirected to confirm adding a token. Click Add Token to confirm.

The contract address of other tokens on the network will be added on this page as they become available on the RPC port.

Preparations

Follow the steps below to start project locally.

Installing Clone the repo

git clone https://github.com/alfaqi/HealthTrust.git

Change into the directory

cd HealthTrust

Install dependencies

npm i

Run the project

npm run dev

Open the browser

http://localhost:3000/

Smart Contract Details

HT Contract - main contract

https://testnet.toronet.org/address.html?address=0xC359681269Fbcb90da069Fd88FC3D42c58168031

IPFS Contract

https://testnet.toronet.org/address.html?address=0xb89a1Df0E13AEf94B1260c7749174469BC6EcD88

HTChatMessenger Contract

https://testnet.toronet.org/address.html?address=0x185954cF2F089904C3e7d113EF21344C2fdfaab8

HTLivestream Contract

https://testnet.toronet.org/address.html?address=0x0f2bc42F45CD95d10AB3a93aC3C31f32451DBc4c

Transactions

  1. HTContract

  2. IPFSContract

  3. HTChatMessenger

  4. HTLivestream

Originality

This project is an original creation by our team. We have built upon the following tools and frameworks:

Backend

  • Solidity
  • Toronet Blockchain
  • Toronet API stack
  • Hardhat
  • Openzeppelin
  • Ethers
  • Axios
  • Web3.storage
  • Livepeer

Frontend

  • Nextjs
  • MUI: Material-UI library
  • TailwindCSS

Challenges

There are some challenges that we faced, here's some of them and there solution:

Challenge 1: msg.sender Limitations

  • Issue: The blockchain doesn't fully support msg.sender.
  • Solution: Utilize the entered address for identification.

Challenge 2: Payable Function Issues

  • Issue: Challenges with payable functions.
  • Solution: Implement a more robust solution for handling payments.

About

Toronet Hackathon

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published