Skip to content

0. Project setup

Gintare Saali edited this page Dec 11, 2022 · 2 revisions

Project setup

Start in project directory (/EthereumProject) Run the initial setup script

sh InitialSetup.sh

IPFS

IPFS is a peer-to-peer hypermedia protocol, which we are using to store data because it is secure.

Files uploaded to IPFS are assigned a cryptographic hash value, which is unique to that file. If the same file is again uploaded the returned has value will be the same, as the contents of the file are identical. If the data stored is modified in any way the hash value will be altered, making data tampering very difficult. Hence these cryptographic hashes create security for our data. Another benefit of IPFS is that having access to the hash value allows a user to view only that file (or directory) associated with the hash, it does not allow the user to view any other files that are stored in the system, essentially restricting their access to files they do not own.

To install IPFS, enter these commands:

wget https://dist.ipfs.tech/kubo/v0.17.0/kubo_v0.17.0_linux-amd64.tar.gz
tar -xvzf kubo_v0.17.0_linux-amd64.tar.gz

cd kubo
sudo bash install.sh

To start IPFS:

ipfs init
ipfs daemon

Install Flask

source env/bin/activate
pip install flask

Ganache

Currently, both the website and dApps are running using a Ganache test chain

  • Install Ganache (can download it from here)
  • Use Quickstart in Ganache to open a new workspace

Running the website

  1. To launch the website run connection.py (EthereumProject/App/connection/connection.py)
  2. Make sure IPFS is running (run ipfs daemon in another terminal)
  3. Visit the IP address provided in the terminal after connection.py launches
  4. On the website for doctor and patient addresses use any of the default addresses provided in Ganache workspace

Running decentralized applications (dapps)

Setup

  • run the command
sudo python3 setup.py install
  • All dapps are located in /EthereumProject/dapps/
  • Dapp functionality is contained within a library located in /EthereumProject/library/

For more detailed information about dapps please refer to section 4 of this wiki.

Clone this wiki locally