Use Cases: UpdateStorageLocation, DeactivateStorageLocation, ActivateStorageLocation
Endpoints: PUT /{id}, PATCH /{id}/deactivate, PATCH /{id}/activate
Repository: existsByNameAndIdNot für Uniqueness-Check bei Update
Tests: 14 neue Integrationstests (25 gesamt)
Address all 18 findings from security code review (5 critical, 7 medium, 6 low):
Domain: make User and Role immutable with wither-pattern, add status transition
guards (ACTIVE->LOCKED, LOCKED->ACTIVE, ACTIVE|LOCKED->INACTIVE, INACTIVE->ACTIVE)
Application: enforce authorization via AuthorizationPort in all use cases, add
input validation, introduce LockUserCommand/UnlockUserCommand/RemoveRoleCommand,
fix audit event on password change failure (K5), use flatMap/mapError chains
Infrastructure: JWT blacklist with TTL and scheduled cleanup, login rate limiting
(5 attempts/15min), configurable CORS, generic error messages, conditional Swagger,
seed data context restriction
Tests: unit tests for all 10 use cases, adapted domain and integration tests
Shared Value Objects für den Production BC implementiert (#25):
- Quantity mit Dual-Quantity/Catch-Weight Support und Arithmetik
- UnitOfMeasure Enum (kg, g, L, mL, pc, m)
- YieldPercentage (1-200) mit calculateRequiredInput()
- BatchNumber mit Format P-YYYY-MM-DD-XXX
- QuantityError sealed interface für funktionales Error Handling
- 60 Unit Tests für alle VOs
- Move Java backend to backend/ directory
- Create frontend/ directory for TypeScript TUI and future WebUI
- Update .gitignore for Node.js and worktrees
- Update README.md with new repository structure
- Copy documentation to backend/