feat(interest): add public interest tracking for members of Congress

Adds Google Trends, NewsAPI, and Google News RSS scoring for members,
mirroring the existing bill interest pipeline. Member profiles now show
a Public Interest chart (with signal breakdown) and a Related News panel.

Key changes:
- New member_trend_scores + member_news_articles tables (migration 0008)
- fetch_gnews_articles() added to news_service for unlimited RSS article storage
- Bill news fetcher now combines NewsAPI + Google News RSS (more coverage)
- New member_interest Celery worker with scheduled news + trend tasks
- GET /members/{id}/trend and /news API endpoints
- TrendChart redesigned with signal breakdown badges and bar+line combo chart
- NewsPanel accepts generic article shape (bills and members)

Co-Authored-By: Jack Levy
This commit is contained in:
Jack Levy
2026-03-01 00:36:30 -05:00
parent e21eb21acf
commit a66b5b4bcb
17 changed files with 569 additions and 29 deletions

View File

@@ -1,9 +1,16 @@
import { ExternalLink, Newspaper } from "lucide-react";
import { NewsArticle } from "@/lib/types";
import { formatDate } from "@/lib/utils";
interface ArticleLike {
id: number;
source?: string;
headline?: string;
url?: string;
published_at?: string;
}
interface NewsPanelProps {
articles?: NewsArticle[];
articles?: ArticleLike[];
}
export function NewsPanel({ articles }: NewsPanelProps) {