Files
politics-tracking/.env.example
T
simonandClaude Opus 5.5 583ccba31c Politrack: track Austrian politicians from public sources
Initial import of Politrack, a self-hosted service that tracks Austrian
politicians from federal to municipal level - roles, votes, money flows,
statements, meetings, social media and legal proceedings - with every claim
linked to its sources.

- backend: FastAPI + Postgres/pgvector; adapter framework (fetch -> parse ->
  load -> enrich) with robots.txt/TDM-aware fetching, a raw-response archive
  for reparsing, and a claim/evidence model with corroboration
- sources: Parliament, Wikidata, EU Parliament/Commission, Council of
  Ministers, Rechnungshof party reports and donations, procurement, RTR media
  transparency, political ad libraries, WKStA, news feeds, Wikipedia edits,
  Bluesky, Mastodon, public Telegram channels, YouTube and X (official API)
- web: Next.js frontend in German and English with typed API client
- mcp: MCP server for AI agents and RAG
- docs: architecture, data model, sources, legal notes, Unraid deployment and
  contributor guides; Docker Compose setup for Unraid

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 20:02:01 +01:00

46 lines
1.8 KiB
Bash

# Copy to .env and adjust.
# Where persistent data lives. On Unraid: /mnt/user/appdata/politrack
# (Not named APPDATA: Windows already sets that variable, and shell variables override this file.)
DATA_DIR=./data
POSTGRES_PASSWORD=change-me
# Password for the read-only `politrack_reader` role (for agents, BI tools, notebooks).
POLITRACK_READER_PASSWORD=change-me-too
# Identify the crawler honestly: put a URL describing the project and a contact address.
POLITRACK_USER_AGENT=PolitrackBot/0.1 (+https://example.org/about; contact: you@example.org)
POLITRACK_MIN_REQUEST_INTERVAL=2.0
# Legislative periods of the Austrian parliament to ingest in detail (JSON list).
POLITRACK_PARLAMENT_PERIODS=["XXVII","XXVIII"]
# Optional: semantic search via Ollama (model bge-m3, 1024 dims).
# POLITRACK_OLLAMA_URL=http://ollama:11434
POLITRACK_EMBEDDING_MODEL=bge-m3
POLITRACK_API_CORS_ORIGINS=["http://localhost:3000"]
# Moderation endpoints (/api/v1/review, /api/v1/admin/runs). Leave empty to moderate via the CLI only.
# POLITRACK_ADMIN_TOKEN=
# Raw-response archive inside the containers (mounted from ${DATA_DIR}/raw by docker-compose.yml).
POLITRACK_RAW_DIR=/data/raw
# Bulk sources: how far back the first run backfills.
POLITRACK_PROCUREMENT_SINCE=2024-01-01
POLITRACK_AD_ARCHIVE_SINCE=2023-01-01
# Optional credentials. Adapters that need them skip themselves when unset.
# YouTube Data API v3 key (free quota): https://console.cloud.google.com/apis/library/youtube.googleapis.com
# POLITRACK_YOUTUBE_API_KEY=
# Meta Ad Library API token (requires identity confirmation): https://www.facebook.com/ads/library/api
# POLITRACK_META_AD_LIBRARY_TOKEN=
# X API v2 bearer token (paid tier with read access). Without it no X posts are collected.
# POLITRACK_X_BEARER_TOKEN=
API_PORT=8000
MCP_PORT=8001
WEB_PORT=3000
DB_PORT=5433