- **Billing Domain:**
- Added Kotlin Multiplatform project with domain models (`TeilnehmerKonto`, `Buchung`, `BuchungsTyp`) to represent billing entities.
- Defined serialization strategies using `InstantSerializer`.
- **Service Implementation:**
- Introduced `BillingServiceApplication` as the main entry point for the billing service.
- Developed `TeilnehmerKontoService` for account management and transactions.
- **Persistence Layer:**
- Implemented Exposed repositories (`ExposedTeilnehmerKontoRepository`, `ExposedBillingRepositories`) for database interaction.
- Added table definitions (`TeilnehmerKontoTable`, `BuchungTable`) with indexes for efficient querying.
- **Build Configuration:**
- Setup Gradle build files for billing domain and service modules with dependencies for Kotlin, Serialization, Spring Boot, and Exposed.
- **Test Additions:**
- Extended ZNS importer tests with new scenarios for qualification parsing
- **Domain Updates:**
- Introduced `AbteilungsWarnung` entity for structured warning handling compliant with ÖTO § 39.
- Added validation rules for mandatory and optional division thresholds and structural completeness.
- Implemented `CompetitionWarningService` and `AbteilungsRegelService` for domain-centric validations.
- Updated domain models (`Bewerb`, `Abteilung`) to reflect structured warning logic.
- **Services:**
- Expanded `BewerbService` to include warning validation through `CompetitionWarningService`.
- **Frontend Enhancements:**
- Updated `TurnierBewerbeTab` to display warnings using tooltips with clear descriptions and structured formatting.
- Modified `BewerbUiModel` to handle warnings and integrate them into the UI.
- **Persistence:**
- Implemented `CompetitionRepositoryImpl` to map database rows to the new domain models and validation logic.
- **Testing:**
- Added comprehensive unit tests for `validateStrukturellesTeilung` and division-specific warnings.
- Enhanced existing tests to validate the new warning structure and code-based assertions.
- **Docs:**
- Updated roadmap to reflect the completion of structural warnings implementation.
- **Core Updates:**
- Expanded `SyncEvent` model with additional fields (`eventId`, `sequenceNumber`, `originNodeId`, `createdAt`, `checksum`, `schemaVersion`) for improved event tracking and validation.
- Updated event classes (`PingEvent`, `PongEvent`, `DataChangedEvent`, `DataRequestEvent`) to align with the extended `SyncEvent`.
- **Frontend Enhancements:**
- Enhanced `BewerbViewModel` to handle sync events (`PingEvent`, `DataChangedEvent`) and observe connected peers using `SyncManager`.
- Added support for
- Removed unnecessary imports across multiple modules for cleaner code.
- Updated `kotlinx.coroutines.delay` to use `Duration.milliseconds` for improved readability and type safety in `SyncManager`.
- **Core Updates:**
- Implemented `P2pSyncService` interface with platform-specific WebSocket implementations (`JvmP2pSyncService` and no-op for JS).
- Developed `SyncEvent` sealed class hierarchy to handle peer synchronization events (e.g., `PingEvent`, `PongEvent`, `DataChangedEvent`, etc.).
- **Frontend Integration:**
- Introduced `SyncManager` to manage peer discovery and synchronization, coupled with `NetworkDiscoveryService`.
- Updated dependency injection to include `syncModule` for platform-specific sync service initialization.
- Enhanced `BewerbViewModel` to support new sync capabilities, including observing sync events and UI updates for connected peers.
- **Backend Enhancements:**
- Added ZNS-specific fields (`zns_nummer`, `zns_abteilung`) to Bewerb table for idempotent imports.
- Introduced import ZNS logic to handle duplicates and align with SyncManager updates.
- **UI Improvements:**
- Enhanced `TurnierBewerbeTab` with updated dialogs (ZNS imports, sync status) and dynamic previews.
- Improved network syncing feedback and error handling in frontend components.
- **DB Changes:**
- Added migration for new column fields in the Bewerb table with relevant indexing for ZNS import optimizations.
- **Network Discovery Service:**
- Added platform-specific `DiscoveryModule` with JmDNS-based `JmDnsDiscoveryService` for JVM and no-op implementation for JS.
- Implemented service and device discovery using mDNS to enable peer-to-peer synchronization within LAN.
- Registered the module in Koin for dependency injection and integrated it with `networkModule`.
- **Frontend Integration:**
- Enhanced `BewerbViewModel` with intents and actions for starting, stopping, and refreshing network scans.
- Introduced polling for discovered services during an active scan.
- **UI Additions:**
- Added a `NetworkDiscoveryPanel` in `TurnierBewerbeTab` to display discovered services and indicate scan state.
- Updated action buttons to include toggle functionality for network scans.
- **StartlistenRepository:**
- Introduced a new repository for generating and retrieving start lists, with `DefaultStartlistenRepository` implementation for remote API integration.
- **Bewerb Enhancements:**
- Updated `Bewerb` and `BewerbDto` models to include additional details (e.g., `tag`, `platz`, `sparte`, etc.).
- Adjusted mappers to align with model updates.
- **ViewModel Updates:**
- Extended `BewerbViewModel` to integrate with `StartlistenRepository` for start list generation and preview.
- Refactored loading logic in `BewerbViewModel` to display errors and handle repository responses properly.
- **UI Enhancements:**
- Improved start list preview layout in `TurnierBewerbeTab` with additional styling and dynamic fields.
- Added buttons to confirm or cancel start list changes in the preview modal.
- **Dependency Injection:**
- Registered `DefaultStartlistenRepository` in the `TurnierFeatureModule` and updated `BewerbViewModel` factory.
- Consolidated `material3` imports in `CreateBewerbWizardScreen` and `TurnierBewerbeTab` for cleaner code.
- Switched `WizardStep.values()` to `WizardStep.entries.toTypedArray()` for improved readability.
- Changed `kotlinx.coroutines.delay` argument to use `Duration.milliseconds` for enhanced clarity and type safety.
- **Parser Implementation:**
- Introduced `ZnsBewerbParser` to parse n2-XXXXX.dat files and map B-Satz lines to the `ZnsBewerb` domain model.
- Added test coverage for parsing B-Satz lines and edge cases in `ZnsParserTest`.
- **Frontend Integration:**
- Integrated ZNS import functionality into the `BewerbeTabContent` for uploading and previewing Bewerb data before import.
- Enhanced `BewerbViewModel` with state and intents for managing ZNS import, preview dialogs, and import confirmation.
- Supported start list generation and added modal for previewing generated start lists.
- **Domain Services:**
- Implemented `StartlistenService` to generate and calculate start times for start lists with respect to participant preferences.
- Added extensive test coverage in `StartlistenServiceTest` to validate sorting, preferences, and time calculations.
- **UI Enhancements:**
- Updated `Bewerbe` tab layout with search, filtering, and action buttons for ZNS import and start list generation.
- Introduced dialogs for ZNS import previews and start list previews.
- Created `Navigation_Wizard_Flows.drawio` to map the Navigation Rail and 3-step wizard process (Veranstaltung → Turnier → Bewerbe) with detailed routes and guards.
- Introduced `_mapping_alt-zu-neu.md` to document screenshot renaming and restructuring for enhanced organization.
- Refined folder layout in `docs/06_Frontend/Screenshots/` for flows and components.
- Replaced outdated `.puml` and `.mermaid` diagrams with modernized `.drawio` versions for enhanced clarity.
- Added `container_diagram.drawio` to depict offline-first architecture and backend synchronization workflow.
- Introduced `workflow_turnieranlage.drawio` to visualize the tournament creation process (3-step wizard).
- Archived legacy diagrams under `docs/01_Architecture/_archive` for reference.
- Replaced outdated `.puml` and `.mermaid` diagrams with modernized `.drawio` versions for enhanced clarity.
- Added `container_diagram.drawio` to depict offline-first architecture and backend synchronization workflow.
- Introduced `workflow_turnieranlage.drawio` to visualize the tournament creation process (3-step wizard).
- Archived legacy diagrams under `docs/01_Architecture/_archive` for reference.
- Created `class_diagram_core.drawio` to visualize core domain entities (`Veranstaltung`, `Platz`, `Turnier`, etc.).
- Included relationships and associations between entities such as 1:N and reference mappings.
- Structured diagram to align with Clean Architecture principles for better domain comprehension.
- Created `class_diagram_core.drawio` to visualize core domain entities (`Veranstaltung`, `Platz`, `Turnier`, etc.).
- Included relationships and associations between entities such as 1:N and reference mappings.
- Structured diagram to align with Clean Architecture principles for better domain comprehension.
- Introduced `Kernentitaeten_Umbenennung.puml` to document the planned renaming and structural updates to core domain entities.
- Visualized key contexts (`Event Management`, `Billing`, `Competition`, `Registration`, `Actor`) and their relationships.
- Included recommendations for simplification of naming conventions in Clean Architecture.
- Logged additional ideas in `Chat-Verlauf-Gemini_2026-04-07.md` regarding visualizing hierarchy, inheritance, and class structure.
- Documented discussion on reevaluating "Dom..." class prefixes and planning for implementation steps.
- Standardized section headers in `Chat-Verlauf-Gemini_2026-04-07.md` for better clarity.
- Adjusted markdown formatting for participant labels ("Ich", "Gemini") to ensure consistent separation and readability.
- Leveraged markdown lists to enhance the readability of ÖTO § 3 guidelines and constraints.
- Resolved minor inconsistencies in indentation to ensure visual alignment across all sections.
- **Domain Enhancements:**
- Introduced `TurnierNummer` (mandatory, 5 digits) field in `DomTurnier` to establish unique tournament identification.
- Added `TeilnehmerKreisE` enum representing participation constraints defined in ÖTO § 3 (e.g., J, P, H).
- Extended `DomTurnier` model with `einschraenkungen` field to store applicable participant restrictions.
- **Infrastructure Updates:**
- Updated `TurnierTable` to include `turnier_nummer` (varchar) and `einschraenkungen` (text/JSON).
- Created Flyway migration to add new columns to `turniere` table and backfill existing data.
- Enhanced repository methods (`TurnierRepositoryImpl`) to handle the new fields.
- **Validation and API Expansion:**
- Added validation for mandatory 5-digit format of `TurnierNummer` and ensured `einschraenkungen` values conform to the ÖTO spec.
- Updated relevant APIs (`CreateTurnierUseCase`, `TurniereController`) to accept and process new fields.
- **Documentation:**
- Updated the glossary in `Ubiquitous_Language.md` to include new concepts (`TurnierNummer` and participation constraints).
This enhancement lays the groundwork for ÖTO-compliant tournament management with precise scope and constraint controls.
- Standardized table layouts by aligning column headers and content across all alphabetical sections.
- Improved text organization and adjusted spacing for better readability.
- Retained all existing references and definitions without modifications to their meaning.
- **Database Changes:** Introduced `turnier_nummer` (mandatory, 5 digits) and `einschraenkungen` (mandatory, ÖTO-specific constraints) columns in `turniere` table. Seeded `turnier_nummer` with `oeps_turniernummer` where applicable.
- **Domain Models:** Extended `Turnier` and `DomTurnier` with `turnierNummer` and `einschraenkungen` fields. Added `TeilnehmerKreisE` enum for mapping restriction types.
- **Services and Controllers:** Updated repository and service operations to handle the new fields. Controllers reflect the new request models for creation and updates.
- **Validation:** Enforced input validation for `turnierNummer` format and `einschraenkungen` values.
Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>