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.
- ๐ฎ๐ณ 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
- Node.js v18 or higher (LTS recommended)
- A free AI API key (see below)
git clone https://github.com/subhankarbhndr211/Global_News.git
cd Global_News
node server.jsOpen your browser at: http://localhost:3001
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-... |
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.
git add .
git commit -m "deploy"
git push- Go to render.com โ Sign up free
- New + โ Web Service
- Connect your GitHub repo
Global_News - Fill in settings:
| Setting | Value |
|---|---|
| Runtime | Node |
| Build Command | npm install |
| Start Command | node server.js |
| Instance Type | Free |
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.
Free Render tier sleeps after 15 minutes of inactivity. To prevent this:
- Sign up at uptimerobot.com (free)
- Add HTTP monitor โ paste your Render URL
- Set interval: every 14 minutes
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
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
| 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.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)
| 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 |
- 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.jsonsaves only provider/model preference โ never the key.gitignoreblocks all secret files from being committed
Run on a different port:
PORT=8080 node server.js # Linux/Mac
$env:PORT=8080; node server.js # Windows PowerShellWithout 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.
MIT โ free to use, modify, and deploy.