0% found this document useful (0 votes)
62 views10 pages

CS731 Report 15

Uploaded by

anony stark
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views10 pages

CS731 Report 15

Uploaded by

anony stark
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

REPORT WRITE UP

for

BlockChain based News Forum

Prepared by

Group 15

Vasavi Bashaboyna, 190228, [email protected]


Kindikeri Vyjayanthi Reddy, 190433, [email protected]
Himanshu PS, 190379, [email protected]

Course: CS731
Instructor: Dr. Angshuman Karmakar
Course TA: Sumit Lahari
Content

1. Introduction

2. Tech Stack Used

3. Instructions to Run

4. Functionality

5. User Manual
ACKNOWLEDGMENT

We would like to express our sincere gratitude to Prof. Dr. Angshuman


Karmakar for their invaluable support, guidance and for providing us with
their exceptional subject resources and knowledge required for the
project during the course.Their extensive expertise played a critical role
in shaping our understanding of the subject matter and helped us in
producing quality work.

We would like to thank Teaching Assistant Sumit Lahari for his


unwavering availability and guidance.Their mentorship has helped us
develop skills and knowledge, and their feedback has been crucial in
refining ideas and improving my work.
Additionally, we acknowledge the support of the faculty and staff of the
Department of Computer Science and Engineering at IIT Kanpur for
providing us with a conducive academic environment, access to resources.
Introduction
A news forum is typically a hub for the latest news feeds and information
about latest things around the world. It shows news articles on various
news topics like events, upcoming technology, public announcements etc.

With blockchain technology,we’ve built a NewsForum app which provides a


platform that is not only secure and transparent, but also decentralised,
meaning that no single entity controls the flow of information.It also
ensures that all news content is tamper-proof and verifiable, giving users
the confidence to trust the information they are receiving. The platform
also allows for community moderation, meaning that users can help to
ensure that the news content is accurate and unbiased by upvoting.
Tech Stack used
We used Truffle as our developmental framework for building, testing,
and deploying smart contracts. For Ethereum development , we’ve used
Ganache as a personal blockchain that provides a local blockchain
environment for testing smart contracts. We used Metamask to manage
the Users Ethereum accounts.

For the frontend we used HTML,CSS, BootStrap for design, javascript


to give some functionality.For the backend we used javascript, nodejs as
the javascript runtime environment, express framework, MongoDB
database with mongoose as object data modelling library(ODM) for
MongoDB and nodejs.
Instructions to Run

1. Download the project from this repository


(https://github.com/vyjayanthi22/NewsForum)
2. Install NodeJS and Truffle
3. Download Ganache
4. Open the downloaded repository on a text editor(say VS Code)
5. Open the terminal and use npm server.js
6. Now,go to the localhost http://localhost:3000/ where our code
runs
7. Set up Ganache local wallet in MetaMask
a. Login to MetaMask
b. Manually setup Ganache by entering the details
c. Open Ganache and import an account (by clicking on key
symbol,which gives you an private key)
d. Import the account into MetaMask, through clicking import
account and then enter and save the above private key.
e. Now, connect to this account in Metamask.
Functionality
USER of DApp : This DApp provides articles which could be seen by
anyone who needs to view the info present in each post/article.But
to access other functionalities like upvote,publish,validate an
article,one must signup/login.

➢ Signup : Allows user to sign up into the App

➢ Login : Users could login into the App with the credentials used
while signing up into account.

➢ New Article : To write an article/post ,users should use the ‘new


article’ button which allows them to write the title, body of the
post and submit it.Here the user could write the body only in less
than 200 words

➢ Upvote : An user could upvote the articles he finds


interesting/good once they login into the App.

➢ View Profile : It allows the user to view his login details ,view all his
submitted posts, an option to make his profile anonymous/public.
User Manual
1. This is HOME page of the App

2. Here,the use could login/sign up

3. Only after the user logins/sign ups,he gets the option to write the
new article
4. Here, On clicking new Article,user get the option to write article

5. On clicking submit,the article gets added into the submission pool.


Now validators could view them.
6. Once they get validated articles will be displayed into the home
page along with the title, username and time.
Smart Contract
The contracts directory contains a subdirectory for solidity contracts
named as “contracts”. The ‘Article.sol’ file includes a contract named
ArticleContract, which contains structs for Users and Articles with their
corresponding functions. The functionalities implemented are as follows:
● function submitArticle: used to submit an article to the validation
pool by the user.
● function validateArticle: used to validate the article and if the
minimum number of validations are received, mark it as validated.
● functions getValidatedArticles, getMySubmittedArticles,
getMyValidatedArticles: these functions return the arrays
corresponding to all validated articles, all the current user’s
submitted and waiting articles and the current user’s validated
articles.
● function upVote: increase the upvote count of a validated article
and maintain that current user has upvoted for this article

You might also like