Jack Levy 9f4c9c7a56 feat: admin panel — new triggers, member/vote stats, health checks
Backend:
- /trigger-fetch-news, /trigger-fetch-votes, /trigger-member-trend-scores endpoints
- Stats: total_members, house_count, senate_count, members_missing_chamber,
  total_votes, stanced_bills_total, stanced_bills_with_votes
- API health: redis, smtp, pytrends tests added

Frontend:
- Fetch News, Fetch Votes, Member Trend Scores buttons in recurring tasks
- Fetch Votes shows "needed" badge when stanced bills are missing votes
- Stats table: member sync breakdown + vote/alignment coverage row
- Health panel: Redis, SMTP, pytrends rows

Authored by: Jack Levy
2026-03-15 16:50:46 -04:00
2026-03-02 00:07:20 -05:00
2026-02-28 21:08:19 -05:00
2026-02-28 21:08:19 -05:00

PocketVeto

A self-hosted platform for monitoring US Congress. Follow bills and legislators, get AI-generated policy briefs, track trending legislation, and receive alerts when bills you care about move.

Features

  • Bill tracking — search and browse all active legislation with full text and status history
  • AI policy briefs — LLM-generated summaries, key points, risks, and deadlines for each bill
  • Member profiles — legislator bios, effectiveness scores, sponsored bills, vote history, and news
  • Follows & alerts — follow bills, members, or policy topics; choose between neutral, pocket-veto, or pocket-boost mode per follow
  • Notifications — ntfy, RSS, and email (SMTP); per-channel alert filters with quiet hours
  • Collections — curate shareable lists of bills with a public share link
  • Alignment view — see how legislators vote relative to your followed bills and stances
  • Draft letter — AI-assisted letter generator to contact your representative on any bill
  • Admin panel — pipeline controls, LLM switching, user management, API health checks

Tech stack

Layer Technology
Backend FastAPI, SQLAlchemy (async), Alembic, Celery, PostgreSQL, Redis
Frontend Next.js (App Router), TypeScript, Tailwind CSS, React Query, Zustand
AI OpenAI, Anthropic, Google Gemini, or Ollama (switchable at runtime)
Infrastructure Docker Compose, Nginx

Quick start

Prerequisites: Docker Engine 24+ and Docker Compose v2 on a Linux server (2 GB RAM minimum).

API keys you'll need:

Key Where to get it Required?
DATA_GOV_API_KEY api.data.gov/signup — free, instant Yes
LLM key (OpenAI / Anthropic / Gemini) Provider dashboard Yes (or use Ollama)
NEWSAPI_KEY newsapi.org — free tier (100 req/day) Optional
git clone https://github.com/YOUR_USERNAME/pocketveto.git
cd pocketveto

cp .env.example .env
# Edit .env — set JWT_SECRET_KEY, ENCRYPTION_SECRET_KEY, DATA_GOV_API_KEY, and your LLM key at minimum

docker compose up --build -d

Open http://YOUR_SERVER_IP in a browser. The first registered account becomes admin.

After registering, go to Settings and click Trigger Poll to load the initial bill data, then Sync Members to load legislator profiles.

For detailed instructions — including SSL setup, email configuration, and updating — see DEPLOYING.md and UPDATING.md.

License

GNU General Public License v3.0

Description
Self-hosted US Congress monitoring with AI bill analysis, personalized tracking, and multi-channel notifications.
Readme GPL-3.0 809 KiB
Languages
Python 53.6%
TypeScript 45.8%
CSS 0.2%
Dockerfile 0.2%