NewsNow

Self-hostable news aggregator with an elegant column layout, GitHub OAuth, adaptive scraping intervals, and seamless Cloudflare D1 or SQLite persistence.

20.9Kstars
5.8Kforks
MIT License
TypeScript

NewsNow is an open-source, real-time news aggregator built for developers and tech enthusiasts who want a distraction-free reading experience without third-party ads or paywalls. It aggregates trending and breaking news from dozens of sources — including Chinese tech platforms, financial data feeds, social media hot lists, and international outlets — and displays them in a clean, draggable multi-column layout.

The application is designed for flexible deployment: a basic fork-and-import workflow works on Cloudflare Pages or Vercel without any configuration, while full-featured deployments with login and caching require GitHub OAuth credentials and a supported database. Docker Compose deployment covers the self-hosted path for teams wanting full control over their data and infrastructure.

NewsNow uses an adaptive scraping system that respects each source’s natural update cadence — real-time feeds refresh every 2 minutes while slower editorial sources cache for up to 60 minutes. Logged-in users can bypass the 30-minute default cache with a manual force-refresh, and position changes in ranked lists are visually highlighted through a built-in diff system that tracks item movement between refreshes.

The project also ships a companion MCP server (newsnow-mcp-server) that exposes its aggregated news data via the Model Context Protocol, making it possible to pull live news into AI agent workflows and LLM-powered applications with a single JSON configuration block.

What You Get

  • Multi-column news dashboard - Draggable source cards arranged in themed columns (Hottest, Realtime, Finance, Tech, China, World) with animated transitions and lazy-loading for cards out of viewport.
  • Adaptive scraping with per-source intervals - Each news source is assigned a refresh tier (Realtime: 2m, Fast: 5m, Default: 10m, Common: 30m, Slow: 60m) based on actual update frequency, reducing unnecessary requests while keeping feeds current.
  • GitHub OAuth login with JWT sync - Users authenticate via GitHub to persist column preferences and reading state across devices; JWT tokens bypass cookie restrictions in Cloudflare edge environments via URL parameter handoff.
  • Force-refresh cache bypass for logged-in users - The default 30-minute server cache keeps load fast for anonymous users; authenticated users can trigger a live re-fetch of any source at any time.
  • Ranked-list diff highlighting - When a hottest-type feed refreshes, the system compares item positions between the old and new responses and stores movement metadata so the UI can visually flag items that climbed or dropped in rank.
  • MCP server companion package - newsnow-mcp-server exposes aggregated live news via the Model Context Protocol, allowing AI agents and LLM tools to query current trending stories with a simple JSON config pointing at any NewsNow instance.
  • Cloudflare D1 and SQLite dual backend - The db0 abstraction layer makes the same cache and user data logic work identically against Cloudflare D1 on the edge or a local SQLite file in Docker/Node.js deployments.

Common Use Cases

  • Personal Chinese tech news feed - A developer deploys NewsNow on Cloudflare Pages, logs in with GitHub, and rearranges columns to surface Zhihu, ITHome, and V2EX while hiding finance feeds — then reads it as a distraction-free daily briefing.
  • Team news dashboard on a private server - An engineering team runs NewsNow via Docker Compose on an internal server, configuring GitHub OAuth with their organization’s credentials so team members can each maintain their own column preferences.
  • AI agent news source via MCP - A developer building an LLM-powered assistant adds the newsnow-mcp-server to their Claude or Cursor MCP config, pointing it at a self-hosted NewsNow instance to give the agent access to live trending news.
  • Custom source aggregation - A fintech developer forks the repo, follows the CONTRIBUTING guide to add proprietary financial data feed sources in server/sources/, and redeploys to Vercel for a team-specific financial news aggregator.
  • Low-traffic news scraping proxy - A researcher uses NewsNow as a caching proxy for scraped news data, relying on the 30-minute default TTL and adaptive intervals to keep request volume low while maintaining a continuously updated local dataset.

Under The Hood

Architecture NewsNow follows a clean full-stack monolith structure with well-defined boundaries between client and server. The frontend employs hierarchical routing via TanStack Router with QueryClient injected through route context, enabling clean dependency injection without a global singleton. Jotai atomic state manages UI preferences with persistent storage, while TanStack Query handles all server-state fetching with cache-first strategies. On the server side, H3 provides lightweight HTTP routing via vite-plugin-with-nitro, and a glob-driven source registration system automatically discovers and wires all data fetcher modules without manual imports. Database interactions are encapsulated in dedicated Cache and User classes that abstract both SQLite and Cloudflare D1 behind the unified db0 interface, enabling genuinely seamless environment switching. The primary weakness is a lack of centralized error boundaries and formal service layers, which may create friction as the source count grows.

Tech Stack NewsNow is built on full-stack TypeScript with React 19 and Vite 7 on the frontend, paired with an H3 HTTP server running through Nitro on the backend. TanStack Router provides type-safe file-based routing with auto-generated route trees, while UnoCSS handles utility-first atomic styling. Data fetching across dozens of sources uses ofetch combined with Cheerio for HTML scraping, fast-xml-parser for RSS/Atom feeds, and iconv-lite for CJK charset decoding. GitHub OAuth authentication is implemented with jose for JWT signing, designed to work around cookie limitations in Cloudflare edge environments via URL parameter token delivery. The db0 abstraction layer unifies SQLite via better-sqlite3 (local/Docker) and Cloudflare D1 (edge) without any application-layer code changes. PWA support is provided through Workbox and vite-plugin-pwa, with build outputs targeting both Cloudflare Pages and standalone Node.js depending on environment flags.

Code Quality Type safety is applied consistently through well-defined shared interfaces (SourceID, NewsItem, SourceResponse, ColumnID) that flow end-to-end from server getters to React components. Component architecture is modular and composable — CardWrapper, NewsCard, and drag-and-drop logic are cleanly separated with forwardRef used correctly for imperative ref access. Auto-imports via unimport reduce boilerplate throughout but can obscure dependency origins in unfamiliar code. Error handling is limited in depth: server cache failures are caught but logged generically, and client-side fetch failures delegate entirely to React Query’s isError state without recovery UI. Testing coverage is minimal — only two test files exist, one a placeholder stub, while the other provides extensive multilingual date parsing coverage with MockDate across Chinese, traditional Chinese, Japanese, and English relative date formats. ESLint with git hooks enforces baseline quality at commit time.

What Makes It Unique NewsNow’s most distinctive technical contribution is the glob-driven source auto-registration system, implemented via a custom Vite plugin that resolves import * as x from "glob:./sources/{*.ts,**/index.ts}" at build time — a pattern that makes adding a new data source entirely declarative with no wiring code required. The ranked-list diff engine that highlights item position changes between refreshes is a subtle but valuable UX feature rarely seen in open news aggregators. The JWT authentication flow is specifically engineered for Cloudflare’s edge environment, using URL parameters to pass tokens where cookies are unavailable. The companion MCP server package extends the project beyond a news reader into a live data provider for AI agent pipelines, positioning it at an intersection few open-source news tools occupy.

Self-Hosting

NewsNow is released under the MIT License, which is one of the most permissive open-source licenses available. You are free to use, modify, distribute, and commercialize the software without restriction, provided you retain the copyright notice. There are no copyleft requirements, so incorporating NewsNow into a proprietary internal tool or commercial product does not require you to open-source your modifications. The only practical constraint is attribution in source distributions.

Running NewsNow yourself is genuinely lightweight for a basic deployment — a simple Cloudflare Pages or Vercel fork requires no infrastructure management at all. Production deployments that enable login and caching require either a Cloudflare D1 database (configured via wrangler.toml) or a local SQLite file, plus a GitHub OAuth application for authentication. Docker Compose deployment covers the full self-hosted path and bundles everything needed to run on any VPS or on-premise server. You are responsible for keeping the application updated with new releases, monitoring scraping source health when upstream sites change their structure, and managing your own database backups — the project provides no managed infrastructure.

There is no commercial cloud offering, paid tier, or SaaS version of NewsNow — the project is entirely community-driven with no vendor behind it. This means you get the full feature set without a pricing wall, but you also have no support SLA, no managed uptime guarantee, and no automatic updates. The active release cadence (40 releases over roughly 20 months) and responsive maintainer suggest a healthy project, but scraper-based tools are inherently fragile: upstream websites regularly change their HTML structure, which can silently break individual news sources until a fix is merged and deployed.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack

No spam. Unsubscribe anytime.

Join 750+ subscribers
No spam. Unsubscribe anytime.

Search