# chyfarhanjamil/wc2026-fixtures architecture

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

- Interactive diagram: https://gitdiagram.com/chyfarhanjamil/wc2026-fixtures
- Repository: https://github.com/chyfarhanjamil/wc2026-fixtures

## Overview

This is a browser-based World Cup 2026 fixture viewer, with a companion data-refresh and calendar-generation workflow. Users browse fixtures and tournament views, search or filter, inspect live scores and scorer details, and export calendars. The graph preserves the documented standings, statistics, clash-finder, simulation, localization, and live-data capabilities. Source excerpts show some UI orchestration and data use; connections to unsampled modules are omitted where the excerpts and README do not establish them.

Main entry points: [`js/live.js`](https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/live.js) (Live scores and events), [`js/app.js`](https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/app.js) (App controller), [`js/resolver.js`](https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/resolver.js) (Knockout resolver), [`scripts/fetch-match-details.py`](https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/scripts/fetch-match-details.py) (Scorer detail fetcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Viewer experience"]
  node_controller["App controller<br/>[app.js]"]
  node_bracket["Fixture and bracket view<br/>[bracket.js]"]
  node_calendarview["Calendar view<br/>[calendar.js]"]
  node_localization["Localization<br/>[i18n.js]"]
end

subgraph group_tournament["Tournament logic"]
  node_fixtures["Fixture data<br/>[data.js]"]
  node_resolver["Knockout resolver<br/>[resolver.js]"]
  node_standings["Group standings<br/>[standings.js]"]
  node_simulator["Bracket simulator<br/>[simulator.js]"]
  node_clash["Team clash finder<br/>[clash-finder.js]"]
  node_stats["Player statistics<br/>[stats.js]"]
end

subgraph group_feeds["Scores and details"]
  node_live["Live scores and events<br/>[live.js]"]
  node_scoredata["Match score data<br/>[matches.json]"]
  node_scorerfetch["Scorer detail fetcher"]
  node_scorerdata[("Per-match scorer details")]
end

subgraph group_calendar["Calendar outputs"]
  node_export["Calendar export<br/>[export.js]"]
  node_icsgenerator["ICS generator<br/>[generate-ics.js]"]
  node_icsfiles["Team calendar files"]
end

node_visitor(("Viewer"))
node_footballapi{{"football-data.org"}}
node_openfootball{{"Openfootball dataset"}}

node_visitor -->|"uses"| node_controller
node_controller -->|"initializes"| node_localization
node_controller -->|"renders"| node_bracket
node_controller -->|"renders"| node_calendarview
node_controller -->|"renders"| node_stats
node_bracket -->|"reads fixtures"| node_fixtures
node_bracket -->|"reads scores"| node_live
node_calendarview -->|"reads scores"| node_live
node_calendarview -->|"resolves teams"| node_resolver
node_resolver -->|"calculates tables"| node_standings
node_resolver -->|"reads results"| node_live
node_stats -->|"reads events"| node_live
node_live -.->|"uses score data"| node_scoredata
node_live -.->|"uses scorer data"| node_scorerdata
node_scorerfetch -->|"fetches events"| node_footballapi
node_scorerfetch -->|"fills missing events"| node_openfootball
node_scorerfetch -->|"writes details"| node_scorerdata
node_visitor -->|"selects teams"| node_export
node_export -->|"checks qualifiers"| node_resolver
node_icsgenerator -->|"generates calendars"| node_icsfiles

click node_controller "https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/app.js"
click node_fixtures "https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/data.js"
click node_bracket "https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/bracket.js"
click node_calendarview "https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/calendar.js"
click node_localization "https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/i18n.js"
click node_resolver "https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/resolver.js"
click node_standings "https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/standings.js"
click node_simulator "https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/simulator.js"
click node_clash "https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/clash-finder.js"
click node_stats "https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/stats.js"
click node_live "https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/live.js"
click node_scoredata "https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/data/matches.json"
click node_scorerfetch "https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/scripts/fetch-match-details.py"
click node_scorerdata "https://github.com/chyfarhanjamil/wc2026-fixtures/tree/main/data/match-details"
click node_export "https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/export.js"
click node_icsgenerator "https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/scripts/generate-ics.js"
click node_icsfiles "https://github.com/chyfarhanjamil/wc2026-fixtures/tree/main/ics"

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_controller,node_bracket,node_calendarview,node_localization,node_visitor toneBlue
class node_fixtures,node_resolver,node_standings,node_simulator,node_clash,node_stats toneAmber
class node_live,node_scoredata,node_scorerfetch,node_scorerdata toneMint
class node_export,node_icsgenerator,node_icsfiles toneRose
class node_footballapi,node_openfootball toneIndigo
```

## Components

### Viewer experience

- [App controller](https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/app.js): `js/app.js`
- [Fixture and bracket view](https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/bracket.js): `js/bracket.js`
- [Calendar view](https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/calendar.js): `js/calendar.js`
- [Localization](https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/i18n.js): `js/i18n.js`

### Tournament logic

- [Fixture data](https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/data.js): `js/data.js`
- [Knockout resolver](https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/resolver.js): `js/resolver.js`
- [Group standings](https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/standings.js): `js/standings.js`
- [Bracket simulator](https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/simulator.js): `js/simulator.js`
- [Team clash finder](https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/clash-finder.js): `js/clash-finder.js`
- [Player statistics](https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/stats.js): `js/stats.js`

### Scores and details

- [Live scores and events](https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/live.js): `js/live.js`
- [Match score data](https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/data/matches.json): `data/matches.json`
- [Scorer detail fetcher](https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/scripts/fetch-match-details.py): `scripts/fetch-match-details.py`
- [Per-match scorer details](https://github.com/chyfarhanjamil/wc2026-fixtures/tree/main/data/match-details): `data/match-details`

### Calendar outputs

- [Calendar export](https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/js/export.js): `js/export.js`
- [ICS generator](https://github.com/chyfarhanjamil/wc2026-fixtures/blob/main/scripts/generate-ics.js): `scripts/generate-ics.js`
- [Team calendar files](https://github.com/chyfarhanjamil/wc2026-fixtures/tree/main/ics): `ics`

### Other components

- **Viewer**
- **football-data.org**
- **Openfootball dataset**

## Connections

- Viewer → App controller: uses
- App controller → Localization: initializes (evidence: `js/app.js`)
- App controller → Fixture and bracket view: renders (evidence: `js/app.js`)
- App controller → Calendar view: renders (evidence: `js/app.js`)
- App controller → Player statistics: renders (evidence: `js/app.js`)
- Fixture and bracket view → Fixture data: reads fixtures (evidence: `js/bracket.js`)
- Fixture and bracket view → Live scores and events: reads scores (evidence: `js/bracket.js`)
- Calendar view → Live scores and events: reads scores (evidence: `js/calendar.js`)
- Calendar view → Knockout resolver: resolves teams (evidence: `js/calendar.js`)
- Knockout resolver → Group standings: calculates tables (evidence: `js/resolver.js`)
- Knockout resolver → Live scores and events: reads results (evidence: `js/resolver.js`)
- Player statistics → Live scores and events: reads events (evidence: `js/stats.js`)
- Live scores and events → Match score data: uses score data
- Live scores and events → Per-match scorer details: uses scorer data
- Scorer detail fetcher → football-data.org: fetches events (evidence: `README.md`)
- Scorer detail fetcher → Openfootball dataset: fills missing events (evidence: `README.md`)
- Scorer detail fetcher → Per-match scorer details: writes details (evidence: `README.md`)
- Viewer → Calendar export: selects teams
- Calendar export → Knockout resolver: checks qualifiers (evidence: `js/export.js`)
- ICS generator → Team calendar files: generates calendars (evidence: `README.md`)
