A blockchain-based medical records system implemented in C for the ALU Clinic. This system provides a secure, immutable, and transparent way of managing patient medical records.
- Secure blockchain implementation for medical records
- Proof of Work mining mechanism
- Command Line Interface (CLI) for system interaction
- SHA-256 hashing for data integrity
- Transaction handling for medical records
- Chain verification and integrity checking
- Persistence: Blockchain data is automatically saved and loaded from disk
- Backup and Restore: Easily create and restore blockchain backups via CLI
.
├── src/
│ ├── block.c
│ ├── block.h
│ ├── blockchain.c
│ ├── blockchain.h
│ ├── transaction.c
│ ├── transaction.h
│ ├── cli.c
│ ├── cli.h
│ ├── utils.c
│ ├── utils.h
│ ├── persistence.c
│ └── persistence.h
├── include/
│ └── sha256.h
├── Makefile
├── README.md
└── documentation.md
- GCC compiler (version 7.0 or higher)
- Make build system
- OpenSSL development libraries (for SHA-256)
-
Install required dependencies:
# For Ubuntu/Debian sudo apt-get install build-essential libssl-dev # For macOS brew install openssl
-
Clone the repository:
git clone [repository-url] cd alu-medical-blockchain
-
Compile the project:
make
Run the program:
./bin/medblockchain
Available commands:
add
- Add a new medical recordmine
- Mine a new blockview
- View the entire blockchainverify
- Verify chain integritybackup
- Create a backup of the blockchainrestore
- Restore blockchain from the latest backuphelp
- Show available commandsexit
- Exit the program
- Currently supports only local storage (no networking)
- Limited to basic Proof of Work consensus
- No user authentication system
- No encryption of sensitive data (basic implementation)
- Persistence and backup/restore are implemented, but not encrypted
King Chukwumere - ALU Student
This project is created for educational purposes as part of the ALU Software Engineering Low-Level Specialization coursework.