Inspiration

Wanted to learn more about the blockchain. Curiosity to understand Ethereum, Truffle, and React more. I came with a problem statement. An idea to bring Authors and Readers on the same platform so that the Author can make maximum profit and Readers can access the book at a minimum price. No middleman, No duplicacy. Only Readers and Authors.

What it does

A platform where anyone(Readers/Author) can upload books in the form of pdf. Readers can also upload the book if the copyright has expired or Author allows it to upload the book. After the upload of the books, first, it goes for the review where it is cross-checked who is the author, and is it the correct book or not? If a book gets verified then the book will be submitted to ChainBooks otherwise rejected.

Readers will be charged on the basis of the number of pages read. ChainBooks will provide limited free coins in the beginning to explore, to try, and will charge to read more. The author will get direct money to his/her account whenever any reader starts reading the book. There will be no middleman. Only the reader and Author.

For the signing of Readers and Author Torus will be used which makes the process simple. Truffle framework of Ethereum will be used to make the dapp.

Overall: Readers can make their own libraries where they can make their own collections. The author will have the right to remove their book from the platform. Readers will have an option to write comments and to give a rating to the book. Readers will be able to request a book and on the base of demand, the Author will be notified.

How I built it

I used the Truffle framework to write the smart contract and to migrate those. I deployed the smart contract on the Ropsten network and using the web3 and react framework we started interacting with the blockchain. In React first, we configured the crypto cloud wallet (Torus) which makes the signup of the user easy, user just need to select Gmail, Facebook or linked account for the authentication and Torus will take care of creating a wallet. IPFS is used to store the books and the generated hash is kept in the smart contract. MongoDB is also used to store the basic info of users like the name of the book which has been bought and kept in the user's library. It does not store the hash of the book, only the title. It is done to increase the speed of the project. A PDF viewer is used to showing the pdf page by page.

Challenges I ran into

Torus is a very new organization and its product is in progress. To understand and to use it was a little tough for us. Writing the smart contract where it returns the array other than unit[] was a little complex. It got resolved using pragma experimental ABIEncoderV2; There were many challenges with the React, as we were approaching the deadline, our fixes were flexible but quite working.

Accomplishments that I'm proud of

We learned the React, Truffle, Torus, and used IPFS as well, all together. This hackathon gave a huge motivation to complete this project. It was a great journey. It is a huge accomplishment as we were able to build the project completely.

What I learned

We learned the importance of teamwork, leadership, and communication skill. These were the most important things that we learned with this hackathon.

What's next for ChainBooks

Readers can read the book offline as well. Readers can share the book but it will only open in the app. The author will have the right to remove their book from the platform. Readers will have an option to write comments and to give a rating to the book. Chainbooks will be available at IOS and Android app as well.

Built With

Share this project:

Updates