# dtcanal/uclmultileagueapp architecture

> Architecture diagram of the GitHub repository dtcanal/uclmultileagueapp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dtcanal/uclmultileagueapp
- Repository: https://github.com/dtcanal/uclmultileagueapp

## Overview

1. This is a .NET desktop application, most likely WPF, organized in a layered architecture with clear separation between UI, application orchestration, domain contracts/models, and infrastructure implementations.

2. The UI layer lives under `UI/` and contains the WPF view (`UI/View/UCLMultilig.xaml`), its `UCLMultiligViewModel`, custom commands, behaviors, converters, validation rules, and a `WindowFactory`. This layer is responsible for presentation state, binding, and user interaction only.

3. The application layer under `Application/` coordinates long-running business workflows. It is split into jobs and services, with separate paths for UCL ranking and UCL schedule handling. These services likely orchestrate fetching data, maintaining state, and pushing updates to the UI or external systems.

4. Job execution is handled through Quartz: `Application/JobListener/QuartzJobListener.cs` and the job classes under `Application/Jobs/`. The job layer suggests scheduled or recurring background processing rather than purely user-triggered actions.

5. The core layer under `Core/` defines the app’s contracts and models. Interfaces like `IRankingServiceUCL`, `IScheduleService`, `IPing`, `ILoggerService`, and observer interfaces define the boundaries between business logic and implementations. Models such as `Match`, `Team`, `UCLRankingModel`, and `UCLScheduleModel` represent the shared data shape across layers.

6. The infrastructure layer under `Infrastructure/` provides concrete implementations for those core interfaces. It includes services for UCL ranking, UCL schedules, commentators, pinging, logging, and job rescheduling. This is where integration details are concentrated.

7. External-facing integration appears to include at least a Vizrt client (`Infrastructure/VizrtClient/`) and a “main server” ping/reporting flow (`IPingMainServer`, `PingService`). That suggests the app consumes or synchronizes sports data and then publishes commands or state to downstream broadcast/graphics systems.

8. Configuration is centralized in `Infrastructure/Configurations/` and `Infrastructure/Settings/`. The presence of settings for data paths, job intervals, UCL ranking, UCL schedule, and Vizrt servers indicates the runtime behavior is strongly environment-driven.

9. State management is split by domain. For ranking there is `RankingStateService`, observer services, and both live and manual ranking services. For schedules there are schedule match app/observer services. This implies a publish/subscribe or observer-style update flow from fetched data to UI/state consumers.

10. Logging and error handling are also infrastructure concerns. `ILoggerService` plus `DeafultLoggerService`/`LoggerService` handle diagnostics, while `Infrastructure/Exceptions` and the `Result` helper indicate explicit result/error propagation across service boundaries.

11. The app uses typical WPF support pieces: converters for display formatting, validation rules, behaviors, and a relay command implementation. Those are supporting UI mechanisms, not business logic, but they shape how view state is transformed and interacted with.

12. Build and deployment are desktop-oriented. The repo includes a `.sln`, `.csproj`, GitHub Actions workflow for desktop builds, and an Inno Setup installer script (`InnoInstaller.iss`), which indicates the output is packaged as an installable Windows application rather than deployed as a web service.

13. For an architecture diagram, the main flow is: WPF view → view model → application services/jobs → core interfaces/models → infrastructure implementations → external systems such as live ranking sources, schedules, logger/ping endpoints, and Vizrt. The key boundaries are UI vs orchestration vs contract vs implementation.

Main entry points: [`Application/Services/UCLRankingService/UCLRankingLiveAppService.cs`](https://github.com/dtcanal/uclmultileagueapp/blob/master/Application/Services/UCLRankingService/UCLRankingLiveAppService.cs) (Ranking AppSvc), [`UI/ViewModels/UCLMultiligViewModel.cs`](https://github.com/dtcanal/uclmultileagueapp/blob/master/UI/ViewModels/UCLMultiligViewModel.cs) (Main VM), [`Application/Services/UCLScheduleMatchesService/UCLScheduleMatchesAppService.cs`](https://github.com/dtcanal/uclmultileagueapp/blob/master/Application/Services/UCLScheduleMatchesService/UCLScheduleMatchesAppService.cs) (Schedule AppSvc), [`Core/Models/Match/Match.cs`](https://github.com/dtcanal/uclmultileagueapp/blob/master/Core/Models/Match/Match.cs) (Domain Models)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["UI"]
  node_app_shell(("App Shell<br/>WPF entrypoint<br/>[App.xaml]"))
  node_main_view["Main View<br/>WPF view<br/>[UCLMultilig.xaml]"]
  node_main_vm["Main VM<br/>view model"]
  node_ui_support["UI Support<br/>bindings/helpers<br/>[RelayCommand.cs]"]
end

subgraph group_application["Application"]
  node_job_listener["Job Listener<br/>Quartz hook"]
  node_ranking_job["Ranking Job<br/>scheduled job<br/>[RankingLIve.cs]"]
  node_schedule_job["Schedule Job<br/>scheduled job"]
  node_ranking_app["Ranking AppSvc<br/>orchestrator"]
  node_ranking_state["Ranking State<br/>state service"]
  node_ranking_obs["Ranking Observer<br/>observer service"]
  node_schedule_app["Schedule AppSvc<br/>orchestrator"]
  node_schedule_obs["Schedule Observer<br/>observer service"]
end

subgraph group_core["Core"]
  node_ranking_contracts["Ranking Contracts<br/>interfaces"]
  node_schedule_contracts["Schedule Contracts<br/>interfaces"]
  node_general_contracts["General Contracts<br/>interfaces<br/>[IPing.cs]"]
  node_domain_models[("Domain Models<br/>[Match.cs]")]
end

subgraph group_infrastructure["Infrastructure"]
  node_ranking_infra["Ranking Infra<br/>service impls"]
  node_schedule_infra["Schedule Infra<br/>service impls"]
  node_ops_infra["Ops Services<br/>runtime services<br/>[LoggerService.cs]"]
  node_vizrt_client["Vizrt Client<br/>integration client"]
  node_config_runtime["Runtime Config<br/>settings"]
end

subgraph group_build["Build"]
  node_desktop_build["Desktop Build<br/>solution packaging"]
end

node_app_shell -->|"hosts"| node_main_view
node_main_view -->|"binds to"| node_main_vm
node_main_vm -->|"uses"| node_ui_support
node_main_vm -->|"invokes"| node_ranking_app
node_main_vm -->|"invokes"| node_schedule_app
node_ranking_job -->|"notified by"| node_job_listener
node_schedule_job -->|"notified by"| node_job_listener
node_ranking_job -->|"runs"| node_ranking_app
node_schedule_job -->|"runs"| node_schedule_app
node_ranking_app -->|"updates"| node_ranking_state
node_ranking_app -->|"publishes"| node_ranking_obs
node_schedule_app -->|"publishes"| node_schedule_obs
node_ranking_app -->|"depends on"| node_ranking_contracts
node_schedule_app -->|"depends on"| node_schedule_contracts
node_ranking_state -->|"stores"| node_domain_models
node_schedule_obs -->|"emits"| node_domain_models
node_ranking_infra -->|"implements"| node_ranking_contracts
node_schedule_infra -->|"implements"| node_schedule_contracts
node_ops_infra -->|"implements"| node_general_contracts
node_ops_infra -->|"reads"| node_config_runtime
node_ranking_infra -->|"drives"| node_vizrt_client
node_schedule_infra -->|"drives"| node_vizrt_client
node_ranking_infra -->|"maps"| node_domain_models
node_schedule_infra -->|"maps"| node_domain_models
node_desktop_build -->|"packages"| node_app_shell

click node_app_shell "https://github.com/dtcanal/uclmultileagueapp/blob/master/App.xaml"
click node_main_view "https://github.com/dtcanal/uclmultileagueapp/blob/master/UI/View/UCLMultilig.xaml"
click node_main_vm "https://github.com/dtcanal/uclmultileagueapp/blob/master/UI/ViewModels/UCLMultiligViewModel.cs"
click node_ui_support "https://github.com/dtcanal/uclmultileagueapp/blob/master/UI/Commands/RelayCommand.cs"
click node_job_listener "https://github.com/dtcanal/uclmultileagueapp/blob/master/Application/JobListener/QuartzJobListener.cs"
click node_ranking_job "https://github.com/dtcanal/uclmultileagueapp/blob/master/Application/Jobs/UCLRankingLive/RankingLIve.cs"
click node_schedule_job "https://github.com/dtcanal/uclmultileagueapp/blob/master/Application/Jobs/UCLSchedules/UCLScheduleMatches.cs"
click node_ranking_app "https://github.com/dtcanal/uclmultileagueapp/blob/master/Application/Services/UCLRankingService/UCLRankingLiveAppService.cs"
click node_ranking_state "https://github.com/dtcanal/uclmultileagueapp/blob/master/Application/Services/UCLRankingService/RankingStateService.cs"
click node_ranking_obs "https://github.com/dtcanal/uclmultileagueapp/blob/master/Application/Services/UCLRankingService/UCLRankingObserverService.cs"
click node_schedule_app "https://github.com/dtcanal/uclmultileagueapp/blob/master/Application/Services/UCLScheduleMatchesService/UCLScheduleMatchesAppService.cs"
click node_schedule_obs "https://github.com/dtcanal/uclmultileagueapp/blob/master/Application/Services/UCLScheduleMatchesService/UCLScheduleMatchesObserverService.cs"
click node_ranking_contracts "https://github.com/dtcanal/uclmultileagueapp/blob/master/Core/Interfaces/UCL/Ranking/IRankingServiceUCL.cs"
click node_schedule_contracts "https://github.com/dtcanal/uclmultileagueapp/blob/master/Core/Interfaces/UCL/Schedule/IScheduleService.cs"
click node_general_contracts "https://github.com/dtcanal/uclmultileagueapp/blob/master/Core/Interfaces/General/IPing.cs"
click node_domain_models "https://github.com/dtcanal/uclmultileagueapp/blob/master/Core/Models/Match/Match.cs"
click node_ranking_infra "https://github.com/dtcanal/uclmultileagueapp/blob/master/Infrastructure/Services/UCLRankingService/UCLRankingServiceLive.cs"
click node_schedule_infra "https://github.com/dtcanal/uclmultileagueapp/blob/master/Infrastructure/Services/UCLScheduleService/UCLScheduleService.cs"
click node_ops_infra "https://github.com/dtcanal/uclmultileagueapp/blob/master/Infrastructure/Services/Logger/LoggerService.cs"
click node_vizrt_client "https://github.com/dtcanal/uclmultileagueapp/blob/master/Infrastructure/VizrtClient/VizrtCommandBuilder.cs"
click node_config_runtime "https://github.com/dtcanal/uclmultileagueapp/blob/master/Infrastructure/Configurations/ConfigurationUCLRanking.cs"
click node_desktop_build "https://github.com/dtcanal/uclmultileagueapp/blob/master/UCLMultileagueApp.sln"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app_shell,node_main_view,node_main_vm,node_ui_support toneBlue
class node_job_listener,node_ranking_job,node_schedule_job,node_ranking_app,node_ranking_state,node_ranking_obs,node_schedule_app,node_schedule_obs toneAmber
class node_ranking_contracts,node_schedule_contracts,node_general_contracts,node_domain_models toneMint
class node_ranking_infra,node_schedule_infra,node_ops_infra,node_vizrt_client,node_config_runtime toneRose
class node_desktop_build toneIndigo
```

## Components

### UI

WPF presentation, binding, and interaction layer

- [App Shell](https://github.com/dtcanal/uclmultileagueapp/blob/master/App.xaml): WPF entrypoint · Application startup and WPF host wiring · `App.xaml`
- [Main View](https://github.com/dtcanal/uclmultileagueapp/blob/master/UI/View/UCLMultilig.xaml): WPF view · Primary desktop UI for multileague workflows · `UI/View/UCLMultilig.xaml`
- [Main VM](https://github.com/dtcanal/uclmultileagueapp/blob/master/UI/ViewModels/UCLMultiligViewModel.cs): view model · Presentation state and command coordination · `UI/ViewModels/UCLMultiligViewModel.cs`
- [UI Support](https://github.com/dtcanal/uclmultileagueapp/blob/master/UI/Commands/RelayCommand.cs): bindings/helpers · Commands, converters, behaviors, validation, and window factory · `UI/Commands/RelayCommand.cs`

### Application

Workflow orchestration and scheduled jobs

- [Job Listener](https://github.com/dtcanal/uclmultileagueapp/blob/master/Application/JobListener/QuartzJobListener.cs): Quartz hook · Receives Quartz job lifecycle events · `Application/JobListener/QuartzJobListener.cs`
- [Ranking Job](https://github.com/dtcanal/uclmultileagueapp/blob/master/Application/Jobs/UCLRankingLive/RankingLIve.cs): scheduled job · Recurring UCL ranking execution · `Application/Jobs/UCLRankingLive/RankingLIve.cs`
- [Schedule Job](https://github.com/dtcanal/uclmultileagueapp/blob/master/Application/Jobs/UCLSchedules/UCLScheduleMatches.cs): scheduled job · Recurring UCL schedule execution · `Application/Jobs/UCLSchedules/UCLScheduleMatches.cs`
- [Ranking AppSvc](https://github.com/dtcanal/uclmultileagueapp/blob/master/Application/Services/UCLRankingService/UCLRankingLiveAppService.cs): orchestrator · Coordinates ranking workflow and state updates · `Application/Services/UCLRankingService/UCLRankingLiveAppService.cs`
- [Ranking State](https://github.com/dtcanal/uclmultileagueapp/blob/master/Application/Services/UCLRankingService/RankingStateService.cs): state service · Holds and publishes ranking state · `Application/Services/UCLRankingService/RankingStateService.cs`
- [Ranking Observer](https://github.com/dtcanal/uclmultileagueapp/blob/master/Application/Services/UCLRankingService/UCLRankingObserverService.cs): observer service · Bridges ranking updates to consumers · `Application/Services/UCLRankingService/UCLRankingObserverService.cs`
- [Schedule AppSvc](https://github.com/dtcanal/uclmultileagueapp/blob/master/Application/Services/UCLScheduleMatchesService/UCLScheduleMatchesAppService.cs): orchestrator · Coordinates schedule workflow and state updates · `Application/Services/UCLScheduleMatchesService/UCLScheduleMatchesAppService.cs`
- [Schedule Observer](https://github.com/dtcanal/uclmultileagueapp/blob/master/Application/Services/UCLScheduleMatchesService/UCLScheduleMatchesObserverService.cs): observer service · Bridges schedule updates to consumers · `Application/Services/UCLScheduleMatchesService/UCLScheduleMatchesObserverService.cs`

### Core

Shared contracts and models

- [Ranking Contracts](https://github.com/dtcanal/uclmultileagueapp/blob/master/Core/Interfaces/UCL/Ranking/IRankingServiceUCL.cs): interfaces · Ranking service, state, observer, and manual/live contracts · `Core/Interfaces/UCL/Ranking/IRankingServiceUCL.cs`
- [Schedule Contracts](https://github.com/dtcanal/uclmultileagueapp/blob/master/Core/Interfaces/UCL/Schedule/IScheduleService.cs): interfaces · Schedule service, observer, and match contracts · `Core/Interfaces/UCL/Schedule/IScheduleService.cs`
- [General Contracts](https://github.com/dtcanal/uclmultileagueapp/blob/master/Core/Interfaces/General/IPing.cs): interfaces · Ping, settings, logging, and commentator contracts · `Core/Interfaces/General/IPing.cs`
- [Domain Models](https://github.com/dtcanal/uclmultileagueapp/blob/master/Core/Models/Match/Match.cs): models · Matches, teams, rankings, schedules, and shared results · `Core/Models/Match/Match.cs`

### Infrastructure

Concrete services, integrations, and runtime configuration

- [Ranking Infra](https://github.com/dtcanal/uclmultileagueapp/blob/master/Infrastructure/Services/UCLRankingService/UCLRankingServiceLive.cs): service impls · Live and manual ranking implementations · `Infrastructure/Services/UCLRankingService/UCLRankingServiceLive.cs`
- [Schedule Infra](https://github.com/dtcanal/uclmultileagueapp/blob/master/Infrastructure/Services/UCLScheduleService/UCLScheduleService.cs): service impls · UCL schedule and standing match implementations · `Infrastructure/Services/UCLScheduleService/UCLScheduleService.cs`
- [Ops Services](https://github.com/dtcanal/uclmultileagueapp/blob/master/Infrastructure/Services/Logger/LoggerService.cs): runtime services · Logging, pinging, rescheduling, and commentator services · `Infrastructure/Services/Logger/LoggerService.cs`
- [Vizrt Client](https://github.com/dtcanal/uclmultileagueapp/blob/master/Infrastructure/VizrtClient/VizrtCommandBuilder.cs): integration client · Command builder and Vizrt-facing integration · `Infrastructure/VizrtClient/VizrtCommandBuilder.cs`
- [Runtime Config](https://github.com/dtcanal/uclmultileagueapp/blob/master/Infrastructure/Configurations/ConfigurationUCLRanking.cs): settings · Configuration objects and option settings · `Infrastructure/Configurations/ConfigurationUCLRanking.cs`

### Build

Desktop packaging and CI

- [Desktop Build](https://github.com/dtcanal/uclmultileagueapp/blob/master/UCLMultileagueApp.sln): solution packaging · CI workflow, solution/project, and installer packaging · `UCLMultileagueApp.sln`

## Connections

- App Shell → Main View: hosts · WPF shell loads the main view
- Main View → Main VM: binds to · View is driven by the main view model
- Main VM → UI Support: uses · View model relies on commands and UI helpers
- Main VM → Ranking AppSvc: invokes · Presentation actions trigger ranking workflows
- Main VM → Schedule AppSvc: invokes · Presentation actions trigger schedule workflows
- Ranking Job → Job Listener: notified by · Quartz job execution is observed centrally
- Schedule Job → Job Listener: notified by · Quartz job execution is observed centrally
- Ranking Job → Ranking AppSvc: runs · Scheduled ranking work enters the ranking orchestrator
- Schedule Job → Schedule AppSvc: runs · Scheduled schedule work enters the schedule orchestrator
- Ranking AppSvc → Ranking State: updates · Ranking orchestrator mutates shared ranking state
- Ranking AppSvc → Ranking Observer: publishes · Ranking changes are pushed through observers
- Schedule AppSvc → Schedule Observer: publishes · Schedule changes are pushed through observers
- Ranking AppSvc → Ranking Contracts: depends on · Orchestrator is defined by core ranking contracts
- Schedule AppSvc → Schedule Contracts: depends on · Orchestrator is defined by core schedule contracts
- Ranking State → Domain Models: stores · Shared ranking data uses core models
- Schedule Observer → Domain Models: emits · Schedule flow uses shared domain models
- Ranking Infra → Ranking Contracts: implements · Infrastructure provides ranking contract implementations
- Schedule Infra → Schedule Contracts: implements · Infrastructure provides schedule contract implementations
- Ops Services → General Contracts: implements · Operational services satisfy general contracts
- Ops Services → Runtime Config: reads · Operational behavior is configured at runtime
- Ranking Infra → Vizrt Client: drives · Ranking updates can be translated into Vizrt commands
- Schedule Infra → Vizrt Client: drives · Schedule updates can be translated into Vizrt commands
- Ranking Infra → Domain Models: maps · Implementation works with shared domain models
- Schedule Infra → Domain Models: maps · Implementation works with shared domain models
- Desktop Build → App Shell: packages · Build and installer target the desktop app entrypoint
