This is the frontend for the News Aggregator project — a clean and responsive UI for browsing Pakistani news using categories and search.
Live Frontend URL: https://abds059.github.io/News-Aggregator-Frontend
- Browse top news headlines
- Filter by categories (e.g., world, politics, business, etc.)
- Search for specific keywords
- Clean, mobile-responsive design
- Powered by a secure backend
News-Aggregator-Frontend/
│
├── index.html # Main HTML page
├── style.css # Styling with CSS variables and responsiveness
├── script.js # Handles API calls and dynamic rendering
└── README.md
- On page load, shows top headlines from Pakistan
- User can select a category or type a keyword
- Makes a request to the backend
/api/newsroute with query params - Backend handles API key + GNews API request and returns filtered news
- Articles are rendered as responsive cards
Clone the repository:
git clone https://github.com/abds059/News-Aggregator-Frontend.gitThen open index.html in your browser.
Note: To fully function, it must be connected to the deployed backend.
The site is hosted on GitHub Pages:
- Push the repo to GitHub
- Go to Repository > Settings > Pages
- Select branch:
main, folder:/root - Done! Your site is live
- A connected backend (like Vercel) to serve the API
- API key should never be exposed in the frontend
GET https://news-aggregator-backend-one.vercel.app/api/news?q=pakistan&topic=business
- HTML5 + CSS3
- JavaScript (DOM + Fetch API)
- GitHub Pages for hosting
This frontend is open-source and intended for learning purposes.