130 lines
2.9 KiB
Markdown
130 lines
2.9 KiB
Markdown
# 🧊 Backend Freeze – Frontend Ready
|
||
|
||
**Projekt:** OnlyPets
|
||
**Stand:** Backend eingefroren (Frontend-ready)
|
||
**Datum:** 27.12.2025
|
||
|
||
Ziel dieses Dokuments ist es, klar festzuhalten:
|
||
> Das Backend ist technisch und strukturell abgeschlossen,
|
||
> sodass die weitere Entwicklung primär im Frontend stattfinden kann.
|
||
|
||
Spezial-Features werden bewusst **getrennt** und **nachgelagert** umgesetzt.
|
||
|
||
---
|
||
|
||
## 🧱 1. Architektur & Infrastruktur
|
||
|
||
- NestJS stabil gebootstrapped
|
||
- Module sauber getrennt:
|
||
- Posts
|
||
- Feed
|
||
- Prisma
|
||
- Auth
|
||
- Dependency Injection stabil (keine offenen DI-Fehler)
|
||
- Prisma korrekt als Service eingebunden
|
||
- Strict TypeScript aktiv (keine `any`-Leaks)
|
||
- Ordnerstruktur final (kein späteres Refactoring notwendig)
|
||
|
||
**Status:** ✅ abgeschlossen
|
||
|
||
---
|
||
|
||
## 🔐 2. Auth-Grundlage (Phase 1)
|
||
|
||
- Globaler `DummyAuthGuard` aktiv
|
||
- `req.user` immer definiert (`null | FakeUser`)
|
||
- Rollenmodell vorbereitet (`USER | MOD | ADMIN`)
|
||
- `@Public()` Decorator vorhanden
|
||
- Guard-first-Architektur (keine Auth-Logik in Services)
|
||
|
||
> Echte Auth (JWT, Login) ist **bewusst nicht Teil** des Freeze-Zustands.
|
||
|
||
**Status:** ✅ abgeschlossen (Phase-1-Scope)
|
||
|
||
---
|
||
|
||
## 🗃️ 3. Datenmodell & Prisma
|
||
|
||
- Prisma Schema stabil
|
||
- Keine redundanten oder abgeleiteten Felder
|
||
- Alter wird **nicht gespeichert**
|
||
- `birthDate` ist Single Source of Truth
|
||
- Beziehungen konsistent:
|
||
- User ↔ Pet ↔ Post
|
||
- Seed reproduzierbar & idempotent
|
||
- DB-Zugriff ausschließlich über Services
|
||
|
||
**Status:** ✅ abgeschlossen
|
||
|
||
---
|
||
|
||
## 📰 4. Feed & Content (Frontend-relevant)
|
||
|
||
Aktive Endpoints:
|
||
|
||
- `GET /posts`
|
||
- `GET /feed`
|
||
|
||
Eigenschaften:
|
||
- `/feed` ist 1:1 aus `/posts` gespiegelt
|
||
- Deterministischer Feed
|
||
- Keine Random- oder Discovery-Logik
|
||
- Sortierung: `createdAt DESC`
|
||
- Inkludierte Relationen:
|
||
- `pet`
|
||
- `author`
|
||
|
||
Smoke-Tests erfolgreich (Invoke-RestMethod).
|
||
|
||
**Status:** ✅ abgeschlossen / frontend-ready
|
||
|
||
---
|
||
|
||
## 🩺 5. Betrieb & Stabilität
|
||
|
||
- `GET /health` Endpoint vorhanden
|
||
- Server startet ohne Errors
|
||
- Keine offenen TypeScript- oder DI-Probleme
|
||
- Lokales DEV-Setup reproduzierbar
|
||
|
||
**Status:** ✅ abgeschlossen
|
||
|
||
---
|
||
|
||
## 🧩 6. Bewusst ausgeklammerte Spezial-Features
|
||
|
||
Diese Themen sind **nicht Teil des Backend-Freeze** und werden separat umgesetzt:
|
||
|
||
- Discovery Feed (siehe Issue #243)
|
||
- Likes
|
||
- Kommentare
|
||
- Notifications
|
||
- Admin / Moderation
|
||
- Echte Auth (JWT, Login)
|
||
|
||
> Diese Features sind **entkoppelt geplant**,
|
||
> sodass sie nach Live-Frontend **ohne Rewrites** ergänzt werden können.
|
||
|
||
---
|
||
|
||
## 🧊 Freeze-Regel
|
||
|
||
Ab diesem Punkt gilt für das Backend:
|
||
|
||
- ❄️ Keine neuen Features
|
||
- ❄️ Nur Bugfixes
|
||
- ❄️ Keine API-Breaking-Changes
|
||
- ❄️ Fokus liegt auf Frontend-Entwicklung
|
||
|
||
---
|
||
|
||
## ✅ Fazit
|
||
|
||
Das Backend befindet sich im **frontend-ready Freeze-Zustand**.
|
||
|
||
- Die API ist stabil
|
||
- Die Architektur ist vorbereitet
|
||
- Erweiterungen sind planbar, aber nicht blockierend
|
||
|
||
➡️ **Empfohlener nächster Schritt:** Frontend entwickeln.
|