Skip to content

A simple decentralized app (dApp) for managing patient records and doctor bookings using Ethereum. Developed as a part of the CSE446: Blockchain and Cryptocurrencies course project.

License

Notifications You must be signed in to change notification settings

badhon495/HealthCare-dApp

Repository files navigation

HealthCare-dApp

A decentralized application (dApp) for managing patient records and doctor bookings using Ethereum. Developed as part of the CSE446: Blockchain and Cryptocurrencies course project.


Features

  • Appointment Management: Patients can book appointments with doctors.
  • Role-Based Access: Roles for patients, doctors, and admins can be registered.
  • Data on Blockchain: All data is securely stored on the Ethereum blockchain using smart contracts.
  • Tech Stack: Built with React.js and Solidity.
  • Blockchain Interaction: Uses MetaMask for blockchain interactions.
  • Deployment Tools: Smart contracts deployed with Truffle; Ganache used for local Ethereum blockchain.

Environment Setup

Following commands are tested on Linux.

If you want more through instructions, please visit the following Tutorial made by Yeasin sir.

Prerequisites

  1. Install Node Version Manager (nvm):

    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
  2. Install Node.js (v18.15.0):

    nvm install 18.15.0
    nvm alias default 18.15.0
  3. Install Truffle:

    npm install -g truffle
  4. Install Ganache:

    • Download from Ganache
    • Install additional tools:
      sudo add-apt-repository universe && sudo apt install libfuse2
    • Make the downloaded file executable and run it.
  5. Install MetaMask:

    • Go to MetaMask and install the extension for your preferred browser.
    • Follow the on-screen instructions to set up MetaMask.

Connecting MetaMask to Ganache

  1. Add Network Manually in MetaMask:

  2. Import Ganache Account to MetaMask:

    • Copy the private key from Ganache.
    • Import the account in MetaMask using the private key.

Installation

  1. Clone the repository.
  2. Start Ganache and create a new workspace.
  3. Compile and deploy the smart contracts using Truffle:
    truffle compile
    truffle migrate
  4. Install the required packages:
    npm install
  5. Start the React app:
    npm run dev
  6. Open the app in your browser at http://localhost:3000/.

Screenshots

Registration Page (Admin & Doctor)

The landing page of the app where the user can register as an Admin, Doctor, or Patient. Switching the account from MetaMask will change the role of the user. The first account of Ganache is an Admin account. If logged in as the first account, the landing page will directly take you to the Admin dashboard. Change the account to another account from Ganache to see the registration page. Registration Page

Registration Page (Patient)

Here patients can register by providing their details. Every time you register a new patient, a new transaction is created in the blockchain. Registration Page

Admin Dashboard

Here you will be able to update patient information. Admin Dashboard

Patient Dashboard

Here you will be able to book an appointment with a doctor. You can also view if the doctor is booked at a particular time. Patient Dashboard Every time a patient books an appointment, the selected admin gets one ether as a fee. Doctor Booking

Doctor Schedule

Here the doctor can view their schedule and appointments with information like how many patients registered and their age. Doctor Schedule


How to Contribute

  1. Fork the repository.
  2. Push your changes to a new branch.
  3. Create a pull request.
  4. Wait for the pull request to be reviewed.

About

A simple decentralized app (dApp) for managing patient records and doctor bookings using Ethereum. Developed as a part of the CSE446: Blockchain and Cryptocurrencies course project.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published