feat(api): Core-API mit Authentifizierung, CRUD und Monatsreport

- Anmeldung über Argon2id und JWT in httpOnly-Cookies, Refresh mit echter
  Rotation über die neue Tabelle refresh_token
- AuthProvider-Protokoll als Vorbereitung für OIDC, Administrator-Anlage beim
  Erststart mit erzwungenem Passwortwechsel
- CRUD für Konten, Kategorien (zweistufiger Baum), Firmen, Recurrences,
  Preisversionen, Buchungen, Budgets, Vorlagen und Sparziele
- Fälligkeiten mit Overlay-Logik: abrufen, bestätigen, auslassen, zurücksetzen
- Kontosalden zum Stichtag, Monatsübersicht mit Plan-Ist-Vergleich
- SECRET_KEY jetzt mindestens 32 Zeichen; Platzhalter in Produktion abgelehnt
- 61 neue Integrationstests, insgesamt 148 grün

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014e7t8UpmoVNMtWivY5LiSH
This commit is contained in:
moneyfy
2026-09-09 13:40:37 +02:00
co-authored by Claude Opus 5
parent 70d73cf8d3
commit b586d27b77
46 changed files with 4866 additions and 21 deletions
+48
View File
@@ -0,0 +1,48 @@
"""Schemata für einmalige Buchungen."""
from datetime import date, datetime
from pydantic import Field
from app.models.enums import EntryKind
from app.schemas.common import ApiModel, InputModel, Money, PositiveMoney
from app.schemas.merchant import MerchantOut
class TransactionCreate(InputModel):
kind: EntryKind
title: str = Field(min_length=1, max_length=160, examples=["Wocheneinkauf"])
merchant_id: int | None = None
category_id: int
account_id: int
amount: PositiveMoney = Field(description="Immer positiv die Richtung steckt in `kind`.")
booking_date: date
note: str | None = None
tags: list[str] = Field(default_factory=list)
class TransactionUpdate(InputModel):
kind: EntryKind | None = None
title: str | None = Field(default=None, min_length=1, max_length=160)
merchant_id: int | None = None
category_id: int | None = None
account_id: int | None = None
amount: PositiveMoney | None = None
booking_date: date | None = None
note: str | None = None
tags: list[str] | None = None
class TransactionOut(ApiModel):
id: int
kind: EntryKind
title: str
merchant_id: int | None
category_id: int
account_id: int
amount: Money
booking_date: date
note: str | None
tags: list[str]
created_at: datetime
merchant: MerchantOut | None = None