Skip to content

About

Global_News_Cybersecurity news

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒ Global Newswire v6 โ€” India Priority Edition

A fully AI-powered newspaper web app that fetches live RSS news, expands articles to 500+ words, translates into 30+ languages, and displays them in a beautiful newspaper layout.

Built with pure Node.js โ€” zero external dependencies, runs anywhere.


โœจ Features

  • ๐Ÿ‡ฎ๐Ÿ‡ณ India-first โ€” dedicated tabs for India, India Business, India Sports, West Bengal
  • ๐Ÿ” Cyber Security tab โ€” live feeds from Reddit r/netsec, Bleeping Computer, Krebs, CISA and more
  • ๐ŸŒ World tabs โ€” Bangladesh, Pakistan, China, Middle East, USA, World News
  • ๐Ÿค– Multi-AI support โ€” Groq (free), OpenAI, Anthropic Claude, Google Gemini
  • ๐Ÿ“ฐ 500+ word articles โ€” AI expands every RSS item into a full independent article
  • ๐ŸŒ 30+ language translation โ€” translate any section with one click
  • ๐Ÿ“ก Breaking news ticker โ€” auto-generated from high-urgency stories
  • ๐Ÿ–ผ๏ธ Relevant images โ€” headline-specific photos from Wikimedia Commons
  • ๐Ÿ›ก๏ธ AI WAF agent โ€” security layer for API routes
  • โšก Auto-refresh โ€” fetches fresh news every 30 minutes

๐Ÿš€ Quick Start (Local)

1. Requirements

  • Node.js v18 or higher (LTS recommended)
  • A free AI API key (see below)

2. Clone & Run

git clone https://github.com/subhankarbhndr211/Global_News.git
cd Global_News
node server.js

Open your browser at: http://localhost:3001

3. Get a Free API Key

The app works best with an AI key for 500-word article expansion and translation. Groq is recommended โ€” it's completely free.

Provider Free? Get Key At Key Format
Groq โญ โœ… Free console.groq.com gsk_...
Google Gemini โœ… Free aistudio.google.com AIza...
OpenAI โŒ Paid platform.openai.com sk-...
Anthropic Claude โŒ Paid console.anthropic.com sk-ant-...

4. Enter Your API Key

Once the app is running, paste your key in the banner at the top of the page and click Save Key.

The app auto-detects which provider your key belongs to. Your key is never saved to disk โ€” it stays in memory only.


๐ŸŒ Hosting on Render (Free)

Step 1 โ€” Push to GitHub

git add .
git commit -m "deploy"
git push

Step 2 โ€” Deploy on Render

  1. Go to render.com โ†’ Sign up free
  2. New + โ†’ Web Service
  3. Connect your GitHub repo Global_News
  4. Fill in settings:
Setting Value
Runtime Node
Build Command npm install
Start Command node server.js
Instance Type Free

Step 3 โ€” Add Your API Key as Environment Variable

In Render dashboard โ†’ your service โ†’ Environment โ†’ Add Environment Variable:

Variable Name Your Value
GROQ_API_KEY gsk_your_key_here

Or use whichever provider you prefer:

GROQ_API_KEY      = gsk_...        โ† Groq (recommended, free)
OPENAI_API_KEY    = sk-...         โ† OpenAI
ANTHROPIC_KEY     = sk-ant-...     โ† Claude
GEMINI_API_KEY    = AIza...        โ† Gemini

โš ๏ธ Never paste your API key into code or commit it to GitHub.
Always use environment variables on hosting platforms.

Step 4 โ€” Keep it Awake (Optional)

Free Render tier sleeps after 15 minutes of inactivity. To prevent this:

  1. Sign up at uptimerobot.com (free)
  2. Add HTTP monitor โ†’ paste your Render URL
  3. Set interval: every 14 minutes

๐Ÿ—๏ธ Architecture

Global_News/
โ”œโ”€โ”€ server.js        โ† HTTP server + all routes + full HTML UI
โ”œโ”€โ”€ rss.js           โ† Live RSS fetcher (50+ feeds, pure Node.js)
โ”œโ”€โ”€ enhancer.js      โ† AI article expander (500+ words) + translator
โ”œโ”€โ”€ images.js        โ† Headline-specific image resolver (Wikimedia + Unsplash)
โ”œโ”€โ”€ ai.js            โ† Universal AI provider (Groq / Claude / OpenAI / Gemini)
โ”œโ”€โ”€ api/
โ”‚   โ””โ”€โ”€ middleware/
โ”‚       โ””โ”€โ”€ waf.js   โ† AI Web Application Firewall agent
โ”œโ”€โ”€ .gitignore       โ† Keeps secrets and node_modules out of git
โ””โ”€โ”€ README.md

How It Works

User clicks โšก Fetch News
        โ”‚
        โ–ผ
   rss.js โ€” fetches 50+ live RSS feeds across all tabs
        โ”‚
        โ–ผ
   enhancer.js โ€” AI expands each item to 500+ word article
        โ”‚         (skips expansion if no API key โ€” shows raw RSS)
        โ–ผ
   images.js โ€” finds relevant photo from headline keywords
        โ”‚       (Wikimedia Commons โ†’ Unsplash fallback)
        โ–ผ
   server.js โ€” stores articles, broadcasts via SSE
        โ”‚
        โ–ผ
   Browser โ€” renders newspaper layout, breaking ticker, tabs

News Tabs

Tab Row Sources
๐Ÿ‡ฎ๐Ÿ‡ณ India 1 NDTV, Times of India, The Hindu, Indian Express, Hindustan Times, Zee News
๐Ÿ“ˆ India Business 1 Economic Times, LiveMint, Business Standard, Moneycontrol
๐Ÿ India Sports 1 NDTV Sports, ESPNcricinfo, Cricbuzz, Sportskeeda
๐Ÿฏ West Bengal 1 Telegraph India, Anandabazar, Sangbad Pratidin, Ei Samay, Aajkaal
๐Ÿ” Cyber Security 1 Hacker News, Bleeping Computer, Krebs, SANS, CISA, Reddit r/netsec r/cybersecurity
๐Ÿ’ป Technology 1 BBC Tech, Ars Technica, Wired, TechCrunch
๐Ÿ”ฌ Science & Health 1 BBC Science, Reuters Science, New Scientist, Nature
๐ŸŽฌ Entertainment 1 BBC Entertainment, Variety, Deadline
๐ŸŒ World News 2 BBC, CNN, Reuters, Al Jazeera, NYT
๐Ÿ‡ง๐Ÿ‡ฉ Bangladesh 2 Daily Star, Prothom Alo, Dhaka Tribune, bdnews24
๐Ÿ‡ต๐Ÿ‡ฐ Pakistan 2 Dawn, The News, Express Tribune, Geo TV
๐Ÿ‡จ๐Ÿ‡ณ China 2 China Daily, SCMP, BBC Asia, Reuters CN
๐Ÿ’ผ Business 2 BBC Business, Reuters Business, MarketWatch
โšฝ Sports 2 BBC Sport, ESPN, Guardian Sport
๐Ÿ‡บ๐Ÿ‡ธ United States 2 NYT, CNN, Washington Post, NPR
๐Ÿ•Œ Middle East 2 Al Jazeera, BBC Middle East, Reuters

AI Providers

ai.js detects provider from key format:
  gsk_...    โ†’ Groq      (llama-3.3-70b โ€” fast, free)
  AIza...    โ†’ Gemini    (gemini-2.0-flash โ€” free)
  sk-ant-... โ†’ Claude    (claude-haiku โ€” paid)
  sk-...     โ†’ OpenAI    (gpt-4o-mini โ€” paid)

API Routes

Route Method Description
GET / GET Full newspaper UI
GET /api/health GET Server status + article count
POST /api/set-ai POST Save provider + model preference
POST /api/test-ai POST Test if current API key works
GET /api/generate GET (SSE) Fetch + process all news (streaming)
GET /api/store GET Get all cached articles
POST /api/translate POST Translate an article to target language
GET /api/waf-stats GET WAF security dashboard

๐Ÿ”‘ API Key Security

  • Keys entered via browser UI are held in memory only โ€” never written to disk
  • Keys set via environment variables are read at startup โ€” never logged or stored
  • .gnw_config.json saves only provider/model preference โ€” never the key
  • .gitignore blocks all secret files from being committed

๐Ÿ› ๏ธ Local Development Tips

Run on a different port:

PORT=8080 node server.js        # Linux/Mac
$env:PORT=8080; node server.js  # Windows PowerShell

Without an AI key: The app still works โ€” it shows real RSS articles in their original form (short summaries). AI expansion, translation, and breaking news generation are skipped.

Change default AI model: Go to โš™ AI Settings in the top-right of the UI โ†’ select your preferred model.


๐Ÿ“„ License

MIT โ€” free to use, modify, and deploy.

About

Global_News_Cybersecurity news

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages