This a PHP application with a custom framework that uses Blockchains (PHP objects) encoded for JSON storage locally. Then gossiped between a peer-to-peer network, using majority concensus to update from valid peer data and to communicate changes in the local user's data to the network.
- You need at least PHP 7.3 (CLI) plus a few common PHP extensions.
- You need to have
composer
installed. - You need to have
firefox
installed (Launches Firefox by default). - You should be running Linux (Developed for Debian 10) to avoid encountering security issues with running the application start shell script.
- Clone the repo:
git clone https://github.com/Dregozone/PhpChain
(Or alternative method). - Navigate to
PhpChain/
- Run
composer install
to install dependencies.
- Navigate to
PhpChain/Communication
- Run
php -S localhost:8081 -t ../
- Open browser at
localhost:8081/SampleMES
- Navigate to
PhpChain/
- Run
./vendor/bin/phpunit --testdox
. This will run each component of the system's unit tests.
- Navigate to
PhpChain/Communication
If you are the first node on the network:
- Run
USER={user} ./run.sh
, where {user}=Your username. This will bootstrap the gossip network with only your user to begin with.
Else
-
Run
USER={user} PEER={peer} ./run.sh
, where {user}=Your username, {peer}=A known peer username. This will join the existing gossip network looking for the named peer node. -
Your Firefox browser will automatically open at the application login screen.
Enjoy!