This repository contains the source code for a decentralized medical record system built on the Celo blockchain. The application allows doctors to create, view, and update medical records for patients while ensuring data integrity and privacy.
The system utilizes smart contracts written in Solidity, a frontend built using React, and integration with the Celo network through the Celo SDK and Celo Extension Wallet.
These instructions will guide you through the process of setting up and running the decentralized medical record system on your local machine for development and testing purposes.
Before you proceed, ensure that you have the following software installed on your system:
- Node.js (v12.0.1 or later) - https://nodejs.org/
- Truffle - https://www.trufflesuite.com/
- Celo Extension Wallet - https://chrome.google.com/webstore/detail/celo-extension-wallet/kkilomkmpmkbdnfelcpgckmpcaemjcdh
- A DataHub account for accessing the Celo network - https://datahub.figment.io/
- Clone the repository
git clone https://github.com/yourusername/decentralized-medical-record-celo.git
cd decentralized-medical-record-celo
- Install the dependencies
npm install
- Create a
.env
file in the root directory of the project and add your Celo private key and DataHub RPC URL:
CELO_PRIVATE_KEY=<your-celo-private-key>
CELO_RPC_URL=<your-datahub-rpc-url>
- Compile and deploy the smart contracts
truffle compile
truffle migrate --network celo
- Start the React development server
npm start
-
Open a browser and navigate to
http://localhost:3000
. Make sure you have the Celo Extension Wallet installed and configured with a Celo account. -
Interact with the application to create, view, and update medical records.
- Celo - The blockchain platform
- Solidity - The smart contract programming language
- React - The frontend library
- Truffle - The development and testing framework
- OpenZeppelin - The library for reusable smart contract components
Refer to the Next Steps section in the tutorial for ideas on how to expand and improve the application.