Skip to content

NewsHub is a responsive React-based news aggregator that fetches real-time headlines by category using the News API. It includes pagination, routing, and a clean UI to deliver global news in a seamless browsing experience.

Notifications You must be signed in to change notification settings

Moez-lab/Newsweb-classbase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# 📰 Newsweb - A Dynamic News Aggregator App

NewsHub is a responsive web application that delivers real-time news updates from multiple categories using the [News API](https://newsapi.org/). Built with React and React Router, the app provides a smooth and dynamic user experience with features like pagination and category-based browsing.

## 🚀 Features

- 🗂️ Browse top headlines by categories (Science, Business, Health, Technology, etc.)
- 🔄 Pagination for navigating between pages
- 📱 Mobile-responsive UI
- ⏱️ Real-time data fetched from News API
- ✨ Smooth routing between categories using React Router

## 🔧 Tech Stack

- **React**
- **React Router**
- **JavaScript (ES6+)**
- **CSS (Responsive Design)**
- **News API**
- **Bootstrap (Optional styling)**


## 📁 Folder Structure

NewsHub/ ├── public/ ├── src/ │ ├── components/ │ │ ├── Navbar2.js │ │ ├── News.js │ │ ├── NewsItem.js │ │ └── Spinner.js │ ├── App.js │ └── App.css ├── package.json └── README.md


## 🛠️ Getting Started

### Prerequisites

- Node.js and npm installed
- A [NewsAPI.org](https://newsapi.org/) API key

### Installation

1. Clone the repository:
```bash
git clone git@github.com:Mueez-lab/newsweb-classbass.git
cd NewsHub
  1. Install dependencies:
npm install
  1. Add your News API key: Edit the URL in News.js and replace the existing API key:
const url = `https://newsapi.org/v2/top-headlines?...&apiKey=YOUR_API_KEY`;
  1. Start the development server:
npm start

📌 Important Notes

  • The free News API has request limits, so use responsibly.
  • You can customize the number of articles per page using the pageSize parameter in the API URL.

🙌 Contributing

Pull requests are welcome! If you find a bug or have an idea for an improvement, feel free to open an issue.

📃 License

This project is open-source and free to use under the MIT License.


About

NewsHub is a responsive React-based news aggregator that fetches real-time headlines by category using the News API. It includes pagination, routing, and a clean UI to deliver global news in a seamless browsing experience.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published