dak.c2s/docs/plans/2026-02-23-dak-portal-design.md
CCS Admin 5d57b1f349 feat: project scaffolding with FastAPI, config, database connection
- Initialize project structure with backend/app/ package layout
- Add FastAPI app with CORS middleware and health check endpoint
- Add Pydantic Settings config with DB, JWT, SMTP, and app settings
- Add SQLAlchemy database engine and session management
- Add requirements.txt with all dependencies (FastAPI, SQLAlchemy, Alembic, etc.)
- Add .env.example template and .gitignore
- Add empty frontend/ and backend test scaffolding
- Include project specification and design/implementation plans

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 07:24:00 +00:00

61 lines
2 KiB
Markdown

# DAK Zweitmeinungs-Portal — Design-Dokument
**Datum:** 2026-02-23
**Status:** Genehmigt
**Basis:** Dak_projekt_spezifikation_final.md (v4.0)
---
## Architektur
FastAPI-Backend (Python) + React-SPA-Frontend (Vite/TypeScript) + MariaDB auf Hetzner 1.
```
Nginx (Plesk) → /api/* → FastAPI (Gunicorn+Uvicorn, Port 8000)
→ /* → React SPA (Static Build)
→ MariaDB dak_c2s (localhost:3306 in Prod)
```
## Entscheidungen (abweichend von Spec)
| Thema | Spec | Anpassung | Begründung |
|-------|------|-----------|------------|
| Dev-DB | Lokale MariaDB auf sv-frontend | Remote → Hetzner 1 | DB existiert bereits, kein Doppel-Setup |
| Python Dev | 3.11.2 | 3.13.5 (sv-frontend) | Kompatibel, kein Pinning auf 3.11-Features |
| gh CLI | Nicht erwähnt | Installiert auf sv-frontend | Für Repo-Erstellung und PR-Workflow |
Alle anderen Entscheidungen aus der Spec bleiben unverändert (13 Punkte).
## Tech-Stack
- **Backend:** Python 3.13 (Dev) / 3.11 (Prod), FastAPI, SQLAlchemy 2.0, Alembic, Pandas, openpyxl
- **Frontend:** React 18, Vite, TypeScript, Tailwind CSS, shadcn/ui, Recharts
- **DB:** MariaDB 10.11.14 (dak_c2s auf Hetzner 1)
- **Auth:** JWT (python-jose) + bcrypt (passlib) + TOTP (pyotp)
- **E-Mail:** SMTP smtp.complexcaresolutions.de:465 (SSL)
- **Deploy:** systemd + Plesk-Nginx, GitHub-Webhook
## Rollen
- `admin` — Voller Zugriff (Import, Coding, Reports, Users)
- `dak_mitarbeiter` — Dashboard, ICD-Eingabe, Report-Download
## Dev-Workflow
- Entwicklung auf sv-frontend `/home/frontend/dak_c2s/`
- DB-Verbindung: Remote zu Hetzner 1 MariaDB
- Git: `develop``main`, GitHub `complexcaresolutions/dak.c2s`
- Backend-Dev: `uvicorn app.main:app --reload`
- Frontend-Dev: `pnpm dev` mit API-Proxy auf Backend
## Referenzdaten
Bereitgestellt durch User in `data/` (gitignored):
- Abrechnung_DAK.xlsx
- Berichtswesen_2024_29122024.xlsx
- Berichtswesen_2023_31122023.xlsx
- Sample-CSVs
## Implementierungsphasen
5 Phasen, 6 Wochen — Details im Implementierungsplan.