Commit graph

3 commits

Author SHA1 Message Date
Jens Reinemann
cb190e61e9 feat(server): add Ktor server module with health endpoint
New Gradle module :server (Kotlin/JVM) with Ktor 3.1.2 framework,
configured as an embedded Netty HTTP server.

server/src/main/kotlin/de/krisenvorrat/server/:
- Application.kt: entry point using EngineMain for HOCON config
- plugins/Routing.kt: GET /health endpoint returning 200 OK
- plugins/Serialization.kt: ContentNegotiation with kotlinx.json

Configuration:
- application.conf (HOCON): host 0.0.0.0, port 8080, module reference
- logback.xml: SLF4J/Logback console logging

Build config:
- server/build.gradle.kts: Ktor plugin with Fat JAR (server.jar)
- libs.versions.toml: Ktor 3.1.2, Logback 1.5.18 dependencies
- settings.gradle.kts: include(:server)
- :server depends on :shared for common DTO models

Tests: 2 tests (health endpoint, 404 on unknown route) via
Ktor testApplication.

Closes #40
2026-05-14 20:06:40 +02:00
Jens Reinemann
c0c4978ccf feat(shared): add shared module with common DTO models
New Gradle module :shared (pure Kotlin/JVM) containing @Serializable
DTO classes for use by both the Android app and future Ktor server.

shared/src/main/kotlin/de/krisenvorrat/shared/model/:
- InventoryDto: root DTO replacing ExportData (version, categories,
  locations, items, settings)
- CategoryDto, LocationDto, ItemDto, SettingDto: extracted from
  the former *Export data classes in :app

Migration in :app:
- ExportData.kt deleted (classes moved to :shared)
- ImportExportRepositoryImpl now imports from de.krisenvorrat.shared.model
- app/build.gradle.kts adds implementation(project(:shared))

Build config:
- libs.versions.toml: added kotlin-jvm plugin entry
- build.gradle.kts (root): registered kotlin-jvm plugin
- settings.gradle.kts: include(:shared)

JSON wire format is unchanged; all 165 existing tests pass.

Closes #39
2026-05-14 19:50:23 +02:00
Jens Reinemann
040f007cd5 feat: Android-Projekt-Gerüst anlegen (#13)
- Gradle Kotlin DSL (settings.gradle.kts, build.gradle.kts)
- Version Catalog (libs.versions.toml) mit Compose BOM, Hilt, Room,
  Navigation Compose, kotlinx.serialization
- App-Modul (app/build.gradle.kts), minSdk 26, compileSdk 35
- AndroidManifest.xml mit KrisenvorratApp + MainActivity
- KrisenvorratApp (@HiltAndroidApp)
- MainActivity (@AndroidEntryPoint, Jetpack Compose + Material3)
- KrisenvorratTheme (ui/theme/Theme.kt)
- MVVM-Paketstruktur: data/, domain/, presentation/, di/
- Adaptive Launcher-Icons (mipmap-anydpi-v26)
- Gradle Wrapper 8.11.1 (gradlew, gradlew.bat, gradle-wrapper.jar)
2026-05-13 15:24:39 +02:00