# jorgenador/prestigetracker architecture

> Architecture diagram of the GitHub repository jorgenador/prestigetracker, 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/jorgenador/prestigetracker
- Repository: https://github.com/jorgenador/prestigetracker

## Overview

This is a local Roblox Clover Retribution spin-and-prestige tracker, implemented in a single Python application. The user configures screen regions, then the app watches Roblox while it is focused, detects prestige events and tracks cycle progress; it also provides manual controls and a focus-aware timer. State is saved locally rather than to a database service. The sampled code shows the UI, hotkey registration, screenshot/template detection, spin OCR, and JSON persistence. Other runtime details are not fully sampled, so uncertain connections are omitted.

Main entry points: [`main.py`](https://github.com/jorgenador/prestigetracker/blob/main/main.py) (Focus check)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["User interaction"]
  node_app["Tracker UI<br/>[main.py]"]
  node_hotkeys["Hotkey controls<br/>[main.py]"]
end

subgraph group_tracking["Screen tracking"]
  node_focus["Focus check<br/>[main.py]"]
  node_region["Screen regions<br/>[main.py]"]
  node_capture["Template capture<br/>[main.py]"]
  node_prestige["Prestige detection<br/>[main.py]"]
  node_spinread["Spin OCR<br/>[main.py]"]
end

subgraph group_state["Tracking state"]
  node_cycles["Cycle and prestige counts<br/>[main.py]"]
  node_timer["Focus-aware timer<br/>[main.py]"]
  node_store[("Local JSON state<br/>[main.py]")]
end

node_user(("Player"))
node_roblox["Roblox window"]

node_user -->|"uses"| node_app
node_user -->|"presses controls"| node_hotkeys
node_hotkeys -->|"dispatches actions"| node_app
node_user -->|"selects regions"| node_region
node_region -->|"configures capture"| node_capture
node_roblox -->|"provides focus state"| node_focus
node_focus -->|"gates checks"| node_prestige
node_roblox -->|"provides screen image"| node_prestige
node_prestige -->|"updates counts"| node_cycles
node_roblox -->|"provides spin text"| node_spinread
node_cycles -->|"saves state"| node_store
node_store -->|"loads state"| node_app
node_focus -->|"controls timing"| node_timer

click node_app "https://github.com/jorgenador/prestigetracker/blob/main/main.py"
click node_hotkeys "https://github.com/jorgenador/prestigetracker/blob/main/main.py"
click node_focus "https://github.com/jorgenador/prestigetracker/blob/main/main.py"
click node_region "https://github.com/jorgenador/prestigetracker/blob/main/main.py"
click node_capture "https://github.com/jorgenador/prestigetracker/blob/main/main.py"
click node_prestige "https://github.com/jorgenador/prestigetracker/blob/main/main.py"
click node_spinread "https://github.com/jorgenador/prestigetracker/blob/main/main.py"
click node_cycles "https://github.com/jorgenador/prestigetracker/blob/main/main.py"
click node_timer "https://github.com/jorgenador/prestigetracker/blob/main/main.py"
click node_store "https://github.com/jorgenador/prestigetracker/blob/main/main.py"

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,node_hotkeys toneBlue
class node_focus,node_region,node_capture,node_prestige,node_spinread toneAmber
class node_cycles,node_timer,node_store toneMint
class node_user,node_roblox toneIndigo
```

## Components

### User interaction

- [Tracker UI](https://github.com/jorgenador/prestigetracker/blob/main/main.py): `main.py`
- [Hotkey controls](https://github.com/jorgenador/prestigetracker/blob/main/main.py): `main.py`

### Screen tracking

- [Focus check](https://github.com/jorgenador/prestigetracker/blob/main/main.py): `main.py`
- [Screen regions](https://github.com/jorgenador/prestigetracker/blob/main/main.py): `main.py`
- [Template capture](https://github.com/jorgenador/prestigetracker/blob/main/main.py): `main.py`
- [Prestige detection](https://github.com/jorgenador/prestigetracker/blob/main/main.py): `main.py`
- [Spin OCR](https://github.com/jorgenador/prestigetracker/blob/main/main.py): `main.py`

### Tracking state

- [Cycle and prestige counts](https://github.com/jorgenador/prestigetracker/blob/main/main.py): `main.py`
- [Focus-aware timer](https://github.com/jorgenador/prestigetracker/blob/main/main.py): `main.py`
- [Local JSON state](https://github.com/jorgenador/prestigetracker/blob/main/main.py): `main.py`

### Other components

- **Player**
- **Roblox window**

## Connections

- Player → Tracker UI: uses (evidence: `README.md`)
- Player → Hotkey controls: presses controls (evidence: `main.py`)
- Hotkey controls → Tracker UI: dispatches actions (evidence: `main.py`)
- Player → Screen regions: selects regions (evidence: `README.md`)
- Screen regions → Template capture: configures capture (evidence: `main.py`)
- Roblox window → Focus check: provides focus state (evidence: `README.md`)
- Focus check → Prestige detection: gates checks (evidence: `main.py`)
- Roblox window → Prestige detection: provides screen image (evidence: `main.py`)
- Prestige detection → Cycle and prestige counts: updates counts (evidence: `main.py`)
- Roblox window → Spin OCR: provides spin text (evidence: `main.py`)
- Cycle and prestige counts → Local JSON state: saves state (evidence: `main.py`)
- Local JSON state → Tracker UI: loads state (evidence: `main.py`)
- Focus check → Focus-aware timer: controls timing (evidence: `README.md`)
