# hayriozler/billiardiq architecture

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

- Interactive diagram: https://gitdiagram.com/hayriozler/billiardiq
- Repository: https://github.com/hayriozler/billiardiq

## Overview

BilliardIQ is a billiards scoring and club-management platform spanning a local scoreboard client, a web service, and a mobile app. Its main flow is mobile or scoreboard use of match/scoring features, with the client synchronizing scoreboard data and the web app providing organization, account, and management capabilities. The tree also shows mobile table-vision analysis and player statistics. Evidence is limited: the README is empty, and several major modules are unsampled, so the graph keeps links conservative rather than assuming unshown routes or calls.

Main entry points: [`Scoreboard.Client/Program.cs`](https://github.com/hayriozler/billiardiq/blob/main/Scoreboard.Client/Program.cs) (Scoreboard app), [`mobile/BilliardIQ.Mobile/App.xaml.cs`](https://github.com/hayriozler/billiardiq/blob/main/mobile/BilliardIQ.Mobile/App.xaml.cs) (Mobile app), [`Scoreboard.WebApp/Data/DataContext.cs`](https://github.com/hayriozler/billiardiq/blob/main/Scoreboard.WebApp/Data/DataContext.cs) (Web data context), [`Scoreboard.WebApp/Domain/Mobile.cs`](https://github.com/hayriozler/billiardiq/blob/main/Scoreboard.WebApp/Domain/Mobile.cs) (Mobile domain)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_scoreboard["Scoreboard client"]
  node_client_app["Scoreboard app<br/>[Program.cs]"]
  node_client_pull["Remote pull"]
  node_client_sync["Remote sync"]
  node_client_store[("Local scoreboard data<br/>[DataContext.cs]")]
  node_power["Power controls"]
end

subgraph group_server["Web platform"]
  node_web_app["Web service<br/>[Program.cs]"]
  node_auth_endpoints["Authentication routes<br/>[AuthEndpoints.cs]"]
  node_mobile_auth["Mobile authentication"]
end

subgraph group_mobile["Mobile app"]
  node_mobile_app["Mobile app<br/>[App.xaml.cs]"]
  node_mobile_auth_client["Mobile sign-in<br/>[AuthService.cs]"]
  node_game_repo[("Game storage<br/>[GameRepository.cs]")]
  node_table_vision["Table vision"]
  node_ball_detector["Ball detection"]
  node_localization["Mobile localization"]
end

subgraph group_data["Persistence and domain"]
  node_web_data[("Web data context<br/>[DataContext.cs]")]
  node_org_domain["Organization model<br/>[Organization.cs]"]
  node_mobile_domain["Mobile domain<br/>[Mobile.cs]"]
end

node_operator(("Club staff"))
node_player(("Player"))

node_operator -.->|"uses"| node_client_app
node_client_app -->|"hosts"| node_client_pull
node_client_app -->|"hosts"| node_client_sync
node_client_app -->|"registers"| node_power
node_client_pull -->|"updates"| node_client_store
node_client_sync -.->|"syncs"| node_client_store
node_client_app -.->|"serves UI"| node_web_app
node_web_app -.->|"hosts routes"| node_auth_endpoints
node_auth_endpoints -.->|"authenticates"| node_mobile_auth
node_mobile_auth -->|"reads/writes"| node_web_data
node_web_data -->|"maps"| node_org_domain
node_web_data -->|"maps"| node_mobile_domain
node_player -.->|"uses"| node_mobile_app
node_mobile_app -.->|"provides sign-in"| node_mobile_auth_client
node_mobile_auth_client -->|"uses API types"| node_mobile_domain
node_mobile_app -.->|"stores games"| node_game_repo
node_game_repo -->|"uses model"| node_mobile_domain
node_table_vision -->|"delegates detection"| node_ball_detector
node_mobile_app -.->|"uses translations"| node_localization

click node_client_app "https://github.com/hayriozler/billiardiq/blob/main/Scoreboard.Client/Program.cs"
click node_client_pull "https://github.com/hayriozler/billiardiq/blob/main/Scoreboard.Client/Services/RemotePullService.cs"
click node_client_sync "https://github.com/hayriozler/billiardiq/blob/main/Scoreboard.Client/Services/RemoteSyncService.cs"
click node_client_store "https://github.com/hayriozler/billiardiq/blob/main/Scoreboard.Client/Services/DataContext.cs"
click node_power "https://github.com/hayriozler/billiardiq/blob/main/Scoreboard.Client/Services/SystemPowerService.cs"
click node_web_app "https://github.com/hayriozler/billiardiq/blob/main/Scoreboard.WebApp/Program.cs"
click node_auth_endpoints "https://github.com/hayriozler/billiardiq/blob/main/Scoreboard.WebApp/Endpoints/AuthEndpoints.cs"
click node_mobile_auth "https://github.com/hayriozler/billiardiq/blob/main/Scoreboard.WebApp/Services/MobileAuthService.cs"
click node_web_data "https://github.com/hayriozler/billiardiq/blob/main/Scoreboard.WebApp/Data/DataContext.cs"
click node_org_domain "https://github.com/hayriozler/billiardiq/blob/main/Scoreboard.WebApp/Domain/Organization.cs"
click node_mobile_domain "https://github.com/hayriozler/billiardiq/blob/main/Scoreboard.WebApp/Domain/Mobile.cs"
click node_mobile_app "https://github.com/hayriozler/billiardiq/blob/main/mobile/BilliardIQ.Mobile/App.xaml.cs"
click node_mobile_auth_client "https://github.com/hayriozler/billiardiq/blob/main/mobile/BilliardIQ.Mobile/Services/Api/AuthService.cs"
click node_game_repo "https://github.com/hayriozler/billiardiq/blob/main/mobile/BilliardIQ.Mobile/Data/GameRepository.cs"
click node_table_vision "https://github.com/hayriozler/billiardiq/blob/main/mobile/BilliardIQ.Mobile/Services/TableVisionService.cs"
click node_ball_detector "https://github.com/hayriozler/billiardiq/blob/main/mobile/BilliardIQ.Mobile/Services/OpenCvBallDetector.cs"
click node_localization "https://github.com/hayriozler/billiardiq/blob/main/mobile/BilliardIQ.Mobile/Services/LocalizationManager.cs"

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_client_app,node_client_pull,node_client_sync,node_client_store,node_power toneBlue
class node_web_app,node_auth_endpoints,node_mobile_auth toneAmber
class node_mobile_app,node_mobile_auth_client,node_game_repo,node_table_vision,node_ball_detector,node_localization toneMint
class node_web_data,node_org_domain,node_mobile_domain toneRose
class node_operator,node_player toneIndigo
```

## Components

### Scoreboard client

- [Scoreboard app](https://github.com/hayriozler/billiardiq/blob/main/Scoreboard.Client/Program.cs): `Scoreboard.Client/Program.cs`
- [Remote pull](https://github.com/hayriozler/billiardiq/blob/main/Scoreboard.Client/Services/RemotePullService.cs): `Scoreboard.Client/Services/RemotePullService.cs`
- [Remote sync](https://github.com/hayriozler/billiardiq/blob/main/Scoreboard.Client/Services/RemoteSyncService.cs): `Scoreboard.Client/Services/RemoteSyncService.cs`
- [Local scoreboard data](https://github.com/hayriozler/billiardiq/blob/main/Scoreboard.Client/Services/DataContext.cs): `Scoreboard.Client/Services/DataContext.cs`
- [Power controls](https://github.com/hayriozler/billiardiq/blob/main/Scoreboard.Client/Services/SystemPowerService.cs): `Scoreboard.Client/Services/SystemPowerService.cs`

### Web platform

- [Web service](https://github.com/hayriozler/billiardiq/blob/main/Scoreboard.WebApp/Program.cs): `Scoreboard.WebApp/Program.cs`
- [Authentication routes](https://github.com/hayriozler/billiardiq/blob/main/Scoreboard.WebApp/Endpoints/AuthEndpoints.cs): `Scoreboard.WebApp/Endpoints/AuthEndpoints.cs`
- [Mobile authentication](https://github.com/hayriozler/billiardiq/blob/main/Scoreboard.WebApp/Services/MobileAuthService.cs): `Scoreboard.WebApp/Services/MobileAuthService.cs`

### Mobile app

- [Mobile app](https://github.com/hayriozler/billiardiq/blob/main/mobile/BilliardIQ.Mobile/App.xaml.cs): `mobile/BilliardIQ.Mobile/App.xaml.cs`
- [Mobile sign-in](https://github.com/hayriozler/billiardiq/blob/main/mobile/BilliardIQ.Mobile/Services/Api/AuthService.cs): `mobile/BilliardIQ.Mobile/Services/Api/AuthService.cs`
- [Game storage](https://github.com/hayriozler/billiardiq/blob/main/mobile/BilliardIQ.Mobile/Data/GameRepository.cs): `mobile/BilliardIQ.Mobile/Data/GameRepository.cs`
- [Table vision](https://github.com/hayriozler/billiardiq/blob/main/mobile/BilliardIQ.Mobile/Services/TableVisionService.cs): `mobile/BilliardIQ.Mobile/Services/TableVisionService.cs`
- [Ball detection](https://github.com/hayriozler/billiardiq/blob/main/mobile/BilliardIQ.Mobile/Services/OpenCvBallDetector.cs): `mobile/BilliardIQ.Mobile/Services/OpenCvBallDetector.cs`
- [Mobile localization](https://github.com/hayriozler/billiardiq/blob/main/mobile/BilliardIQ.Mobile/Services/LocalizationManager.cs): `mobile/BilliardIQ.Mobile/Services/LocalizationManager.cs`

### Persistence and domain

- [Web data context](https://github.com/hayriozler/billiardiq/blob/main/Scoreboard.WebApp/Data/DataContext.cs): `Scoreboard.WebApp/Data/DataContext.cs`
- [Organization model](https://github.com/hayriozler/billiardiq/blob/main/Scoreboard.WebApp/Domain/Organization.cs): `Scoreboard.WebApp/Domain/Organization.cs`
- [Mobile domain](https://github.com/hayriozler/billiardiq/blob/main/Scoreboard.WebApp/Domain/Mobile.cs): `Scoreboard.WebApp/Domain/Mobile.cs`

### Other components

- **Club staff**
- **Player**

## Connections

- Club staff → Scoreboard app: uses
- Scoreboard app → Remote pull: hosts (evidence: `Scoreboard.Client/Program.cs`)
- Scoreboard app → Remote sync: hosts (evidence: `Scoreboard.Client/Program.cs`)
- Scoreboard app → Power controls: registers (evidence: `Scoreboard.Client/Program.cs`)
- Remote pull → Local scoreboard data: updates (evidence: `Scoreboard.Client/Services/RemotePullService.cs`)
- Remote sync → Local scoreboard data: syncs
- Scoreboard app → Web service: serves UI
- Web service → Authentication routes: hosts routes
- Authentication routes → Mobile authentication: authenticates
- Mobile authentication → Web data context: reads/writes (evidence: `Scoreboard.WebApp/Services/MobileAuthService.cs`)
- Web data context → Organization model: maps (evidence: `Scoreboard.WebApp/Data/DataContext.cs`)
- Web data context → Mobile domain: maps (evidence: `Scoreboard.WebApp/Data/DataContext.cs`)
- Player → Mobile app: uses
- Mobile app → Mobile sign-in: provides sign-in
- Mobile sign-in → Mobile domain: uses API types (evidence: `mobile/BilliardIQ.Mobile/Services/Api/AuthService.cs`)
- Mobile app → Game storage: stores games
- Game storage → Mobile domain: uses model (evidence: `mobile/BilliardIQ.Mobile/Data/GameRepository.cs`)
- Table vision → Ball detection: delegates detection (evidence: `mobile/BilliardIQ.Mobile/Services/TableVisionService.cs`)
- Mobile app → Mobile localization: uses translations
