Mobile-optimiertes Erfassungsformular unter /varroa/new sowie "Varroa"-Ansicht mit Verlaufsgrafik auf der Volk-Detailseite.
196 lines
9.7 KiB
Markdown
196 lines
9.7 KiB
Markdown
# ApiCore – Aufgabenliste
|
||
|
||
Abgeleitet aus [`docs/lastenheft.md`](docs/lastenheft.md) Abschnitt 26. Reihenfolge innerhalb MVP ist Bau-Reihenfolge (siehe Vorgabe: Auth zuerst, dann Kette bis Export). Haken erst setzen, wenn Lint+Typecheck+Tests+Build für das jeweilige Projekt grün sind UND das Modul manuell/per Test verifiziert wurde.
|
||
|
||
## MVP (MUSS) – Abschnitt 26, Liste 1
|
||
|
||
### 0. Grundgerüst
|
||
|
||
- [x] Backend: NestJS-Projekt scaffolden, Prisma init, `/api/v1` Versioning, Swagger unter `/api/v1/docs`, `/health` + `/health/ready`
|
||
- [x] Backend: `.env.example` (`DATABASE_URL`, `JWT_ACCESS_SECRET`, `JWT_REFRESH_SECRET`)
|
||
- [x] Backend: Prisma-Schema für alle MVP-Entitäten (siehe ARCHITECTURE.md §4, §6), erste Migration
|
||
- [x] Frontend: Next.js (App Router, TS) scaffolden, Tailwind + shadcn/ui, PWA-Manifest, TanStack Query Provider
|
||
- [x] `deploy/k8s/`: Dockerfiles (Backend, Frontend), Deployment/Service/Ingress, ConfigMap/Secret-Vorlagen
|
||
|
||
### 1. Benutzerverwaltung / Auth
|
||
|
||
- Backend: `AuthModule`, `UsersModule`, `AuditModule` (Grundstruktur)
|
||
- Endpunkte: `POST /api/v1/auth/login`, `POST /api/v1/auth/refresh`, `POST /api/v1/auth/logout`, `GET /api/v1/users`, `POST /api/v1/users`, `GET/PATCH /api/v1/users/:id`, `POST /api/v1/users/:id/deactivate`
|
||
- Frontend: `/login`, `/settings/users` (nur Administrator)
|
||
- [x] Rollen-Enum + Guards (`JwtAuthGuard`, `RolesGuard`, `@Roles()`) implementiert und in jedem künftigen Modul verpflichtend
|
||
- [x] Backend-Modul fertig, getestet, grün, committet
|
||
- [x] Frontend-Views fertig, getestet, grün, committet
|
||
|
||
### 2. Bienenstände
|
||
|
||
- Backend: `ApiariesModule`
|
||
- Endpunkte: `GET/POST /api/v1/apiaries`, `GET/PATCH /api/v1/apiaries/:id`, `POST /api/v1/apiaries/:id/deactivate`
|
||
- Frontend: `/apiaries`, `/apiaries/[id]`, `/apiaries/new`
|
||
- [x] Backend-Modul fertig, getestet, grün, committet
|
||
- [x] Frontend-Views fertig, getestet, grün, committet
|
||
|
||
### 3. Völker
|
||
|
||
- Backend: `ColoniesModule` (inkl. `ColonyApiaryHistory`, `ColonyLineage` für Ableger/Vereinigung)
|
||
- Endpunkte: `GET/POST /api/v1/colonies`, `GET/PATCH /api/v1/colonies/:id`, `POST /api/v1/colonies/:id/move`, `POST /api/v1/colonies/:id/split`, `POST /api/v1/colonies/:id/merge`, `POST /api/v1/colonies/:id/dissolve`, `GET /api/v1/colonies/:id/history`
|
||
- Frontend: `/colonies`, `/colonies/[id]`, `/colonies/new`
|
||
- [x] Backend-Modul fertig, getestet, grün, committet
|
||
- [x] Frontend-Views fertig, getestet, grün, committet
|
||
|
||
### 4. Königinnen
|
||
|
||
- Backend: `QueensModule` (inkl. `QueenColonyHistory`)
|
||
- Endpunkte: `GET/POST /api/v1/queens`, `GET/PATCH /api/v1/queens/:id`, `POST /api/v1/queens/:id/assign-colony`, `GET /api/v1/queens/:id/history`
|
||
- Frontend: `/queens`, `/queens/[id]`, `/queens/new`
|
||
- [x] Backend-Modul fertig, getestet, grün, committet
|
||
- [x] Frontend-Views fertig, getestet, grün, committet
|
||
|
||
### 5. Durchsichten
|
||
|
||
- Backend: `InspectionsModule`
|
||
- Endpunkte: `GET/POST /api/v1/inspections`, `GET /api/v1/inspections/:id`, `GET /api/v1/colonies/:id/inspections`, `POST /api/v1/inspections/:id/create-task`
|
||
- Frontend: `/inspections/new` (mobile-optimiertes Schnellformular), `/colonies/[id]` Tab "Durchsichten"
|
||
- [x] Backend-Modul fertig, getestet, grün, committet
|
||
- [x] Frontend-Views fertig, getestet, grün, committet
|
||
|
||
### 6. Aufgaben
|
||
|
||
- Backend: `TasksModule` (polymorphe Verknüpfung: Colony/Apiary/Queen/HoneyBatch/Storage/General)
|
||
- Endpunkte: `GET/POST /api/v1/tasks`, `GET/PATCH /api/v1/tasks/:id`, `POST /api/v1/tasks/:id/complete`
|
||
- Frontend: `/tasks` (Liste, Filter nach Status/Priorität/Fälligkeit)
|
||
- [x] Backend-Modul fertig, getestet, grün, committet
|
||
- [x] Frontend-Views fertig, getestet, grün, committet
|
||
|
||
### 7. Varroamessungen
|
||
|
||
- Backend: `VarroaModule`
|
||
- Endpunkte: `GET/POST /api/v1/varroa-measurements`, `GET /api/v1/colonies/:id/varroa-measurements`
|
||
- Frontend: `/varroa/new`, `/colonies/[id]` Tab "Varroa" mit Verlaufsgrafik
|
||
- [x] Backend-Modul fertig, getestet, grün, committet
|
||
- [x] Frontend-Views fertig, getestet, grün, committet
|
||
|
||
### 8. Behandlungen
|
||
|
||
- Backend: `TreatmentsModule`
|
||
- Endpunkte: `GET/POST /api/v1/treatments`, `GET /api/v1/colonies/:id/treatments`
|
||
- Frontend: `/treatments/new`, `/colonies/[id]` Tab "Behandlungen"
|
||
- [ ] Backend-Modul fertig, getestet, grün, committet
|
||
- [ ] Frontend-Views fertig, getestet, grün, committet
|
||
|
||
### 9. Fütterungen
|
||
|
||
- Backend: `FeedingsModule`
|
||
- Endpunkte: `GET/POST /api/v1/feedings`, `GET /api/v1/colonies/:id/feedings`, `GET /api/v1/colonies/:id/feedings/summary`
|
||
- Frontend: `/feedings/new`, `/colonies/[id]` Tab "Fütterung"
|
||
- [ ] Backend-Modul fertig, getestet, grün, committet
|
||
- [ ] Frontend-Views fertig, getestet, grün, committet
|
||
|
||
### 10. Ernten (inkl. Schleuderung als Fundament der Chargenkette)
|
||
|
||
- Backend: `HarvestsModule`, `ExtractionsModule`
|
||
- Endpunkte: `GET/POST /api/v1/harvests`, `GET /api/v1/harvests/:id`, `GET/POST /api/v1/extractions`, `GET /api/v1/extractions/:id`
|
||
- Frontend: `/harvests/new`, `/harvests/[id]`, `/extractions/new`
|
||
- [ ] Backend-Modul fertig, getestet, grün, committet
|
||
- [ ] Frontend-Views fertig, getestet, grün, committet
|
||
|
||
### 11. Honigchargen
|
||
|
||
- Backend: `HoneyBatchesModule` (inkl. Honigmessungen, siehe ARCHITECTURE.md Annahme 1)
|
||
- Endpunkte: `GET/POST /api/v1/honey-batches`, `GET /api/v1/honey-batches/:id`, `GET /api/v1/honey-batches/:id/traceability`, `POST /api/v1/honey-batches/:id/measurements`
|
||
- Frontend: `/honey-batches`, `/honey-batches/[id]` (inkl. Rückverfolgbarkeits-Ansicht)
|
||
- [ ] Backend-Modul fertig, getestet, grün, committet
|
||
- [ ] Frontend-Views fertig, getestet, grün, committet
|
||
|
||
### 12. Grundlegende Lagerverwaltung
|
||
|
||
- Backend: `StorageModule` (StorageContainer, StockItem, StockMovement)
|
||
- Endpunkte: `GET/POST /api/v1/storage-containers`, `GET/POST /api/v1/stock-items`, `POST /api/v1/stock-items/:id/movements`
|
||
- Frontend: `/storage`
|
||
- [ ] Backend-Modul fertig, getestet, grün, committet
|
||
- [ ] Frontend-Views fertig, getestet, grün, committet
|
||
|
||
### 13. Dashboard
|
||
|
||
- Backend: `DashboardModule`
|
||
- Endpunkte: `GET /api/v1/dashboard/summary`, `GET /api/v1/dashboard/alerts`
|
||
- Frontend: `/dashboard` (Startseite nach Login)
|
||
- [ ] Backend-Modul fertig, getestet, grün, committet
|
||
- [ ] Frontend-Views fertig, getestet, grün, committet
|
||
|
||
### 14. Suche und Filter
|
||
|
||
- Backend: `SearchModule` (`GET /api/v1/search?q=`), Filter-Query-Parameter in bestehenden List-Endpunkten (Standort, Status, Zeitraum etc., kombinierbar)
|
||
- Frontend: `/search`, Filterleisten in allen Listen-Views
|
||
- [ ] Backend-Modul fertig, getestet, grün, committet
|
||
- [ ] Frontend-Views fertig, getestet, grün, committet
|
||
|
||
### 15. Responsive Smartphone-Oberfläche
|
||
|
||
- Frontend: Mobile-first-Layout für alle o.g. Views verifiziert (Touch-Targets, Bottom-Nav, "+ Neu"-Schnellaktion permanent erreichbar)
|
||
- [ ] Manuell auf simulierter Smartphone-Breite (< 480px) und Tablet-Breite geprüft
|
||
|
||
### 16–18. API, API-Dokumentation, Rollen/Berechtigungen
|
||
|
||
- Cross-cutting, wird pro Modul mitgeliefert (jeder Endpunkt in Swagger, jeder Endpunkt mit Rollen-Guard)
|
||
- [ ] Abschließende Prüfung: alle Endpunkte in `/api/v1/docs` sichtbar, alle mit Rollenprüfung
|
||
|
||
### 19. Audit-Log (vollständiges Modul inkl. Abfrage/UI)
|
||
|
||
- Backend: `AuditModule` erweitert um Abfrage-Endpunkte (Grundstruktur bereits in Schritt 1 gebaut, hier UI + Query-API)
|
||
- Endpunkte: `GET /api/v1/audit-log?entityType=&entityId=`
|
||
- Frontend: `/settings/audit-log` (nur Administrator)
|
||
- [ ] Backend-Modul fertig, getestet, grün, committet
|
||
- [ ] Frontend-Views fertig, getestet, grün, committet
|
||
|
||
### 20. Backupfähigkeit
|
||
|
||
- [ ] Prisma-Migrationen reproduzierbar (kein `db push` in Produktion, nur `migrate deploy`)
|
||
- [ ] Backup-/Restore-Strategie in ARCHITECTURE.md dokumentiert
|
||
- [ ] `/health/ready` prüft DB-Erreichbarkeit
|
||
|
||
### 21. Datenexport
|
||
|
||
- Backend: `ExportModule`
|
||
- Endpunkte: `GET /api/v1/export/colonies.csv`, `GET /api/v1/export/honey-batches.csv`, `GET /api/v1/export/:report.pdf`, `GET /api/v1/export/:entity.json`
|
||
- Frontend: Export-Buttons in den jeweiligen Listen-Views
|
||
- [ ] Backend-Modul fertig, getestet, grün, committet
|
||
- [ ] Frontend-Views fertig, getestet, grün, committet
|
||
|
||
### MVP-Abschluss
|
||
|
||
- [ ] Gesamter Backend-Build grün (`lint`, `typecheck`, `test`, `test:e2e`, `build`)
|
||
- [ ] Gesamter Frontend-Build grün (`lint`, `typecheck`, `test`, `build`)
|
||
- [ ] Rückverfolgbarkeitskette Volk → Durchsicht → Behandlung → Ernte → Schleuderung → Honigcharge → Lager end-to-end manuell verifiziert
|
||
- [ ] Alle Erfolgskriterien aus Abschnitt 30 stichprobenartig beantwortbar
|
||
|
||
## v1.x (SOLL)
|
||
|
||
- [ ] QR-Code-System (Abschnitt 4.23): Generierung + Scan-Landing pro Objekt
|
||
- [ ] Abfüllchargen (Abschnitt 4.19): `BottlingBatchesModule`, `ProductsModule`
|
||
- [ ] Detailliertes Inventar (Abschnitt 4.22): `EquipmentModule`
|
||
- [ ] Kalender (Abschnitt 4.25)
|
||
- [ ] Benachrichtigungssystem mit Prioritäten (Abschnitt 24)
|
||
- [ ] Umfangreiche Statistiken/Reporting (Abschnitt 4.26)
|
||
- [ ] Webhooks (Abschnitt 9): `WebhooksModule`, Events wie in Lastenheft gelistet
|
||
- [ ] Fotoverwaltung / Dokumente (Abschnitt 4.24): `DocumentsModule` + Objektspeicher
|
||
- [ ] Automatische Folgeaufgaben / Automatisierungsregeln (Abschnitt 23)
|
||
- [ ] Königinnenbewertung / Scoring-System (Abschnitt 4.7)
|
||
- [ ] Lagerbehälter-Umlagerungshistorie erweitert (Abschnitt 4.18)
|
||
- [ ] Importfunktionen (Abschnitt 10, strukturierter CSV-Import für Stammdaten)
|
||
|
||
## Später (KANN)
|
||
|
||
- [ ] Vollständig offlinefähige PWA mit Sync (Abschnitt 12)
|
||
- [ ] Native Smartphone-App
|
||
- [ ] NFC-Tags
|
||
- [ ] Wetterintegration / Wetterhistorie je Bienenstand
|
||
- [ ] Trachtprognosen
|
||
- [ ] Kartenansicht
|
||
- [ ] KI-Auswertung von Völkerdaten / automatische Anomalieerkennung
|
||
- [ ] Fotoanalyse
|
||
- [ ] Spracherfassung am Bienenstand
|
||
- [ ] Automatische Zusammenfassung einer Durchsicht
|
||
- [ ] Sensorintegration (Stockwaagen, Temperatur-/Feuchtesensoren)
|
||
- [ ] Öffentliche Herkunftsseiten für Honigchargen (Wabenhain-Integration, Abschnitt 27)
|
||
- [ ] Kunden-QR-Code auf Honiggläsern
|