Krisenvorrat Inventar-App – Android-App (Kotlin) zur Verwaltung eines Krisenvorrats-Inventars
Find a file
Jens Reinemann 5974144621 feat(server): add REST-API endpoints for inventory sync & CRUD
server/src/main/kotlin/.../routes/InventoryRoutes.kt:
- GET /api/inventory: returns full inventory as JSON
- PUT /api/inventory: full-sync replaces entire server inventory

server/src/main/kotlin/.../plugins/StatusPages.kt:
- Structured error handling via Ktor StatusPages plugin
- BadRequestException, SerializationException, IllegalArgumentException → 400
- Unhandled exceptions → 500 with logging

server/src/main/kotlin/.../plugins/CallLogging.kt:
- Request logging via Ktor CallLogging plugin (INFO level)

server/src/main/kotlin/.../model/ErrorResponse.kt:
- Serializable error response DTO (status + message)

server/src/main/kotlin/.../plugins/Routing.kt:
- Health endpoint moved from /health to /api/health
- Inventory routes mounted under /api/inventory

server/src/main/kotlin/.../Application.kt:
- Added configurePlugins() for testability (DB init separate)
- StatusPages and CallLogging plugins configured

server/src/test/.../ApplicationTest.kt:
- 8 endpoint tests using Ktor TestApplication with in-memory H2
- Tests: health, 404, empty GET, PUT valid, PUT+GET roundtrip,
  invalid JSON → 400, data replacement, JSON content type

Closes #42
2026-05-14 20:30:34 +02:00
.github feat(ui): add category and location management screens 2026-05-14 00:56:36 +02:00
.vscode chore: initial project setup with Copilot config, skills, and workspace structure 2026-05-13 13:40:41 +02:00
Anforderungen docs(server-tech): ADR für Server-Technologie – Ktor gewählt 2026-05-14 19:22:27 +02:00
app feat(shared): add shared module with common DTO models 2026-05-14 19:50:23 +02:00
gradle feat(server): add REST-API endpoints for inventory sync & CRUD 2026-05-14 20:30:34 +02:00
memories/repo chore: initial project setup with Copilot config, skills, and workspace structure 2026-05-13 13:40:41 +02:00
server feat(server): add REST-API endpoints for inventory sync & CRUD 2026-05-14 20:30:34 +02:00
shared feat(shared): add shared module with common DTO models 2026-05-14 19:50:23 +02:00
.gitignore feat(server): add Exposed ORM database layer with H2 2026-05-14 20:15:07 +02:00
build.gradle.kts feat(server): add Ktor server module with health endpoint 2026-05-14 20:06:40 +02:00
gradle.properties fix: Build-Fehler beheben (gradle.properties, Theme, Icon) (#13) 2026-05-13 16:18:22 +02:00
gradlew feat: Android-Projekt-Gerüst anlegen (#13) 2026-05-13 15:24:39 +02:00
gradlew.bat feat: Android-Projekt-Gerüst anlegen (#13) 2026-05-13 15:24:39 +02:00
settings.gradle.kts feat(server): add Ktor server module with health endpoint 2026-05-14 20:06:40 +02:00