feat(db): Datenmodell, erste Migration und Seed (#003)

Prisma 7.10 mit Postgres-Adapter, 23 Modelle inklusive Rechnungen mit Positionen,
Seed fuer Administrator, Warnregeln und Demo-Daten, Testdatenbank fuer Vitest.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-17 20:32:04 +02:00
co-authored by Claude Opus 5
parent 090396f6c0
commit 293bcf4b5a
22 changed files with 4121 additions and 36 deletions
+8 -1
View File
@@ -11,12 +11,19 @@ Voraussetzungen: Node.js ≥ 24, Docker (für PostgreSQL ab #003).
```bash
npm install
npm run db:up # PostgreSQL im Container (Port 5433)
cp .env.example .env
npm run db:migrate # Schema anlegen
npm run db:seed # Administrator, Warnregeln, mit SEED_DEMO=1 auch Demo-Daten
npm run dev # http://localhost:3000
npm run lint
npm run typecheck
npm test
npm test # legt bei Bedarf die Testdatenbank an
```
Weitere Skripte: `npm run db:studio` (Datenbank-Oberfläche), `npm run db:down` (Container stoppen).
## Dokumentation
- [Architektur- und Umsetzungsplan](docs/architektur.md)