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
+40 -3
View File
@@ -1,8 +1,45 @@
"""Sammelrouter für alle /api-Endpunkte."""
"""Sammelrouter für alle /api-Endpunkte.
from fastapi import APIRouter
Alle Routen außer `/api/auth/*`, `/api/me` und den Systemendpunkten erfordern
eine gültige Anmeldung **und** einen abgeschlossenen Passwortwechsel.
"""
from app.api.routes import system
from fastapi import APIRouter, Depends
from app.api.deps import get_active_user
from app.api.routes import (
accounts,
auth,
budgets,
categories,
me,
merchants,
occurrences,
recurrences,
reports,
savings_goals,
system,
transactions,
)
api_router = APIRouter(prefix="/api")
# Ohne Authentifizierung erreichbar.
api_router.include_router(system.router)
api_router.include_router(auth.router)
api_router.include_router(me.router)
# Alles Weitere nur für angemeldete Benutzer.
protected = APIRouter(dependencies=[Depends(get_active_user)])
protected.include_router(accounts.router)
protected.include_router(categories.router)
protected.include_router(merchants.router)
protected.include_router(recurrences.router)
protected.include_router(occurrences.router)
protected.include_router(transactions.router)
protected.include_router(budgets.router)
protected.include_router(budgets.templates)
protected.include_router(savings_goals.router)
protected.include_router(reports.router)
api_router.include_router(protected)