Daily News Word is a modern, responsive news aggregation platform that fetches, processes, and displays news articles from multiple global RSS sources. It provides real-time news with filters, pagination, caching, and automated fetching. Users can browse news by country and category, toggle between light/dark theme, and read full articles from original sources.
- Global News Aggregation: Collects news from trusted sources including BBC, NYT, The Guardian, The Hindu, Times of India, DW, Al Jazeera, and more.
- Category & Country Filters: Filter articles by country and category (Politics, Business, Technology, Sports, Science, Health, Entertainment, etc.).
- Responsive Frontend: Mobile-friendly interface built with Tailwind CSS with support for light/dark themes.
- Pagination: Browse articles page by page using desktop and mobile navigation controls.
- Caching: Frontend sessionStorage cache reduces API calls and improves performance. Backend Redis caching ensures rate limiting and faster responses.
- Automated Fetching & Cron Jobs:
- Daily reset at 2 AM to refresh all news.
- Incremental fetch every 3 hours for new articles.
- Safe retry mechanisms with concurrency limits.
- PostgreSQL Database: Stores news with indexes for efficient queries by country, category, and publication date.
- Summarization (Future Feature): Extracts article crux from long articles.
- Rate Limiting: Distributed rate limiting using Redis to prevent API overuse.
- RSS Parsers & Modular Design: Each news source has a dedicated parser that normalizes articles into a consistent format (title, crux, image_url, source, source_country, url, published_at). Parsers are modular, so adding new feeds is as simple as creating a parser file following the existing structure.
- Example & Extensibility: For instance, the
NYTparser uses rss-parser to mapmedia:contenttoimage_urlandcontentEncodedtocrux. The system supports multiple global sources, and new feeds can be integrated seamlessly by adding corresponding parsers.
- Frontend: HTML, Tailwind CSS, JavaScript
- Backend: Node.js, Express.js
- Database: PostgreSQL
- Caching: Redis, sessionStorage
- RSS Parsing:
rss-parser - Scheduling:
node-cron - Environment Management:
dotenv
Daily-News-Word/
│
├── public/
│ ├── index.html # Frontend HTML template
│ └── scripts.js # Frontend logic (rendering, pagination, caching, theme)
│
├── parsers/ # RSS feed parsers
│ ├── nyt.js # Parser for The New York Times
│ └── bbc.js # Parser for BBC News
│
├── cronJobs.js # Scheduled jobs (daily reset + incremental fetching)
├── newsFetcher.js # Fetches and stores articles into PostgreSQL
├── summarizer.js # (Future) Article summarization
├── server.js # Express server and API routes
├── redisClient.js # Redis client connection helper
│
├── SQLSchema.sql # Database schema for the news table
├── resetSQL.sql # Script to reset the database table
├── redisSetup.sh # Helper script for Redis Docker setup and management
│
├── screenshots/ # Screenshots for README or documentation
│ ├── lightMode.png
│ └── darkMode.png
│
├── .env # Environment variables (not committed to Git)
├── .gitignore # Git ignore rules for sensitive and generated files
├── LICENSE # MIT License for the project
├── package.json # Node.js dependencies and scripts
└── README.md # Project documentation
git clone https://github.com/HattoriMan/DailyNewsWord.git
cd Daily-News-Wordnpm install
Create a .env file in the project root:
DB_USER=your_db_user
DB_HOST=localhost
DB_NAME=your_db_name
DB_PASSWORD=your_db_password
DB_PORT=5432
PORT=3000
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=your_redis_container_password
psql -U your_db_user -d your_db_name -f SQLSchema.sql
NOTE: Ensure Docker is installed and running before executing the command.
docker run -d \
--name dnw-redis \
-p 127.0.0.1:6379:6379 \
-v redis-data:/data \
redis:latest \
redis-server \
--requirepass your_redis_container_password \
--appendonly yes \
--maxmemory 256mb \
--maxmemory-policy allkeys-lru
Check out redisSetup.sh to find relevant commands to run Redis, check status, stop container and remove it.
node server.js
node cronJobs.js
Visit http://localhost:3000 in your browser.
psql -U your_db_user -d your_db_name -f resetDB.sql
-
Select a Country and Category to filter news.
-
Click Fetch News to retrieve articles.
-
Use Next / Previous buttons to navigate pages.
-
Toggle Light/Dark Mode using the top-right button.
-
Click Read Full Story to open the original article.
-
Article Summarization: Summarize long articles automatically using summarizer.js.
-
Deployment & Production Setup: Prepare the platform for production deployment with proper environment configuration, process management, and server setup.
Thanks to all RSS news agencies that make this project possible:
BBC, NYT, The Guardian, The Hindu, Times of India, Deutsche Welle, Al Jazeera, France 24, ABC, CBC, Indian Express, LiveMint, and many more.
This project is licensed under the MIT License.

