Git Product home page Git Product logo

sadityakumar9211 / medichain-hardhat Goto Github PK

View Code? Open in Web Editor NEW
15.0 2.0 3.0 442 KB

Hardhat Repository of MediChain: Decentralized Medical Record Keeping System

Home Page: https://medichain.vercel.app

License: GNU General Public License v3.0

JavaScript 64.31% Solidity 35.69%
decentralized-applications ethereum-dapp ethersjs hardhat healthcare-application metamask-wallet blockchain ethereum goerli-testnet

medichain-hardhat's Introduction

Contributors Forks Stargazers Issues GPL-3.0 License LinkedIn


Logo

MediChain: Decentralized Telemedicine and Medical Records

This repository is one of the three repositories which are part of MediChain Project.
medichain-nextjs: Frontend Repository of MediChain Project»
medichain-thegraph: The Graph Repository of MediChain Project»

Watch Demo Videos
Visit Site · Report Bug · Request Feature

This is the hardhat repository of this project.

If Application Error comes after just connecting the wallet, then change the network in metamask to Goerli Testnet and reload the page. This bug is unhandled for now.

Planned Changes

After my minor exams

  1. Rainbowkit + wagmi for connect button
  2. web3.storage for files
  3. Toast for Notifications
  4. DAO integration
  5. XMTP integration
  6. Video call integration
Table of Contents
  1. About The Project
  2. Getting Started
  3. Deployment to a testnet or mainnet
  4. Contributing
  5. License
  6. Contact
  7. Acknowledgments

About The Project

current image

What Problem does it Solve?

Blockchain being an immutable ledger and with decentralized nature has a great potential for increasing the security, privacy and efficiency of Medical Health Record keeping systems.

Currently existing solutions rely on centralized database which are susceptible to Ransomware attacks, Denial of Service(DoS) attacks and also have significant counterparty risks. Some decentralized solutions are also exist but some of them are not really decentralized that are based on private or permissioned blockchain, while some which are based on public blockchain have not properly addressed the performance and scalability issues. There is also no virtual private and safe way for patients to interact with their doctor and vice-versa. This platform also solves that by integrating this application with the a state of the art decentralized communications channel supported by XMTP and video meeting features by Huddle01. Further, in future I am also planning to add a DAO to this application to even more decentralize the whole system by also making patients involved in medical administration along with doctors, hospital administration and and their governing comittee.

Project Status

Currently, the proposed system is based on EVM compatible public blockchains using IPFS as a decentralized file storage solution and uses 2048 bit RSA encryption to encrypt the IPFS HASH of file metadata on the client-side before uploading the HASH on the blockchain. For supporting fast and complex queries this system uses a decentralized indexing protocol The Graph. The smart contract is currently deployed on Goerli Testnet.

Currently, with this system patients can access their medical records anytime anywhere without the counterparty risk from centralized entity. This system also features QR code for sharing of medical files from patients to doctors. With the proposed implementation the decentralized medical record keeping system provides increased security and privacy compared to centralized systems without loss of significant performance or scalability benefits.

At present, I am actively testing the DAO integration, for this system under a child project named VyroChain. Here is the link to VyroChain.

VyroChain is a Child Project of MediChain Project for testing DAO integration.

The link to VyroChain is here

The links to other repositories of this(MediChain) project is at the top.

This is only the hardhat repository of the project.

(back to top)

Built With

The following is a list of major tools used for developing this repository.

  • Hardhat
  • Openzeppelin
  • Ethers
  • Goerli Testnet
  • Alchemy
  • Etherscan

The tools used in the NextJS repository are: -

  • Next
  • React
  • tailwindcss
  • moralis
  • web3uikit

The major tools used in the The Graph repository are: -

  • The Graph

(back to top)

Getting Started

Requirements

  • git
    • You'll know you did it right if you can run git --version and you see a response like git version x.x.x
  • Nodejs
    • You'll know you've installed nodejs right if you can run:
      • node --version and get an ouput like: vx.x.x
  • Yarn instead of npm
    • You'll know you've installed yarn right if you can run:
      • yarn --version and get an output like: x.x.x
      • You might need to install it with npm
  • Optional Package
    • For convenience in development globally install hardhat-shorthand. More info here
    yarn global add hardhat-shorthand

Quickstart

git clone https://github.com/sadityakumar9211/medichain-hardhat
cd medichain-hardhat
yarn

Optional Gitpod

If you can't or don't want to run and install locally, you can work with this repo in Gitpod. If you do this, you can skip the clone this repo part.

Open in Gitpod

(back to top)

Deployment to a testnet or mainnet

  1. Setup environment variabltes

You'll want to set your GOERLI_RPC_URL and OWNER_PRIVATE_KEY as environment variables. You can add them to a .env file, similar to what you see in .env.example.

  • OWNER_PRIVATE_KEY: The private key of your account (like from metamask). NOTE: FOR DEVELOPMENT, PLEASE USE A KEY THAT DOESN'T HAVE ANY REAL FUNDS ASSOCIATED WITH IT.

  • GOERLI_RPC_URL: This is url of the kovan testnet node you're working with. You can get setup with one for free from Alchemy

  • ETHERSCAN_API_KEY: This is the API key generate from here for used for verification of deployed smart contract code.

  1. Get testnet ETH

Head over to faucets.chain.link and get some tesnet ETH. You should see the ETH show up in your metamask.

  1. Deploy
yarn hardhat deploy --network goerli

OR

hh deploy --network goerli

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the GPL v3.0 License. See COPYING for more information.

(back to top)

Contact

If you appreciated this, feel free to follow me or donate!

ETH Address: 0xED5A704De64Ff9699dB62d09248C8d179bb77D8A

Aditya Singh Linkedin Aditya Singh Twitter Aditya Singh StackOverflow Aditya Singh Medium Aditya Singh Gmail

Project Link: https://github.com/sadityakumar9211/medichain-hardhat

(back to top)

Acknowledgments

(back to top)

medichain-hardhat's People

Contributors

sadityakumar9211 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

medichain-hardhat's Issues

Make these upgrades

  1. Rainbowkit + wagmi for connect button - currently user's have to manually switch to Goerli testnet.
  2. web3.storage for files
  3. Toast for Notifications
  4. DAO integration
  5. XMTP integration
  6. Video meetings integration

On verify ownership option

Verification Failed
As per our records 0x9661846C0714E7dB587bCF30739c3aC14b8B52a2 is the owner of this smart contract.

How to solve this issue

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.