Skip to content

3eeKeeper/3eekeeper-news-aggregator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

3eeKeeper News Aggregator

Docker Node.js Express License

A modern, browser-based news aggregator that pulls the latest news from major news providers without requiring any API keys. Built with Node.js, Express, and Docker for easy deployment. The application uses RSS feeds from trusted news sources to deliver real-time news updates.

Features

  • πŸ“° Multiple News Sources: Aggregates news from BBC, CNN, The Guardian, Reuters, NPR, Al Jazeera, TechCrunch, and Hacker News
  • πŸ” Filter by Source: View news from specific providers
  • πŸ“‚ Category Filtering: Filter by categories like Top Stories, World, Technology, and Business
  • πŸ”„ Auto-Refresh: Automatically updates every 5 minutes
  • πŸ“± Responsive Design: Works seamlessly on desktop, tablet, and mobile devices
  • πŸš€ No API Keys Required: Uses public RSS feeds for data
  • 🎯 Direct Links: Click any article to read the full story on the original source

News Sources

The application aggregates news from:

  • BBC News - UK & World news
  • CNN - International news coverage
  • The Guardian - In-depth journalism
  • Reuters - Global news agency
  • NPR - US public radio news
  • Al Jazeera - Middle East & international news
  • TechCrunch - Technology news
  • Hacker News - Tech community news

Installation

Option 1: Docker (Recommended)

  1. Using Docker Compose (easiest):

    docker-compose up -d
  2. Using Docker directly:

    # Build the image
    docker build -t 3eekeeper-news-aggregator .
    
    # Run the container
    docker run -d -p 3000:3000 --name news-aggregator 3eekeeper-news-aggregator
  3. Access the application: Open your browser and navigate to http://localhost:3000

  4. Stop the container:

    # With Docker Compose
    docker-compose down
    
    # With Docker
    docker stop news-aggregator

Option 2: Local Installation

  1. Clone or navigate to the project directory:

    cd news_app
  2. Install dependencies:

    npm install
  3. Start the server:

    npm start
  4. Open your browser and navigate to:

    http://localhost:3000
    

Usage

  1. Use the application:
    • Select a news source from the dropdown or view all sources
    • Filter by category (Top Stories, World, Technology, etc.)
    • Click on any article card to read the full story on the original website
    • Click the refresh button to manually update the news
    • The app auto-refreshes every 5 minutes

Docker

Building and Running

Using Docker Compose (Recommended):

# Start the application
docker-compose up -d

# View logs
docker-compose logs -f

# Stop the application
docker-compose down

# Rebuild after code changes
docker-compose up -d --build

Using Docker CLI:

# Build the image
docker build -t 3eekeeper-news-aggregator .

# Run the container
docker run -d \
  -p 3000:3000 \
  --name news-aggregator \
  --restart unless-stopped \
  3eekeeper-news-aggregator

# View logs
docker logs -f news-aggregator

# Stop and remove container
docker stop news-aggregator
docker rm news-aggregator

Docker Features

  • βœ… Small image size - Uses Alpine Linux base (~150MB)
  • βœ… Health checks - Automatic container health monitoring
  • βœ… Auto-restart - Container restarts automatically on failure
  • βœ… Production-ready - Optimized for production deployments
  • βœ… Easy deployment - Single command deployment

Development

To run in development mode with auto-restart on file changes:

npm run dev

Project Structure

news_app/
β”œβ”€β”€ server.js           # Express server with RSS parsing
β”œβ”€β”€ package.json        # Project dependencies
β”œβ”€β”€ README.md          # This file
└── public/            # Frontend files
    β”œβ”€β”€ index.html     # Main HTML page
    β”œβ”€β”€ styles.css     # Styling
    └── script.js      # Frontend JavaScript

Technical Details

Backend

  • Express.js: Web server framework
  • rss-parser: Parses RSS feeds from news sources
  • CORS: Handles cross-origin requests
  • Node.js: Runtime environment

Frontend

  • Vanilla JavaScript: No framework dependencies
  • Responsive CSS: Mobile-first design
  • Async/Await: Modern JavaScript for API calls

How It Works

  1. The Express server fetches RSS feeds from various news sources
  2. The RSS parser converts XML feeds to JSON
  3. Articles are sorted by publication date
  4. The frontend displays articles in a responsive grid
  5. Clicking an article opens the original source in a new tab

Customization

Adding New News Sources

Edit server.js and add to the newsSources object:

'source-id': {
  name: 'Source Name',
  feeds: [
    { category: 'Category Name', url: 'https://example.com/feed.rss' }
  ]
}

Changing Port

Set the PORT environment variable or edit server.js:

const PORT = process.env.PORT || 3000;

Adjusting Refresh Interval

Edit script.js (last line):

// Current: 5 minutes (5 * 60 * 1000 ms)
setInterval(() => {
  loadNews();
}, 5 * 60 * 1000);

Browser Compatibility

  • Chrome (recommended)
  • Firefox
  • Safari
  • Edge
  • Opera

License

MIT License - Feel free to use and modify for your projects.

Notes

  • RSS feeds are public and don't require authentication
  • Some feeds may be temporarily unavailable
  • Image availability depends on the RSS feed
  • Respects rate limits by caching on the server side
  • All articles link directly to their original sources

About

A browser-based news aggregator pulling from 11 major news sources via RSS feeds. No API keys required. Dockerized for easy deployment.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors