{"id":20355051,"url":"https://github.com/nicholasmamo/dwarna","last_synced_at":"2025-04-12T02:41:28.813Z","repository":{"id":37843673,"uuid":"179258040","full_name":"NicholasMamo/dwarna","owner":"NicholasMamo","description":"Dwarna: A Blockchain Solution for Dynamic Consent in Biobanking","archived":false,"fork":false,"pushed_at":"2023-08-30T08:32:06.000Z","size":32671,"stargazers_count":8,"open_issues_count":24,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-25T22:21:19.761Z","etag":null,"topics":["biobanking","blockchain","dynamic-consent","hyperledger-composer","hyperledger-fabric","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NicholasMamo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-04-03T09:36:57.000Z","updated_at":"2024-03-25T13:23:51.000Z","dependencies_parsed_at":"2023-01-26T06:45:22.993Z","dependency_job_id":"c1e10f76-2774-400c-bece-6df180dcfedc","html_url":"https://github.com/NicholasMamo/dwarna","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicholasMamo%2Fdwarna","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicholasMamo%2Fdwarna/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicholasMamo%2Fdwarna/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicholasMamo%2Fdwarna/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NicholasMamo","download_url":"https://codeload.github.com/NicholasMamo/dwarna/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248507468,"owners_count":21115607,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["biobanking","blockchain","dynamic-consent","hyperledger-composer","hyperledger-fabric","wordpress","wordpress-plugin"],"created_at":"2024-11-14T23:10:57.184Z","updated_at":"2025-04-12T02:41:28.786Z","avatar_url":"https://github.com/NicholasMamo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](https://github.com/NicholasMamo/dwarna/raw/master/assets/logo.png \"Dwarna Logo\")\n\n# Dwarna: A Blockchain Solution for Dynamic Consent in Biobanking\n\nDwarna ('about us' in Maltese) is a blockchain-based dynamic consent application for biobanking.\nIn biobanking, individuals provide biospecimens, like blood or saliva, to be used in medical research.\nDynamic consent transforms these individuals into research partners, allowing them to decide in which research they want to participate.\nDwarna is an application that is served through a WordPress plugin.\nIt uses a Hyperledger Fabric blockchain to store research partners' consent changes to create an immutable consent trail.\n\nMore details about Dwarna can be found in [Dwarna: A Blockchain Solution for Dynamic Consent in Biobanking](https://www.nature.com/articles/s41431-019-0560-9), published in the European Journal of Human Genetics.\n\n## Getting Started\n\nTo download this repository, clone it using `git clone https://github.com/NicholasMamo/dwarna.git`.\nThen, follow the installation instructions in this README file.\nThis repository contains three different sub-projects: a WordPress plugin, a Hyperledger Fabric blockchain and a REST API.\nMore detailed instructions about each sub-project, including installation and configuration instructions, are in the respective directories:\n\n- [WordPress biobank plugin README.md](https://github.com/NicholasMamo/dwarna/tree/master/biobank-plugin)\n- [Hyperledger Fabric README.md](https://github.com/NicholasMamo/dwarna/tree/master/fabric)\n- [REST API README.md](https://github.com/NicholasMamo/dwarna/tree/master/rest)\n\n### Prerequisites\n\nDetails about the prerequisites are available in each README.md file.\nSome Python prerequisites are required to run the REST API and the setup scripts:\n\n    virtualenv venv\n\tsource venv/bin/activate\n\tpython -m pip install -r requirements.txt\n\n### Installing\n\nTo install Dwarna, use the `install.sh` script:\n\n\t./install.sh\n\nThe script installs the schema using psycopg2, and Hyperledger Fabric and its dependencies.\n\nHowever, you still need to configure the REST API and the WordPress plugin.\nTo do this, follow the README files above.\n\nOnce you have configured Dwarna, you can start Hyperledger Composer and the REST API using the `start.sh` script:\n\n\t./start.sh\n\nThe email delivery script is part of the REST API.\nTo run it:\n\n    ./rest/deliver.py\n\n### Backups\n\nDwarna's `tools/backup.sh` script takes a backup of all the files that are necessary to restore all data.\nTo take a backup:\n\n    ./tools/backup.sh\n\nBy default, the backups are created in the `backups/` directory.\nYou can change the destination by using the `-o` argument.\nIf the `-z` argument is given, an archive is created from the backup.\n\n\t./tools/backup.sh -o other/folder -z\n\nBackups are separated into folders according to the date when they were taken.\nThese directories have the format `yyyymmdd`.\nEach backup is further separated into folders:\n\n* `fabric/` - The blockchain data;\n* `rest/` - The REST API configuration;\n* `biobank-plugin/` - The WordPress plugin configuration;\n* `postgresql/` - The PostgreSQL data; and\n* `wordpress/` - The WordPress MySQL data\n\nBy default, the backup copies all of this data.\nYou can specify which data to back up by passing on the following arguments:\n\n* `--blockchain` - Back up only the Hyperledger Fabric files;\n* `--rest` - Back up only the REST API configuration;\n* `--plugin` - Back up only the WordPress plugin configuration;\n* `--postgresql` - Back up only the PostgreSQL data; and\n* `--wordpress` - Back up only the WordPress MySQL data\n\nTo automate backups, copy the `tools/cred.example.conf` file and fill it in.\nThe `backup.sh` script automatically reads the credentials from it.\n\nTo restore a backup, run the `tools/restore.sh` script:\n\n    ./tools/restore.sh -p backup/yyyymmdd\n\nThe script automatically restores the backup stored in the folder named `backup/yyyymmdd`.\nIf an archive is given instead, the script automatically extracts it.\nBy default, the restoration copies back all of this data.\nYou can specify which data to restore by passing on the following arguments:\n\n* `--blockchain` - Restore only the Hyperledger Fabric files;\n* `--rest` - Restore only the REST API configuration;\n* `--plugin` - Restore only the WordPress plugin configuration;\n* `--postgresql` - Restore only the PostgreSQL data; and\n* `--wordpress` - Restore only the WordPress MySQL data\n\n### Data erasure\n\nThe 'tools/erase.sh' script can be used to erase research partner data from backups, including archives.\nThe script takes in a path to the directory where backups are stored, and a list of research partner pseudonyms to erase:\n\n\t./tools/erase.sh -p backup p2320 p2321\n\nSee [REST API README.md](https://github.com/NicholasMamo/dwarna/tree/master/rest) for instructions to erase research partners from backups on deletion.\n\n## CRON\n\nCRON files are available in the `cron` directory.\nThe scripts are made to be callable directly and automatically log to a file.\nNote that the scripts still need to be updated with the correct paths.\nSome directories and files need to be created in advance with the correct permissions.\n\n## Running the tests\n\nTo run the unit tests, use the `tests.sh` script:\n\n\t./tests.sh\n\nThe unit testing ensures the correct functioning of the database schema and the REST API.\nTo run them separately, use the `-t` command-line argument:\n\n    ./tests.sh -t rest\n    ./tests.sh -t schema\n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/NicholasMamo/dwarna/tags).\n\n## Authors\n\n* **Nicholas Mamo** - *Development* - [NicholasMamo](https://github.com/NicholasMamo)\n\n## License\n\nThis project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n* [PurpleBooth](https://gist.github.com/PurpleBooth/109311bb0361f32d87a2) for this README template\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicholasmamo%2Fdwarna","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicholasmamo%2Fdwarna","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicholasmamo%2Fdwarna/lists"}