News Web Application Project Report
News Web Application Project Report
A Project Report
Submited by
September-23
BONAFIDE CERTIFICATE
Certified that this project report “News Web Application” is the bonafide work of
“Lovum Saini” who carried out the project work under my supervision.
SIGNATURE SIGNATURE
Assistant Professor
UIC UIC
As the name suggests this website is based upon daily news. As there are
newspapers but they are not available all over the time and sometime they are
hard to carry also. This website handles this problem.
The News Web Application is a Web based application. This website works
upon an api from where we fetch the news. This web-based Application is time
saving, money saving and user can read news at any time and at any place. In
the day-to-day life of every person news plays an important role. With the help
of news, we can get in touch with the outer world, what is happening in the
outside world. With the help of this website every person can get to know what
is happening in the outside world without going outside from their respective
places.
For elder people’s it is very difficult for them to go out and get newspapers, but
with the help of this website they can read any news based on any field. This
website saves the time of common people as there are different sections of
different fields for example entertainment, sports, business and so on. There is
also one section called trending news where we can get all the trending news
based on any field which makes this website more helpful and better. As there is
google, newspapers, tv channels for news so why the people will use this
website? The answer is first of all this website is free of cost anyone can access
it from anywhere, this website is available 24 X 7 just users need internet
connection and one phone to access this website, this website s time saving as
there are different sections for different type of new which helps to save the
time.
Chapter - 1
INTRODUCTION
Name of Specifications
Components
Web browser Chrome, edge, opera,
so on
Frontend [Link] and tailwind css
Development
Backend News api
Development
1.4 Project Analysis
The sources used now for reading news are newspaper, google, television in
which we are not able to read about particular field if it is possible then there is
wastage of time, money and resources of common people which is good for
long term.
Maximum number of the sources are paid if they are not paid then they do not
provide good quality and it is time consuming. One more very
important point they are not accessible at every time and everywhere which
again is not a good thing.
1. By default, user will land on trending page which u can also it is the home page
of the website where all the trending news will be shown.
2. User, can select any option or section from the navigation bar if he/she wants to
read about particular news.
3. There are different sections for different field of news for example
entertainment, business, sports and so on.
4. With the help of different sections users can save their time by directly moving
to the particular section which they want to read.
5. There is read more button in every news card with the help of which we can
read more about that particular news.
The explosive growth in the usage of mobile devices for news and information
during the past years persistently boosted the newspaper digital audience.
According to the studies and surveys, the trend is going to increase in the future
and there are seen no any sign of decrease.
As it is cost, time and resource saving it will help to survive for long term.
Online portals or websites are easy to access from everywhere in the world. You
don’t have to be worried anymore thinking what are the things taking place in
your locale while you are abroad. Online news portals bring you the updates
instantly. This easy access feature is tempting readers to avoid print media.
Chapter – 2
Literature Review/Background Study
In this chapter, we will dive into a comprehensive literature review and
background study related to the problems faced by the persons that our "News
Online" Web application aims to address. This section provides us the valuable
insights into the historical context, existing solutions, and the significance of our
project.
2.1 Timeline of the reported problem
Here is a timeline of some significant developments and events in the history of
news websites up until my last knowledge update in September 2021:
1990s-2000s:
1990s: Slow Internet connections and limited bandwidth affect the user
experience for accessing news websites.
Early 2000s: Pop-up ads and intrusive advertising disrupt the reading
experience on many news websites.
2000s: The rise of online forums and comment sections leads to concerns about
the spread of hate speech, trolling, and misinformation in user-generated
content.
2010s:
2010s: Clickbait headlines and sensationalism become prevalent on many news
websites, undermining the credibility of journalism.
2010s: Concerns about online privacy and data collection emerge as news
websites track user behavior for targeted advertising.
2010s: The proliferation of ad-blockers poses challenges to the revenue models
of news websites, impacting their sustainability.
2010s: The spread of fake news and misinformation on social media platforms
and news websites becomes a major concern.
2010s: Digital platforms like Google and Facebook are criticized for capturing a
large share of advertising revenue, affecting the financial health of news
websites.
2016: The term "fake news" gains prominence during the U.S. presidential
election, drawing attention to the issue of false information on news websites.
2018: The European Union's General Data Protection Regulation (GDPR) is
implemented, forcing news websites to comply with strict data privacy
regulations.
2020s
2020: The COVID-19 pandemic leads to a surge in online disinformation and
conspiracy theories on news websites.
2020: The economic impact of the pandemic results in layoffs and financial
difficulties for many news organizations, including digital news websites.
2020: The debate over content moderation on social media platforms spills over
to news websites, raising questions about free speech and censorship.
2021: Algorithms on social media and news websites are criticized for
promoting filter bubbles and echo chambers, where users are exposed only to
content that aligns with their existing beliefs.
2021: Misinformation and disinformation about vaccines spread on news
websites, hindering efforts to combat the pandemic.
In News Online: This website is known for its wide variety of news. In this
website we are different sections for different types of news which makes it
different from others and its data is updated after a small interval of time which
will help the users to get time to time updated
In the subsequent sections of this report, we will define the problem of News
Websites problems more precisely, outline the specific goals and objectives of
the "News Online" Web application, and proceed to describe the development
and implementation process. This project aims to build upon the insights gained
from the review process and offer an innovative solution to the persistent
challenges news field.
2.5 Problem Definition
News websites face various challenges and problems in today's digital
landscape. These issues can impact their credibility, sustainability, and ability to
fulfil their roles as sources of information. Some common problems of news
websites include:
Our News Online website is looking forward to optimize all these issues and
stand out from other websites.
2.6 Goals/Objectives
There are various goals of news websites. Some of them are listed below
Informing the Public: One of the primary goals of news websites is to inform
the public about current events, both locally and globally. They provide news,
articles, and multimedia content to keep people updated on important
happenings around the world.
5. Featured Content:
Highlight important or breaking news stories, Prominent space for featured
articles and editor's picks.
8. Related Content:
Show related articles to keep readers engaged. Promote older articles to increase
their visibility.
9. Newsletter Signup:
Allow users to subscribe to newsletters. Send regular email updates with top
stories.
10. Security:
Implement security measures to protect against hacking and spam. Use SSL
encryption for secure connections.
11. Accessibility:
Ensure the website is accessible to all users, including those with disabilities.
Use alt text for images, provide keyboard navigation, and adhere to WCAG
guidelines.
NEWS
HEALTH ONLINE SCIENCE
ENTERTAINMENT SPORTS
Code of the Project
[Link]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/[Link]" />
<meta name="viewport" content="width=device-width,
initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description"
content="NewsOnline is a news app which can be
used to grab daily news, If you are interested in
news, weather forecast, etc then newsmonkey is for
you! " />
<link rel="apple-touch-icon"
href="%PUBLIC_URL%/[Link]" />
<link rel="manifest"href="%PUBLIC_URL%/[Link]"
/>
<link
href="[Link]
t/css/[Link]" rel="stylesheet"
integrity="sha384-
1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqy
l2QvZ6jIW3" crossorigin="anonymous">
<title>NewsOnline - Get your daily dose of news
for free</title>
</head>
<body>
<noscript>You need to enable JavaScript to run
this app.</noscript>
<div id="root"></div>
<script
src="[Link]
2/dist/umd/[Link]" integrity="sha384-
7+zCNj/IqJ95wo16oMtfsKbZ9ccEh31eOz1HGyDuCQ6wgnyJNSYdrP
a03rtR1zdB" crossorigin="anonymous"></script>
<script
src="[Link]
/js/[Link]" integrity="sha384-
QJHtvGhmr9XOIpI6YVutG+2QOK9T+ZnN4kzFN1RtK3zEFEIsxhlmWl
5/YESvpZ13" crossorigin="anonymous"></script>
</body>
</html>
[Link]
import React from 'react';
import ReactDOM from 'react-dom';
import './[Link]';
import App from './App';
import reportWebVitals from './reportWebVitals';
[Link](
<[Link]>
<App />
</[Link]>,
[Link]('root')
);
reportWebVitals();
[Link]
import './[Link]';
import React, {useState } from 'react'
import Navbar from './components/Navbar';
import News from './components/News';
import{BrowserRouter as Router, Routes, Route} from
"react-router-dom"
import LoadingBar from 'react-top-loading-bar';
const App = () => {
const pageSize= 5;
const apiKey = [Link].REACT_APP_NEWS_API
const[progress, setProgress] = useState(0)
return (
<div>
<Router>
<Navbar/>
<LoadingBar color='#f11946' progress={progress}/>
<Routes>
<Route exact path="/" element={<News
setProgress= {setProgress} apiKey={apiKey}
key="general" pageSize={pageSize} country="in"
category= "general"/>} />
<Route exact path="/business" element={<News
setProgress= {setProgress} apiKey={apiKey}
key="business" pageSize={pageSize} country="in"
category= "business"/>} />
<Route exact path="/entertainment"
element={<News setProgress= {setProgress}
apiKey={apiKey} key="entertainment"
pageSize={pageSize} country="in" category=
"entertainment"/>} />
<Route exact path="/general" element={<News
setProgress= {setProgress} apiKey={apiKey}
key="general" pageSize={pageSize} country="in"
category= "general"/>} />
<Route exact path="/health" element={<News
setProgress= {setProgress} apiKey={apiKey}
key="health" pageSize={pageSize} country="in"
category= "health"/>} />
<Route exact path="/science" element={<News
setProgress= {setProgress} apiKey={apiKey}
key="technology" pageSize={pageSize} country="in"
category= "science"/>} />
<Route exact path="/sports" element={<News
setProgress= {setProgress} apiKey={apiKey}
key="sports" pageSize={pageSize} country="in"
category= "sports"/>} />
<Route exact path="/technology"
element={<News setProgress= {setProgress}
apiKey={apiKey} key="technology" pageSize={pageSize}
country="in" category= "technology"/>} />
</Routes>
</Router>
</div>
)
}
export default App;
[Link]
import React from 'react'
import{Link} from "react-router-dom"
const Navbar = ()=> {
return (
<div>
<nav className="navbar fixed-top
navbar-expand-lg navbar-dark bg-dark">
<div className="container-fluid">
<Link className="navbar-brand"
to="/">NewsOnline</Link>
<button className="navbar-
toggler" type="button" data-bs-toggle="collapse" data-
bs-target="#navbarSupportedContent" aria-
controls="navbarSupportedContent" aria-
expanded="false" aria-label="Toggle navigation">
<span className="navbar-
toggler-icon"></span>
</button>
<div className="collapse
navbar-collapse" id="navbarSupportedContent">
<ul className="navbar-nav me-
auto mb-2 mb-lg-0">
<li className="nav-item">
<Link className="nav-link"
aria-current="page" to="/">Home</Link> </li>
<li className="nav-item">
<Link className="nav-link"
to="/business">Business</Link></li>
<li className="nav-item">
<Link className="nav-link"
to="/entertainment">Entertainment</Link></li>
<li className="nav-item">
<Link className="nav-link"
to="/general">General</Link></li>
<li className="nav-item">
<Link className="nav-link"
to="/health">Health</Link></li>
<li className="nav-item">
<Link className="nav-link"
to="/science">Science</Link></li>
<li className="nav-item">
<Link className="nav-link"
to="/sports">Sports</Link></li>
<li className="nav-item">
<Link className="nav-link"
to="/technology">Technology</Link></li>
</ul>
</div>
</div>
</nav>
</div>
)
}
export default Navbar
[Link]
import React, { useEffect, useState } from "react";
import Newsitem from "./Newsitem";
import Spinner from "./Spinner";
import PropTypes from "prop-types";
import InfiniteScroll from "react-infinite-scroll-
component";
const News = (props) => {
const[articles, setArticles] = useState([])
const[loading, setLoading] = useState(true)
const[page, setPage] = useState(1)
const[totalResults, setTotalResults] = useState(0)
const capitalizeFirstLetter = (string) => {
return [Link](0).toUpperCase() +
[Link](1);
};
const updateNews = async() => {
[Link](10);
const url = `[Link]
headlines?country=${[Link]}&category=${[Link]
tegory}&apiKey=${[Link]}&page=${page}&pageSize=$
{[Link]}`;
setLoading(true)
let data = await fetch(url);
[Link](30);
let parsedData = await [Link]();
[Link](70);
setArticles([Link])
setTotalResults([Link])
setLoading(false)
const FetchMoreData = async () => {
const url = `[Link]
headlines?country=${[Link]}&category=${[Link]}&api
Key=${[Link]}&page=${page+1}&pageSize=${[Link]}`;
setPage(page+1)
let data = await fetch(url);
let parsedData = await [Link]();
setArticles([Link]([Link]))
setTotalResults([Link])
};
return (
<>
<h1 className="text-center" style={{margin:"35px 0px",
marginTop: "90px"}}>
NewsOnline - Top
{capitalizeFirstLetter([Link])} Headlines </h1>
{loading && <Spinner />}
<InfiniteScroll
dataLength={[Link]}
next={FetchMoreData}
hasMore={[Link] !== totalResults}
loader={<Spinner />}
>
<div className="container">
<div className="row">
{[Link]((element) => {
return (
<div className="col-md-4" key={[Link]}>
<Newsitem
title={[Link] ?
[Link](0, 45) : ""}
description={
[Link]
? [Link](0, 88)
: ""
}
imageUrl={[Link]}
newsUrl={[Link]}
author={[Link]}
date={[Link]}
source={[Link]}
/>
</div>
);
})}
</div>
</div>
</InfiniteScroll>
);
[Link] = {
country: "in",
pageSize: 8,
category: "general",
};
[Link] = {
country: [Link],
pageSize: [Link],
category: [Link],
};
return (
<>
<h1 className="text-center" style={{margin:"35px 0px",
marginTop: "90px"}}>
NewsOnline - Top
{capitalizeFirstLetter([Link])} Headlines </h1>
{loading && <Spinner />}
<InfiniteScroll
dataLength={[Link]}
next={FetchMoreData}
hasMore={[Link] !== totalResults}
loader={<Spinner />}
>
<div className="container">
<div className="row">
{[Link]((element) => {
return (
<div className="col-md-4" key={[Link]}>
<Newsitem
title={[Link] ?
[Link](0, 45) : ""}
import React, { useEffect, useState } from "react";
import Newsitem from "./Newsitem";
import Spinner from "./Spinner";
import PropTypes from "prop-types";
import InfiniteScroll from "react-infinite-scroll-component";
useEffect(() => {
[Link] = `${capitalizeFirstLetter([Link])} -
NewsMonkey `;
updateNews();
// eslint-disable-next-line
}, [])
return (
<>
<h1 className="text-center" style={{margin:"35px 0px",
marginTop: "90px"}}>
NewsOnline - Top
{capitalizeFirstLetter([Link])} Headlines </h1>
{loading && <Spinner />}
<InfiniteScroll
dataLength={[Link]}
next={FetchMoreData}
hasMore={[Link] !== totalResults}
loader={<Spinner />}
>
<div className="container">
<div className="row">
{[Link]((element) => {
return (
<div className="col-md-4" key={[Link]}>
<Newsitem
title={[Link] ?
[Link](0, 45) : ""}
description={
[Link]
? [Link](0, 88)
: ""
}
imageUrl={[Link]}
newsUrl={[Link]}
author={[Link]}
date={[Link]}
source={[Link]}
/>
</div>
);
})}
</div>
</div>
</InfiniteScroll>
{/* <div className="container d-flex justify-content-
between">
<button disabled={page<=1} type="button"
className="btn btn-dark" onClick={handlePrevClick}> ←
Previous</button>
<button disabled ={page + 1 >
[Link](totalResults/[Link])}type="button"
className="btn btn-dark" onClick={handleNextClick}>Next
→</button>
</div> */}
</>
);
[Link] = {
country: "in",
pageSize: 8,
category: "general",
};
[Link] = {
country: [Link],
pageSize: [Link],
category: [Link],
};
description={
[Link]
? [Link](0, 88)
: ""
}
imageUrl={[Link]}
newsUrl={[Link]}
author={[Link]}
date={[Link]}
source={[Link]}
/>
</div>
);
})}
</div>
</div>
</InfiniteScroll>
{/* <div className="container d-flex justify-content-
between">
<button disabled={page<=1} type="button"
className="btn btn-dark" onClick={handlePrevClick}> ←
Previous</button>
<button disabled ={page + 1 >
[Link](totalResults/[Link])}type="button"
className="btn btn-dark" onClick={handleNextClick}>Next
→</button>
</div> */}
</>
);
}
import React, { useEffect, useState } from "react";
import Newsitem from "./Newsitem";
import Spinner from "./Spinner";
import PropTypes from "prop-types";
import InfiniteScroll from "react-infinite-scroll-component";
useEffect(() => {
[Link] = `${capitalizeFirstLetter([Link])} -
NewsMonkey `;
updateNews();
// eslint-disable-next-line
}, [])
return (
<>
<h1 className="text-center" style={{margin:"35px 0px",
marginTop: "90px"}}>
NewsOnline - Top
{capitalizeFirstLetter([Link])} Headlines </h1>
{loading && <Spinner />}
<InfiniteScroll
dataLength={[Link]}
next={FetchMoreData}
hasMore={[Link] !== totalResults}
loader={<Spinner />}
>
<div className="container">
<div className="row">
{[Link]((element) => {
return (
<div className="col-md-4" key={[Link]}>
<Newsitem
title={[Link] ?
[Link](0, 45) : ""}
description={
[Link]
? [Link](0, 88)
: ""
}
imageUrl={[Link]}
newsUrl={[Link]}
author={[Link]}
date={[Link]}
source={[Link]}
/>
</div>
);
})}
</div>
</div>
</InfiniteScroll>
{/* <div className="container d-flex justify-content-
between">
<button disabled={page<=1} type="button"
className="btn btn-dark" onClick={handlePrevClick}> ←
Previous</button>
<button disabled ={page + 1 >
[Link](totalResults/[Link])}type="button"
className="btn btn-dark" onClick={handleNextClick}>Next
→</button>
</div> */}
</>
);
[Link] = {
country: "in",
pageSize: 8,
category: "general",
};
[Link] = {
country: [Link],
pageSize: [Link],
category: [Link],
};
[Link] = {
country: "in",
pageSize: 8,
category: "general",
};
[Link] = {
country: [Link],
pageSize: [Link],
category: [Link],
};
BUSINESS
ENTERTAINMENT
HEALTH
SCIENCE
SPORTS
TECHNOLOGY
Chapter - 5
5.1. Conclusion
In conclusion, News Online, our News website, is poised to offer a user-friendly
platform for reading news daily. The expected results and outcomes of this
project are as follows:
Expected Results/Outcomes:
Enhanced User Experience: We anticipate a streamlined and user-centric
booking process, leading to increased user satisfaction and a higher conversion
rate.
Increased User Engagement: Through a user-friendly interface and effective
communication tools, we aim to foster user engagement, encouraging reviews
and repeat bookings.
Market Competitiveness: By aligning with industry best practices and
regulations, we expect Room Rover to be competitive in the accommodation
booking market.
Scalability: The platform is designed to handle a growing user base and
accommodate an increasing number of property listings.
Valuable Data Insights: With data analysis tools in place, we anticipate
valuable insights into user behaviour and market trends, helping us make data-
driven decisions.