How pratyushwinorlearn/news-telegram-bot works
OSINT Desk is an India-focused news board with two user-facing routes to headlines: a browser dashboard and Telegram. The dashboard selects a category, fetches paginated results through the backend, and renders articles; the backend holds the NewsData.io key and caches upstream pages. Telegram users can request category headlines interactively, while a scheduled or manually triggered digest fetches categories and sends formatted messages to a configured group. The README documents these capabilities; omitted portions of server/index.js limit certainty about some handler wiring.
Main entry points: index.js Category fetch · telegram.js Digest builder · main.js Dashboard UI
Components 17
News dashboard
- Dashboard UI
client/src/main.js - News API client
client/src/main.js
News backend
- HTTP API
server/index.js - Category fetch
server/index.js - Page cache
server/index.js - Chat pagination
server/index.js
Telegram delivery
- Bot webhook
server/index.js - Genre menu
server/index.js - Category headlines
server/index.js - Manual digest route
server/index.js - Digest scheduler
server/index.js - Digest builder
server/telegram.js
Other components
- Desk user
- NewsData.io
- Telegram user
- Telegram Bot API
- Configured digest group
Connections 21
- Desk user → Dashboard UI: uses
- Dashboard UI → News API client: requests pages
- News API client → HTTP API: calls API
- HTTP API → Category fetch: requests category
- Category fetch → Page cache: reads and writes
- Category fetch → NewsData.io: fetches articles
- Category fetch → HTTP API: returns results
- Telegram user → Telegram Bot API: messages bot
- Telegram Bot API → Bot webhook: posts updates
- Bot webhook → Genre menu: dispatches greeting
- Genre menu → Telegram Bot API: sends menu
- Bot webhook → Category headlines: dispatches selection
- Category headlines → Chat pagination: reads and updates
- Category headlines → Category fetch: fetches pages
- Category headlines → Telegram Bot API: sends headlines
- HTTP API → Manual digest route: handles send-now
- Manual digest route → Digest builder: invokes digest
- Digest scheduler → Digest builder: runs on schedule
- Digest builder → Category fetch: fetches categories
- Digest builder → Telegram Bot API: sends digest
- Telegram Bot API → Configured digest group: delivers messages