meldestelle/README.md

116 lines
4.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Meldestelle
> DesktopFirst Meldestelle: Offlinefähige ComposeDesktopApp mit optionalem BackendStack. Domänengetrieben (DDD), Kotlin Multiplatform.
[![CI/CD Pipeline](https://git.mo-code.at/mocode-software/meldestelle/actions/workflows/docker-publish.yaml/badge.svg)](https://git.mo-code.at/mocode-software/meldestelle/actions)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
---
## 📚 Dokumentation — Single Source of Truth
Die gesamte Projektdokumentation (Architektur, Fachdomäne, Entwickler-Anleitungen) befindet sich im `/docs`-Verzeichnis.
**Starte hier:** [**→ docs/README.md**](./docs/README.md)
| Bereich | Inhalt |
|-----------------------------------------------|---------------------------------------------|
| [01_Architecture](./docs/01_Architecture) | Master Roadmap, ADRs, C4Modelle, DesktopKonzept |
| [02_Guides](./docs/02_Guides) | Setup-Anleitungen, Entwickler-Guidelines |
| [03_Domain](./docs/03_Domain) | Fachlichkeit, Turnierregeln, Entities |
| [07_Infrastructure](./docs/07_Infrastructure) | Docker, Keycloak, CI/CD, Zora-Infrastruktur |
Wesentliche Architektur-Referenz: [OfflineFirst Desktop & Backend (Kurzkonzept)](./docs/01_Architecture/konzept-offline-first-desktop-backend-de.md)
---
## 🖥️ Primärer Fokus: DesktopApp
- Compose Multiplatform (JVM Desktop) als primäre Zielplattform
- OfflineFirst: Lokale SQLDelightDB, Synchronisation optional
- MultiTenantBackend optional für Sync/Verwaltung (SchemaperTenant, vgl. ADR0021)
## 🏗️ Tech Stack (aktueller Stand)
| Schicht | Technologie |
|-----------------------|---------------------------------------------------|
| **Frontend (primär)** | Kotlin Multiplatform (KMP), Compose Multiplatform |
| **Backend** | Kotlin (Ktor/Spring Boot), Spring Cloud Gateway |
| **Datenbank** | SQLDelight (lokal), PostgreSQL (Backend) |
| **Auth** | Keycloak (OAuth2 / OIDC) |
| **Cache** | Valkey |
| **Service Discovery** | Consul |
| **Tracing** | Zipkin |
| **CI/CD** | Gitea Actions + Gitea Registry |
| **Infrastruktur** | Proxmox VE, Docker Compose, Pangolin Tunnel |
---
## 🚀 Quick Start (lokale Entwicklung)
Empfohlen: Starte die DesktopApp direkt aus dem Repo. Der BackendStack ist optional und wird nur für Sync/Integration benötigt.
### A) DesktopApp starten (ohne Backend)
Voraussetzungen: JDK 21+, aktuelle Gradle Wrapper verwendet.
```bash
# DesktopShell ausführen (Compose Desktop)
./gradlew :frontend:shells:meldestelle-desktop:run
```
Hinweise:
- Beim ersten Start wird die lokale Datenbank initialisiert (OfflineFirst).
- Architektur-Referenz: `docs/06_Frontend/MVVM_UDF_Pattern.md` (UDF/MVVM für ViewModels)
### B) Optional: BackendStack per Docker starten
```bash
# 1. Umgebungsvariablen (nur beim ersten Mal)
cp .env.example .env || true
# 2. Infrastruktur (Postgres, Keycloak, Valkey, Consul, Zipkin)
docker compose -f docker-compose.yaml -f dc-infra.yaml up -d
# 3. BackendServices (Gateway, Masterdata, Ping, …)
docker compose -f docker-compose.yaml -f dc-backend.yaml up -d
# 4. OpsStack (Prometheus, Grafana)
docker compose -f docker-compose.yaml -f dc-ops.yaml up -d
# 5. Optional: WebShell
docker compose -f docker-compose.yaml -f dc-gui.yaml up -d
```
> ⚠️ Reihenfolge beachten: Infra muss `healthy` sein, bevor Backend gestartet wird. Keycloak benötigt ~6090 Sekunden.
---
## 🧭 Legacy (V1) Hinweise
- Ältere V1Abschnitte/Anleitungen (WebFirst/MicroservicesOnly) gelten als DEPRECATED.
- Verwende für lokale Entwicklung primär die DesktopApp (siehe Quick Start). DockerStacks sind optional für Integration/Sync.
- In der Doku sind V1Seiten entsprechend markiert oder werden sukzessive bereinigt (siehe Roadmaps Sprint C4).
### Wichtige lokale Ports
| Service | URL |
|----------------|-----------------------|
| API-Gateway | http://localhost:8081 |
| Keycloak Admin | http://localhost:8180 |
| Consul UI | http://localhost:8500 |
| Grafana | http://localhost:3000 |
| Zipkin | http://localhost:9411 |
---
## 🤝 Beitragen
Beiträge sind willkommen. Bitte lies zunächst die Entwickler-Guides unter [`docs/02_Guides`](./docs/02_Guides).
---
## 📜 Lizenz
Dieses Projekt steht unter der [MIT License](LICENSE).