# axxon-g/contador-cofres-fornite architecture

> Architecture diagram of the GitHub repository axxon-g/contador-cofres-fornite, 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/axxon-g/contador-cofres-fornite
- Repository: https://github.com/axxon-g/contador-cofres-fornite

## Overview

Contador is a Windows desktop app for locally counting Fortnite replay loot. The main workflow is: monitor Fortnite’s replay folder, detect a completed replay, analyze it, update profile/session statistics and local history, then present results in the dashboard and overlays. The README also documents legacy-history recovery, CSV export, configurable detection and OBS support. Some scanning and rendering details are unsampled; those links rely on README statements rather than inspected implementation.

Main entry points: [`src/Contador/MainWindow.xaml.cs`](https://github.com/axxon-g/contador-cofres-fornite/blob/main/src/Contador/MainWindow.xaml.cs) (App coordinator), [`src/Contador`](https://github.com/axxon-g/contador-cofres-fornite/tree/main/src/Contador) (Local data store), [`src/Contador.Engine/ObsHud.cs`](https://github.com/axxon-g/contador-cofres-fornite/blob/main/src/Contador.Engine/ObsHud.cs) (OBS browser HUD), [`src/Contador.Engine/MatchPresence.cs`](https://github.com/axxon-g/contador-cofres-fornite/blob/main/src/Contador.Engine/MatchPresence.cs) (Recording presence)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Replay capture"]
  node_replayfiles["Replay files"]
  node_presence["Recording presence<br/>[MatchPresence.cs]"]
  node_replayanalysis["Replay analysis"]
  node_tracker["Replay tracker"]
end

subgraph group_history["History and profiles"]
  node_store[("Local data store")]
  node_importer["Legacy history import<br/>[HistoryImporter.cs]"]
  node_profiles["Profile statistics"]
  node_session["Session counting<br/>[MatchPresence.cs]"]
end

subgraph group_desktop["Desktop experience"]
  node_mainwindow["App coordinator<br/>[MainWindow.xaml.cs]"]
  node_dashboard["Dashboard and history<br/>[Dashboard.cs]"]
  node_csv["CSV export<br/>[MainWindow.xaml.cs]"]
  node_settings["Detection settings<br/>[MainWindow.xaml.cs]"]
end

subgraph group_overlay["Overlay output"]
  node_nativeoverlay["Game overlay"]
  node_obshud["OBS browser HUD<br/>[ObsHud.cs]"]
  node_tokenicon["Coin icon<br/>[TokenIcon.cs]"]
end

node_player(("Fortnite player"))
node_obs(("OBS browser source"))

node_player -->|"records matches"| node_replayfiles
node_mainwindow -->|"checks recording"| node_presence
node_presence -->|"probes headers"| node_replayfiles
node_mainwindow -->|"scans replays"| node_tracker
node_tracker -->|"analyzes replay"| node_replayanalysis
node_replayanalysis -->|"reads replay"| node_replayfiles
node_tracker -->|"updates history"| node_store
node_mainwindow -->|"imports history"| node_importer
node_importer -->|"saves merged data"| node_store
node_mainwindow -->|"loads and saves"| node_store
node_mainwindow -->|"selects profile"| node_profiles
node_mainwindow -->|"tracks session"| node_session
node_mainwindow -->|"refreshes views"| node_dashboard
node_dashboard -->|"summarizes history"| node_store
node_mainwindow -->|"exports visible matches"| node_csv
node_mainwindow -->|"updates detection"| node_settings
node_mainwindow -->|"updates HUD"| node_nativeoverlay
node_mainwindow -->|"writes browser HUD"| node_obshud
node_obshud -->|"writes overlay files"| node_store
node_obshud -->|"embeds icon"| node_tokenicon
node_obs -->|"loads local HUD"| node_obshud

click node_presence "https://github.com/axxon-g/contador-cofres-fornite/blob/main/src/Contador.Engine/MatchPresence.cs"
click node_replayanalysis "https://github.com/axxon-g/contador-cofres-fornite/tree/main/src/Contador"
click node_tracker "https://github.com/axxon-g/contador-cofres-fornite/tree/main/src/Contador"
click node_mainwindow "https://github.com/axxon-g/contador-cofres-fornite/blob/main/src/Contador/MainWindow.xaml.cs"
click node_store "https://github.com/axxon-g/contador-cofres-fornite/tree/main/src/Contador"
click node_importer "https://github.com/axxon-g/contador-cofres-fornite/blob/main/src/Contador.Engine/HistoryImporter.cs"
click node_profiles "https://github.com/axxon-g/contador-cofres-fornite/tree/main/src/Contador"
click node_session "https://github.com/axxon-g/contador-cofres-fornite/blob/main/src/Contador.Engine/MatchPresence.cs"
click node_dashboard "https://github.com/axxon-g/contador-cofres-fornite/blob/main/src/Contador/Dashboard.cs"
click node_csv "https://github.com/axxon-g/contador-cofres-fornite/blob/main/src/Contador/MainWindow.xaml.cs"
click node_settings "https://github.com/axxon-g/contador-cofres-fornite/blob/main/src/Contador/MainWindow.xaml.cs"
click node_nativeoverlay "https://github.com/axxon-g/contador-cofres-fornite/tree/main/src/Contador"
click node_obshud "https://github.com/axxon-g/contador-cofres-fornite/blob/main/src/Contador.Engine/ObsHud.cs"
click node_tokenicon "https://github.com/axxon-g/contador-cofres-fornite/blob/main/src/Contador.Engine/TokenIcon.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_replayfiles,node_presence,node_replayanalysis,node_tracker,node_obs toneBlue
class node_store,node_importer,node_profiles,node_session toneAmber
class node_mainwindow,node_dashboard,node_csv,node_settings toneMint
class node_nativeoverlay,node_obshud,node_tokenicon toneRose
class node_player toneIndigo
```

## Components

### Replay capture

- **Replay files**
- [Recording presence](https://github.com/axxon-g/contador-cofres-fornite/blob/main/src/Contador.Engine/MatchPresence.cs): `src/Contador.Engine/MatchPresence.cs`
- [Replay analysis](https://github.com/axxon-g/contador-cofres-fornite/tree/main/src/Contador): `src/Contador`
- [Replay tracker](https://github.com/axxon-g/contador-cofres-fornite/tree/main/src/Contador): `src/Contador`

### History and profiles

- [Local data store](https://github.com/axxon-g/contador-cofres-fornite/tree/main/src/Contador): `src/Contador`
- [Legacy history import](https://github.com/axxon-g/contador-cofres-fornite/blob/main/src/Contador.Engine/HistoryImporter.cs): `src/Contador.Engine/HistoryImporter.cs`
- [Profile statistics](https://github.com/axxon-g/contador-cofres-fornite/tree/main/src/Contador): `src/Contador`
- [Session counting](https://github.com/axxon-g/contador-cofres-fornite/blob/main/src/Contador.Engine/MatchPresence.cs): `src/Contador.Engine/MatchPresence.cs`

### Desktop experience

- [App coordinator](https://github.com/axxon-g/contador-cofres-fornite/blob/main/src/Contador/MainWindow.xaml.cs): `src/Contador/MainWindow.xaml.cs`
- [Dashboard and history](https://github.com/axxon-g/contador-cofres-fornite/blob/main/src/Contador/Dashboard.cs): `src/Contador/Dashboard.cs`
- [CSV export](https://github.com/axxon-g/contador-cofres-fornite/blob/main/src/Contador/MainWindow.xaml.cs): `src/Contador/MainWindow.xaml.cs`
- [Detection settings](https://github.com/axxon-g/contador-cofres-fornite/blob/main/src/Contador/MainWindow.xaml.cs): `src/Contador/MainWindow.xaml.cs`

### Overlay output

- [Game overlay](https://github.com/axxon-g/contador-cofres-fornite/tree/main/src/Contador): `src/Contador`
- [OBS browser HUD](https://github.com/axxon-g/contador-cofres-fornite/blob/main/src/Contador.Engine/ObsHud.cs): `src/Contador.Engine/ObsHud.cs`
- [Coin icon](https://github.com/axxon-g/contador-cofres-fornite/blob/main/src/Contador.Engine/TokenIcon.cs): `src/Contador.Engine/TokenIcon.cs`

### Other components

- **Fortnite player**
- **OBS browser source**

## Connections

- Fortnite player → Replay files: records matches (evidence: `README.md`)
- App coordinator → Recording presence: checks recording (evidence: `src/Contador/MainWindow.xaml.cs`)
- Recording presence → Replay files: probes headers (evidence: `src/Contador.Engine/MatchPresence.cs`)
- App coordinator → Replay tracker: scans replays (evidence: `src/Contador/MainWindow.xaml.cs`)
- Replay tracker → Replay analysis: analyzes replay (evidence: `README.md`)
- Replay analysis → Replay files: reads replay (evidence: `README.md`)
- Replay tracker → Local data store: updates history (evidence: `README.md`)
- App coordinator → Legacy history import: imports history (evidence: `src/Contador/MainWindow.xaml.cs`)
- Legacy history import → Local data store: saves merged data (evidence: `src/Contador.Engine/HistoryImporter.cs`)
- App coordinator → Local data store: loads and saves (evidence: `src/Contador/MainWindow.xaml.cs`)
- App coordinator → Profile statistics: selects profile (evidence: `README.md`)
- App coordinator → Session counting: tracks session (evidence: `src/Contador/MainWindow.xaml.cs`)
- App coordinator → Dashboard and history: refreshes views (evidence: `src/Contador/MainWindow.xaml.cs`)
- Dashboard and history → Local data store: summarizes history (evidence: `src/Contador/Dashboard.cs`)
- App coordinator → CSV export: exports visible matches (evidence: `src/Contador/MainWindow.xaml.cs`)
- App coordinator → Detection settings: updates detection (evidence: `README.md`)
- App coordinator → Game overlay: updates HUD (evidence: `README.md`)
- App coordinator → OBS browser HUD: writes browser HUD (evidence: `src/Contador/MainWindow.xaml.cs`)
- OBS browser HUD → Local data store: writes overlay files (evidence: `src/Contador.Engine/ObsHud.cs`)
- OBS browser HUD → Coin icon: embeds icon (evidence: `src/Contador.Engine/ObsHud.cs`)
- OBS browser source → OBS browser HUD: loads local HUD (evidence: `README.md`)
