- /berichte lists published reports; /berichte/<slug> renders a report: Markdown subset built as React
elements (no raw HTML), [[angabe:ID]] embeds the claim card under a seal (green 'Amtliche Daten' when a
source is official), [text](angabe:ID|bericht:slug|person:slug|org:slug) links inline, [[bericht:slug]]
embeds another report; a box says how many claims the text rests on; backlinks between reports.
- /berichte/verfassen (login at the proxy): own reports, editor with a picker that finds claims, reports and
persons and inserts their codes; draft / published / withdrawn; every save kept in report_revision.
- Claim pages show the embed code, 'use in a new report' and the reports citing the claim.
- API: GET /api/v1/reports, /reports/{slug} (references resolved like permalinks, merged claims follow the
survivor); POST/PUT for the web app with POLITRACK_AUTHOR_TOKEN on behalf of the proxy user. The web app
trusts Remote-User only with X-Politrack-Proxy = POLITRACK_PROXY_SECRET.
- Migration 0011 (report, report_revision, report_reference, app_user.display_name); docs: data model,
deployment (sign-in setup), design system, roadmap.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
64 lines
2.7 KiB
Bash
64 lines
2.7 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
|
|
|
|
# Shown on /impressum and /datenschutz. Required before the site goes public (§ 5 ECG, §§ 24, 25 MedienG).
|
|
# POLITRACK_LEGAL_NAME=
|
|
# POLITRACK_LEGAL_ADDRESS=
|
|
# POLITRACK_LEGAL_EMAIL=
|
|
# Defaults to POLITRACK_LEGAL_EMAIL.
|
|
# POLITRACK_CORRECTIONS_EMAIL=
|
|
|
|
# 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=
|
|
|
|
# Reports written by signed-in users (docs/deployment-unraid.md, "Reports and sign-in"). Both empty = read-only.
|
|
# POLITRACK_AUTHOR_TOKEN= shared by web and api (e.g. openssl rand -hex 32)
|
|
# POLITRACK_PROXY_SECRET= the reverse proxy sends it as X-Politrack-Proxy (e.g. openssl rand -hex 32)
|
|
# POLITRACK_REPORT_EDITOR_GROUPS=["admins"] login groups that may edit and withdraw any report
|
|
|
|
# Nightly database dumps (backup service). Ideally on a different disk or share than DATA_DIR.
|
|
# BACKUP_DIR=/mnt/user/backups/politrack
|
|
# BACKUP_KEEP_DAYS=14
|
|
|
|
# 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=
|
|
# JustizOnline Firmenbuch high-value-dataset web service token (free, request it at justizonline.gv.at)
|
|
# POLITRACK_JUSTIZ_HVD_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
|