# qorgh529/r6_count_program architecture

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

- Interactive diagram: https://gitdiagram.com/qorgh529/r6_count_program
- Repository: https://github.com/qorgh529/r6_count_program

## Overview

This is a browser-based Rainbow Six Siege team score calculator. Users configure scoring rules, enter match stats manually or paste CSV/TSV, save matches, and view cumulative rankings and per-match MVPs; data can be persisted locally and imported/exported as JSON. The graph separates UI workflows, scoring logic, and browser storage. Source excerpts show the app-to-scoring and localStorage interactions; README documents the broader workflow and persistence capabilities.

Main entry points: [`app.js`](https://github.com/qorgh529/r6_count_program/blob/main/app.js) (App interface), [`score.js`](https://github.com/qorgh529/r6_count_program/blob/main/score.js) (Match aggregation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Browser workflows"]
  node_app["App interface<br/>[app.js]"]
  node_rules["Scoring rules<br/>[app.js]"]
  node_matchentry["Match entry<br/>[app.js]"]
  node_csv["CSV/TSV import<br/>[app.js]"]
  node_ranking["Cumulative rankings<br/>[app.js]"]
  node_matchlist["Match list and MVP<br/>[app.js]"]
  node_json["JSON transfer<br/>[app.js]"]
end

subgraph group_logic["Scoring logic"]
  node_score["Player scoring<br/>[score.js]"]
  node_aggregate["Match aggregation<br/>[score.js]"]
  node_parse["Stats parser<br/>[score.js]"]
end

subgraph group_state["Local data"]
  node_browserstore[("Browser localStorage")]
  node_matches["Match records<br/>[app.js]"]
  node_rulesdata["Rule values<br/>[app.js]"]
end

node_player(("Team member"))

node_player -->|"enters stats"| node_matchentry
node_player -->|"pastes stats"| node_csv
node_rules -->|"updates"| node_rulesdata
node_matchentry -->|"saves match"| node_matches
node_csv -->|"parses rows"| node_parse
node_parse -->|"fills entries"| node_matchentry
node_ranking -->|"aggregates matches"| node_aggregate
node_aggregate -->|"scores totals"| node_score
node_ranking -->|"reads matches"| node_matches
node_ranking -->|"uses rules"| node_rulesdata
node_matchlist -->|"scores players"| node_score
node_matchlist -->|"reads and deletes"| node_matches
node_app -->|"renders and resets"| node_rules
node_app -->|"initializes"| node_matchentry
node_app -->|"renders"| node_ranking
node_app -->|"renders"| node_matchlist
node_app -->|"loads and saves"| node_browserstore
node_app -->|"imports and exports"| node_json
node_json -->|"transfers"| node_matches
node_json -->|"transfers"| node_rulesdata

click node_app "https://github.com/qorgh529/r6_count_program/blob/main/app.js"
click node_rules "https://github.com/qorgh529/r6_count_program/blob/main/app.js"
click node_matchentry "https://github.com/qorgh529/r6_count_program/blob/main/app.js"
click node_csv "https://github.com/qorgh529/r6_count_program/blob/main/app.js"
click node_ranking "https://github.com/qorgh529/r6_count_program/blob/main/app.js"
click node_matchlist "https://github.com/qorgh529/r6_count_program/blob/main/app.js"
click node_json "https://github.com/qorgh529/r6_count_program/blob/main/app.js"
click node_score "https://github.com/qorgh529/r6_count_program/blob/main/score.js"
click node_aggregate "https://github.com/qorgh529/r6_count_program/blob/main/score.js"
click node_parse "https://github.com/qorgh529/r6_count_program/blob/main/score.js"
click node_matches "https://github.com/qorgh529/r6_count_program/blob/main/app.js"
click node_rulesdata "https://github.com/qorgh529/r6_count_program/blob/main/app.js"

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_rules,node_matchentry,node_csv,node_ranking,node_matchlist,node_json toneBlue
class node_score,node_aggregate,node_parse toneAmber
class node_browserstore,node_matches,node_rulesdata toneMint
class node_player toneIndigo
```

## Components

### Browser workflows

- [App interface](https://github.com/qorgh529/r6_count_program/blob/main/app.js): `app.js`
- [Scoring rules](https://github.com/qorgh529/r6_count_program/blob/main/app.js): `app.js`
- [Match entry](https://github.com/qorgh529/r6_count_program/blob/main/app.js): `app.js`
- [CSV/TSV import](https://github.com/qorgh529/r6_count_program/blob/main/app.js): `app.js`
- [Cumulative rankings](https://github.com/qorgh529/r6_count_program/blob/main/app.js): `app.js`
- [Match list and MVP](https://github.com/qorgh529/r6_count_program/blob/main/app.js): `app.js`
- [JSON transfer](https://github.com/qorgh529/r6_count_program/blob/main/app.js): `app.js`

### Scoring logic

- [Player scoring](https://github.com/qorgh529/r6_count_program/blob/main/score.js): `score.js`
- [Match aggregation](https://github.com/qorgh529/r6_count_program/blob/main/score.js): `score.js`
- [Stats parser](https://github.com/qorgh529/r6_count_program/blob/main/score.js): `score.js`

### Local data

- **Browser localStorage**
- [Match records](https://github.com/qorgh529/r6_count_program/blob/main/app.js): `app.js`
- [Rule values](https://github.com/qorgh529/r6_count_program/blob/main/app.js): `app.js`

### Other components

- **Team member**

## Connections

- Team member → Match entry: enters stats (evidence: `README.md`)
- Team member → CSV/TSV import: pastes stats (evidence: `README.md`)
- Scoring rules → Rule values: updates (evidence: `app.js`)
- Match entry → Match records: saves match (evidence: `app.js`)
- CSV/TSV import → Stats parser: parses rows (evidence: `app.js`)
- Stats parser → Match entry: fills entries (evidence: `app.js`)
- Cumulative rankings → Match aggregation: aggregates matches (evidence: `app.js`)
- Match aggregation → Player scoring: scores totals (evidence: `score.js`)
- Cumulative rankings → Match records: reads matches (evidence: `app.js`)
- Cumulative rankings → Rule values: uses rules (evidence: `app.js`)
- Match list and MVP → Player scoring: scores players (evidence: `app.js`)
- Match list and MVP → Match records: reads and deletes (evidence: `app.js`)
- App interface → Scoring rules: renders and resets (evidence: `app.js`)
- App interface → Match entry: initializes (evidence: `app.js`)
- App interface → Cumulative rankings: renders (evidence: `app.js`)
- App interface → Match list and MVP: renders (evidence: `app.js`)
- App interface → Browser localStorage: loads and saves (evidence: `app.js`)
- App interface → JSON transfer: imports and exports (evidence: `app.js`)
- JSON transfer → Match records: transfers (evidence: `app.js`)
- JSON transfer → Rule values: transfers (evidence: `app.js`)
