How gungunrathore2525-lang/news-aggregator works
This is a browser-based news aggregator. A user opens the frontend, which automatically requests top headlines; users can also choose a suggested topic or enter a keyword. The FastAPI backend queries NewsAPI and returns JSON, and the frontend renders article cards or displays an error. The README also documents responsive desktop/mobile presentation and environment-based API-key configuration. Source excerpts show the frontend requests and backend API calls; the README supports the user-facing capabilities and workflow, but does not expose the HTML-to-script wiring.
Main entry points: script.js Search and fetch · main.py FastAPI routes · index.html News page · style.css Responsive styles
Components 8
Frontend
- News page
frontend/index.html - Search and fetch
frontend/script.js - Article cards
frontend/script.js - Responsive styles
frontend/style.css
Backend
- FastAPI routes
backend/main.py
Other components
- Reader
- NewsAPI
- API key environment
Connections 8
- Reader → News page: opens
README.md - Reader → Search and fetch: searches topics
README.md - Search and fetch → FastAPI routes: requests headlines
frontend/script.js - Search and fetch → FastAPI routes: requests search
frontend/script.js - FastAPI routes → NewsAPI: fetches articles
backend/main.py - API key environment → FastAPI routes: configures access
backend/main.py - Search and fetch → Article cards: renders results
frontend/script.js - News page → Responsive styles: uses responsive presentation
README.md