Skip to content
Airmed Foundation's IPFS + Hyperledger Fabric web client
JavaScript HTML CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
airmedChaincodes Chaincode bug fixed Aug 13, 2019
fabric-api New tools to check transaction status Mar 16, 2019
docker-compose.yaml Added redis:4.0 to handle sessions Mar 19, 2019

Airmed Foundation - Node.js Terminal

The Airmed Foundation is an open source initiative that provides a secure channel to store and transfer medical records. It is based on the Interplanetary File System (IPFS) and Hyperledger Fabric. The conjunction of these technologies guarantees the immutability and availability of the data.

In order to achieve secure and reliable file management:

  • We replicate all records on the IPFS network using the Bittorrent protocol.
  • We restrict access to records using asymmetric cryptography.
  • We protect and store cryptographic access keys in the Hyperledger Fabric blockchain.

Sharing files with the Airmed Foundation platform is pretty straightforward. Depending on their desired privacy level, one can upload files with or without asymmetric encryption. We have created this tutorial to explain both procedures.

Installation and Usage

The following dependencies must be downloaded and installed in order to use Airmed Foundation's Node.js terminal:

  • Interplanetary File System (IPFS)
  • Docker
  • Docker Compose
  • Node.js
  • NPM
  • NVM
  • Hyperledger Fabric

Here we guide you through this process.

Interplanetary File System (IPFS)

Project website:

tar xvfz go-ipfs_v0.4.19_linux-amd64.tar.gz
cd go-ipfs
sudo ./
ipfs init

Docker and Docker Compose

Project website: (Docker)
Project website: (Docker Compose)

sudo apt-get install docker-ce docker-ce-cli
sudo apt-get install docker-compose

Node.js, NPM and NVM

Project website: (Node.js)
Project website: (NPM)
Project repo: (NVM)

sudo apt-get install nodejs
nvm install 8.15.0
nvm use 8.15.0

Hyperledger Fabric

Project website:

git clone
cd fabric-samples
./scripts/ 1.4.0 1.4.0
cd first-network
./ generate
./ up

Download Airmed Foundation

Project website:

git clone
cd airmedfoundation-terminal
npm install 

Install Chaincode to Hyperledger Network

cd airmedfoundation-terminal
docker exec -it cli peer chaincode instantiate -C mychannel -l "node" -n airmed -v v1 -c '{"Args":[]}' -o --tls --cafile /opt/gopath/src/
docker exec -it cli peer chaincode instantiate -C mychannel -l "node" -n secureRec -v v1 -c '{"Args":[]}' -o --tls --cafile /opt/gopath/src/

Configuration of Airmed Foundation's server

Edit config/datastores.js

Change values to connect to postgreSQL. In order to install postgreSQL, you can run the following command in the terminal:

docker-compose up -d

Edit config/policies.js

For testing purposes, remove comment from line 20. That is, line

//'*': 'isHTTPS',

should now look like

'*': 'isHTTPS',

Edit Hyperledger configuration file

In the file fabric-api/config/configfile.yaml, you should replace the default admin certificate paths with the actual path of your project. Please note that you should only modify paths from adminPrivateKey in Line 44 under Org1, and in Line 56 under Org2. Everything else must remain unaltered.

As a further advice, please make sure that fabric-sample and airmedfoundation-terminal are in the same directory.

The paths should look as follows:

Running the application

Running the application is very simple. You just need to:

  • Run IPFS
ipfs daemon &
  • Run the sync process
./ &
  • Run the server
node ./node_modules/sails/bin/sails.js l --redis --safe

And now you're ready to go!

Contact: This open source project is brought to you by The Chain, a software shop specialized in the development of applications and services based on blockchain technology and artificial intelligence. Any questions that might arise should be sent to the project's maintainers. We will be happy to assist you.


License: This project is under the GNU Affero General Public License v3.0.

You can’t perform that action at this time.