reports: user articles that embed claims under a database seal and link each other

- /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>
This commit is contained in:
simonandClaude Opus 5.5 committed 2026-11-20 10:19:50 +01:00
1 parent f2d72fe464
commit 9f0e2fc115
32 files changed
+1974 -21

No files matched your search

+52
View File
@@ -533,3 +533,55 @@ class PendingClaim(Model):
occurred_at: datetime | None = None
full_name: str | None = None
evidence: list[dict[str, Any]] | None = None
# -- reports --------------------------------------------------------------------------------------------------------
class ReportListItem(Model):
slug: str
title: str
lede: str | None = None
lang: Literal["de", "en"]
status: Literal["draft", "published", "withdrawn"]
author_name: str
created_at: datetime
updated_at: datetime
published_at: datetime | None = None
claim_count: int
official_claim_count: int
revision_count: int
class NamedRef(Model):
slug: str
name: str
kind: str | None = None
class ReportReferences(Model):
claims: list[Claim]
claim_aliases: dict[str, int] = {}
missing_claims: list[int] = []
reports: list[ReportListItem]
persons: list[NamedRef]
organizations: list[NamedRef]
class ReportDetail(ReportListItem):
body: str
can_edit: bool
is_author: bool
references: ReportReferences
backlinks: list[ReportListItem]
class ReportInput(BaseModel):
title: str
lede: str | None = None
body: str
lang: Literal["de", "en"] = "de"
status: Literal["draft", "published", "withdrawn"] = "draft"
class ReportSaved(Model):
slug: str