ZIP lookup (GET /api/members/by-zip/{zip}):
- Two-step geocoding: Nominatim (ZIP → lat/lng) then Census TIGERweb
Legislative identify (lat/lng → congressional district via GEOID)
- Handles at-large states (AK, DE, MT, ND, SD, VT, WY)
- Added rep_lookup health check to admin External API Health panel
congress_api.py fixes:
- parse_member_from_api: normalize state full name → 2-letter code
(Congress.gov returns "Florida", DB expects "FL")
- parse_member_from_api: read district from top-level data field,
not current_term (district is not inside the term object)
Celery beat: schedule sync_members daily at 1 AM UTC so chamber,
district, and contact info stay current without manual triggering
Members page redesign: photo avatars, party/state/chamber chips,
phone + website links, ZIP lookup form to find your reps
Draft letter improvements: pass rep_name from ZIP lookup so letter
opens with "Dear Representative Franklin," instead of generic salutation;
add has_document filter to bills list endpoint
UX additions: HelpTip component, How It Works page, "How it works"
sidebar nav link, collections page description copy
Authored-By: Jack Levy
62 lines
3.4 KiB
Plaintext
62 lines
3.4 KiB
Plaintext
# ─── URLs ─────────────────────────────────────────────────────────────────────
|
|
# Local hostname used when accessing the app on your LAN/server directly
|
|
LOCAL_URL=http://localhost
|
|
# Public-facing URL when accessed via your reverse proxy (leave blank if none)
|
|
PUBLIC_URL=
|
|
|
|
# ─── Auth ──────────────────────────────────────────────────────────────────────
|
|
# Signs and verifies JWT tokens. Anyone with this key can forge auth tokens,
|
|
# so use a long random value in production and never commit it to git.
|
|
# Generate: python -c "import secrets; print(secrets.token_hex(32))"
|
|
JWT_SECRET_KEY=
|
|
|
|
# ─── PostgreSQL ───────────────────────────────────────────────────────────────
|
|
POSTGRES_USER=congress
|
|
POSTGRES_PASSWORD=congress
|
|
POSTGRES_DB=pocketveto
|
|
|
|
# These are constructed automatically from the above in docker-compose.yml.
|
|
# Override here only if connecting to an external DB.
|
|
# DATABASE_URL=postgresql+asyncpg://congress:congress@postgres:5432/pocketveto
|
|
# SYNC_DATABASE_URL=postgresql://congress:congress@postgres:5432/pocketveto
|
|
|
|
# ─── Redis ────────────────────────────────────────────────────────────────────
|
|
REDIS_URL=redis://redis:6379/0
|
|
|
|
# ─── api.data.gov (Congress.gov + GovInfo share the same key) ─────────────────
|
|
# Free key: https://api.data.gov/signup/
|
|
DATA_GOV_API_KEY=
|
|
|
|
# How often to poll Congress.gov for new/updated bills (minutes)
|
|
CONGRESS_POLL_INTERVAL_MINUTES=30
|
|
|
|
# ─── LLM Provider ─────────────────────────────────────────────────────────────
|
|
# Choose one: openai | anthropic | gemini | ollama
|
|
LLM_PROVIDER=openai
|
|
|
|
OPENAI_API_KEY=
|
|
OPENAI_MODEL=gpt-4o
|
|
|
|
ANTHROPIC_API_KEY=
|
|
ANTHROPIC_MODEL=claude-opus-4-6
|
|
|
|
GEMINI_API_KEY=
|
|
GEMINI_MODEL=gemini-1.5-pro
|
|
|
|
# For Ollama: use host.docker.internal to reach a locally running Ollama server
|
|
OLLAMA_BASE_URL=http://host.docker.internal:11434
|
|
OLLAMA_MODEL=llama3.1
|
|
|
|
# ─── Google Civic Information API ─────────────────────────────────────────────
|
|
# Used for zip code → representative lookup in the Draft Letter panel.
|
|
# Free tier: 25,000 req/day. Enable the API at:
|
|
# https://console.cloud.google.com/apis/library/civicinfo.googleapis.com
|
|
CIVIC_API_KEY=
|
|
|
|
# ─── News ─────────────────────────────────────────────────────────────────────
|
|
# Free key (100 req/day): https://newsapi.org/register
|
|
NEWSAPI_KEY=
|
|
|
|
# ─── Google Trends ────────────────────────────────────────────────────────────
|
|
PYTRENDS_ENABLED=true
|