Files
PocketVeto/.env.example
Jack Levy 5b73b60d9e Add multi-user auth system and admin panel
- User model with email/hashed_password/is_admin/notification_prefs
- JWT auth: POST /api/auth/register, /login, /me
- First registered user auto-promoted to admin
- Migration 0005: users table + user_id FK on follows (clears global follows)
- Follows, dashboard, settings, admin endpoints all require authentication
- Admin endpoints (settings writes, celery triggers) require is_admin
- Frontend: login/register pages, Zustand auth store (localStorage persist)
- AuthGuard component gates all app routes, shows app shell only when authed
- Sidebar shows user email + logout; Admin nav link visible to admins only
- Admin panel (/settings): user list with delete + promote/demote, LLM config,
  data source settings, and manual celery controls

Authored-By: Jack Levy
2026-02-28 21:44:34 -05:00

54 lines
2.9 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 ──────────────────────────────────────────────────────────────────────
# Generate a strong random secret: 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
# ─── News ─────────────────────────────────────────────────────────────────────
# Free key (100 req/day): https://newsapi.org/register
NEWSAPI_KEY=
# ─── Google Trends ────────────────────────────────────────────────────────────
PYTRENDS_ENABLED=true