A Blockchain-based data sharing platform for monitoring data license accountability and compliance.
The architecture of LUCE is shown below.
-
Users:
- Hospital: represents medical institutions that need to access and input data.
- Patient: Patients whose data is being managed and exchanged.
- Institution: Other entities that may need access to the data, possibly for administrative or research purposes.
-
LUCE Data Exchange Interface:
- The interface supports different platforms, and it communicates with a backend using a RESTful API, a popular choice for web services.
-
LUCE Data Exchange modules:
- Data Exchange: This module is responsible for the transfer of data between parties.
- Consent: It ensures that data is not exchanged without the consent of the data owner.
- Privacy: A module dedicated to maintaining privacy.
- Smart contract: uses blockchain technology to enforce contracts regarding data access and usage.
-
Storage:
- On-Chain Storage: Utilizes blockchain technology, storing shared data and meta-data.
- Off-Chain Storage: Utilizing local storage or cloud storage, to store the raw data and administrative data
Clone the repository:
git clone https://github.com/MaastrichtU-IDS/DecentralizedHealthcareBackend
cd DecentralizedHealthcareBackend
To launch LUCE, run:
docker compose up
Each component of the LUCE stack is deployed in a different docker container, defined in docker-compose.yml
User login and access to the contract is managed by a python Django API
Code in the backend
folder. Django settings in backend/src/luce/lucehome/settings.py
React-native (expo) JavaScript webapp for users to upload and search for contracts. It uses the Django API
Code in the frontend
folder
Snarkjs-based server for generating Zero-Knowledge Proofs (ZKPs).
Code in the zkp_service
folder
LUCE use PostgresQL to keep user information, you can configure it in Django project settings
Ganache is used to deploy an Ethereum blockchain network for LUCE, available through HTTP
You can access with LUCE API, or with app
- Step 1: register
- Step 2: login
Once logged in, you can get a token which is necessary for later operation
- Step 3: upload data
For more details, please refer to Understanding the Login Related Process
For how to maintain the documentation, please refer to: Documentation mantaince
For how to develop in LUCE, please refer to: LUCE development tips
Install development dependencies:
pip install hatch uv
npm install -g expo-cli
Compile requirements.txt
from pyproject.toml
:
uv pip compile pyproject.toml -o requirements.txt
- Start the database and blockchain in docker for development:
docker compose -f docker-compose.dev.yml up
- Start the backend:
cd backend
hatch run dev
- Start the frontend:
cd frontend
npm install
npm run start
- if you encounter the issue:
brownie.exceptions.ContractNotFound: No contract deployed at 0xDa574613C62f6DB9FFE8dCC5a8b079Ba37e29390
,
please go to
luce_vm/brownie
, removebuild/deployment
folder in the brownie directory, and then runbrownie compile
- If you got the response:
{
"error": {
"code": 400,
"message": "validation error",
"status": "ERROR",
"details": "luce registry was not deployed"
},
"data": {}
}
please deploy a LUCERegistry contract in admin/deployRegistry/
endpoint.