Project made for CryptoDevs course on blockchain and smart contract development organized by ONG Bitcoin Argentina, ATIX LABS and RSK. Code setup taken from a couple of truffle boxes, namely react-auth-box in order to have an out of the box auth system and to take advantage of redux’s global states.
Paperchain is a dApp to keep track of scientific papers: users have to sign up with their name and field of work and can then upload documents, stored in a descentralized way with IPFS, as long as they are new (app includes POE). Users can also specify quoted papers during the document registration process and can peer-review existing papers, as long as they have the same “field”.
This is the first web front-end i’ve done in ages, though, so i also took it as an opportunity to learn a little bit on webpack, react and redux. That beind said, and with time being a limited asset, i didn’t focus much on front-end (so code might not be as reduxy as it should, be slightly inconsistent at some points).
- Install Truffle globally.
npm install -g truffle
- Download the code or clone the repo, go to it’s root folder and install all dependencies.
npm install
- Now compile and migrate the smart contracts. You can of corse enter the development console by typing
truffle develop
and all of the Truffle related commands will be entered without having to actually typetruffle
.
truffle compile
truffle migrate
- And test (all tests were written in JavaScript)
truffle test
Run the webpack
server in localhost (smart contract changes must be manually recompiled and migrated)
npm run start
To run the dapp locally, install ganache-cli
(formerly known as EthereumJS-TestRPC)
npm install -g ganache-cli
And fire up the personal blockchain (do it before deploying contracts; if there's nowhere to deploy, migrate
will fail)
ganache-cli