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>
This commit is contained in:
simonandClaude Opus 5.5 committed 2026-10-28 20:02:01 +01:00
commit 583ccba31c
187 files changed
+39890

No files matched your search

@@ -0,0 +1,66 @@
import {notFound} from 'next/navigation';
import {getLocale, getTranslations, setRequestLocale} from 'next-intl/server';
import {Link} from '@/i18n/navigation';
import {api, NotFoundError, type VoteDetail} from '@/lib/api';
import {formatDate} from '@/lib/format';
type Props = {params: Promise<{locale: string; id: string}>};
export default async function VotePage({params}: Props) {
const {locale, id} = await params;
setRequestLocale(locale);
const t = await getTranslations('Votes');
const loc = await getLocale();
let vote: VoteDetail;
try {
vote = await api.vote(id);
} catch (error) {
if (error instanceof NotFoundError) notFound();
throw error;
}
const groups = new Map<string, VoteDetail['individual']>();
for (const v of vote.individual) {
const key = v.faction ?? '–';
groups.set(key, [...(groups.get(key) ?? []), v]);
}
return (
<article>
<h1>{vote.item_title}</h1>
<p className="muted">
{formatDate(vote.voted_on, loc)} · {vote.chamber}
{vote.item_ref && <> · {vote.item_ref}</>}
{vote.stage && <> · {vote.stage}</>}
{vote.roll_call && <> · <strong>{t('rollCall')}</strong></>}
{' · '}<span className={`result result-${vote.result}`}>{vote.result !== 'unknown' && t(vote.result)}</span>
</p>
<p>
{vote.url && <a href={vote.url} target="_blank" rel="noopener noreferrer">{t('item')}</a>}
{vote.protocol_url && <> · <a href={vote.protocol_url} target="_blank" rel="noopener noreferrer">{t('protocol')}</a></>}
</p>
{vote.raw_text && <blockquote className="small">{vote.raw_text}</blockquote>}
{vote.individual.length > 0 && (
<section>
<h2>{t('individualVotes')}</h2>
<div className="grid-2">
{[...groups.entries()].map(([faction, members]) => (
<div key={faction}>
<h3>{faction}</h3>
<ul className="compact">
{members.map((m) => (
<li key={m.slug}>
<span className={`pos pos-${m.position}`}>{t(m.position as 'for')}</span>{' '}
<Link href={`/personen/${m.slug}`}>{m.full_name}</Link>
{m.dissent && <span className="dissent">{t('dissent')}</span>}
</li>
))}
</ul>
</div>
))}
</div>
</section>
)}
</article>
);
}