Capstone Secure Medical Record System
Developing a Secure Medical Record System Using Hyperledger Fabric with Enhanced Encryption and Improved Access Control
Overview
This document outlines the development of a secure medical record management system utilizing Hyperledger Fabric for blockchain functionalities, Java for chaincode, Spring Boot for backend services, and React with NextUI for the frontend.
Objective
Develop a blockchain-based solution to securely manage electronic medical records, ensuring high data privacy and integrity, and facilitating easy access for authorized users.
Technologies Used
- Hyperledger Fabric: Blockchain framework for high security and decentralization.
- Java: For developing the chaincode that handles operations on medical records.
- Spring Boot: For building backend services that interact with the blockchain and serve the frontend.
- React with NextUI: For creating a dynamic and user-friendly frontend interface.
System Architecture
Blockchain Network
- Components: Peers, Orderers, and Certificate Authorities.
- Chaincode: Smart contracts written in Java that manage CRUD operations on medical records.
Backend (Spring Boot)
- API Gateway: Manages routing and protocol translation.
- Application: Processes business logic and interacts with the blockchain via Fabric SDK.
Frontend (React + NextUI)
- Application: Provides dynamic interfaces for user interactions.
- UI Components: Enhanced with NextUI for better aesthetics and usability.
Chaincode Development in Java
Tools and Libraries
- Hyperledger Fabric SDK for Java
- JUnit for unit testing
- Maven for dependency management and build process
Key Functions
createRecord()
readRecord()
updateRecord()
deleteRecord()
Backend Development with Spring Boot
Libraries
- Spring Data for database interactions
- Spring Web for creating RESTful endpoints
- Spring Security for authentication and security
API Design
- RESTful endpoints to handle CRUD operations and authentication.
Frontend Development with React and NextUI
Setting Up the Frontend Scaffolding
To set up the React application efficiently, we'll use Create React App, which provides a modern build setup with no configuration.
Step-by-Step Setup:
- Create React App:
npx create-react-app medical-records-app
cd medical-records-app
- Install NextUI:
npm install @nextui-org/react
Install React Router:
npm install react-router-dom
Install Axios:
npm install axios
Build and Deployment
npm run build
Deployment:
Deploy the build artifacts to a web server or a cloud-based hosting service in Aliyun.
Deployment Strategy
Chaincode
Package and deploy using Maven; deploy scripts handle installation on Hyperledger Fabric network.
Backend
Containerize the Spring Boot application using Docker; manage with Kubernetes for orchestration.
Frontend
Static files produced by npm run build are deployed to Aliyun cloud hosting service.
Security Measures
Encryption: AES-256 for securing data. Access Control: Role-based access using Hyperledger Fabric's membership services. API Security: Secured endpoints using OAuth 2.0.