1. git clone firstname.lastname@example.org:libchain/libchain 2. npm install -g truffle ethereumjs-testrpc
In the folders
webapp are further
json packages, inside of each folder run:
1. npm install
To run the application you need to open 3 terminal sessions.
In one and first of all, the test blockchain must be up and running. To do that run
testrpc --gasLimit 0x98967F
As a side note, the
gasLimit flag set the gasLimit to 9999 which varies from the default value.
After the blockchain is up and running the rest of the modules of the application can be started. However the blockchain must be populated and the smart contracts have to be deployed as a next step followed by the start of the node server.
In another terminal session and inside the
root directory, run:
truffle compile && truffle migrate && truffle exec scripts/init.js
After that's done, then start the node server in the same session:
node directory, run:
At last, in the third open terminal session and inside the
webapp directory, run:
After you have the application up and running, then you need to create an account.
At the moment you can do:
- Buy books as an admin.
- Borrow books as a user.
- Return books as a user.
- View the borrowed books as a user.
- See statistics of books.
- See statistics of libraries and publishers.
Application components and general architecture.
Server-side a RESTful API is exposed running on a NodeJS environment with the Express server framework. The server uses the
web3 to consume the JSON API of Ethereum.
We designed our contracts with help of the Truffle framework and the deployment and compilation is also made with help of that framework.
For further information aplease visit the linked links to feel comfortable around the used technologies.