# kfcbach/test architecture

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

- Interactive diagram: https://gitdiagram.com/kfcbach/test
- Repository: https://github.com/kfcbach/test

## Overview

FM26 Squad Analysis is a browser-based squad assessment tool. Users provide squad data by CSV (or manual entry), choose a match situation, and review player fit and squad vulnerabilities. Its runtime is concentrated in app.js, with situation definitions in squad_analysis_lenses.json and CSV templates/sample data. The README establishes the user workflow; sampled excerpts show parts of the UI, player editing, and CSV handling, but omit much of the runtime, so uncertain internal links are left out.

Main entry points: [`app.js`](https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/app.js) (Squad Analysis), [`squad_analysis_lenses.json`](https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/squad_analysis_lenses.json) (Match Situations), [`fm26_upload_template.csv`](https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/fm26_upload_template.csv) (Upload Template), [`fm26_sample_squad.csv`](https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/fm26_sample_squad.csv) (Sample Squad)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_input["Squad Input"]
  node_site["Web Interface<br/>[index.html]"]
  node_csv_entry["CSV Upload<br/>[app.js]"]
  node_csv_parse["CSV Parsing<br/>[app.js]"]
  node_manual_entry["Manual Player Entry<br/>[app.js]"]
  node_squad_state[("Squad State<br/>[app.js]")]
  node_browser_storage[("Saved Squad<br/>[app.js]")]
end

subgraph group_analysis["Lens Analysis"]
  node_lens_catalog["Match Situations"]
  node_lens_runtime["Lens Configuration<br/>[app.js]"]
  node_lens_scoring["Attribute Scoring<br/>[app.js]"]
  node_squad_analysis["Squad Analysis<br/>[app.js]"]
end

subgraph group_review["Results Review"]
  node_squad_overview["Squad Overview<br/>[app.js]"]
  node_player_ranking["Player Rankings<br/>[app.js]"]
  node_player_detail["Player Detail<br/>[app.js]"]
  node_csv_export["CSV Export<br/>[app.js]"]
end

subgraph group_data["Configuration and Data"]
  node_upload_template["Upload Template"]
  node_sample_squad["Sample Squad"]
end

node_manager(("Squad Analyst"))

node_manager -->|"opens"| node_site
node_manager -->|"uploads squad"| node_csv_entry
node_upload_template -->|"provides format"| node_csv_entry
node_sample_squad -->|"sample input"| node_csv_entry
node_csv_entry -.->|"parses CSV"| node_csv_parse
node_csv_parse -.->|"loads players"| node_squad_state
node_manager -->|"enters players"| node_manual_entry
node_manual_entry -->|"updates squad"| node_squad_state
node_squad_state -.->|"saves players"| node_browser_storage
node_lens_catalog -.->|"defines lenses"| node_lens_runtime
node_manager -->|"chooses situation"| node_lens_runtime
node_squad_state -.->|"analyzes squad"| node_squad_analysis
node_lens_runtime -.->|"supplies weights"| node_lens_scoring
node_squad_analysis -.->|"scores attributes"| node_lens_scoring
node_squad_analysis -.->|"summarizes squad"| node_squad_overview
node_squad_analysis -.->|"ranks players"| node_player_ranking
node_player_ranking -->|"selects player"| node_player_detail
node_manager -.->|"exports results"| node_csv_export

click node_site "https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/index.html"
click node_csv_entry "https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/app.js"
click node_csv_parse "https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/app.js"
click node_manual_entry "https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/app.js"
click node_squad_state "https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/app.js"
click node_browser_storage "https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/app.js"
click node_lens_catalog "https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/squad_analysis_lenses.json"
click node_lens_runtime "https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/app.js"
click node_lens_scoring "https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/app.js"
click node_squad_analysis "https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/app.js"
click node_squad_overview "https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/app.js"
click node_player_ranking "https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/app.js"
click node_player_detail "https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/app.js"
click node_csv_export "https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/app.js"
click node_upload_template "https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/fm26_upload_template.csv"
click node_sample_squad "https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/fm26_sample_squad.csv"

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_site,node_csv_entry,node_csv_parse,node_manual_entry,node_squad_state,node_browser_storage toneBlue
class node_lens_catalog,node_lens_runtime,node_lens_scoring,node_squad_analysis toneAmber
class node_squad_overview,node_player_ranking,node_player_detail,node_csv_export toneMint
class node_upload_template,node_sample_squad toneRose
class node_manager toneIndigo
```

## Components

### Squad Input

- [Web Interface](https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/index.html): `index.html`
- [CSV Upload](https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/app.js): `app.js`
- [CSV Parsing](https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/app.js): `app.js`
- [Manual Player Entry](https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/app.js): `app.js`
- [Squad State](https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/app.js): `app.js`
- [Saved Squad](https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/app.js): `app.js`

### Lens Analysis

- [Match Situations](https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/squad_analysis_lenses.json): `squad_analysis_lenses.json`
- [Lens Configuration](https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/app.js): `app.js`
- [Attribute Scoring](https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/app.js): `app.js`
- [Squad Analysis](https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/app.js): `app.js`

### Results Review

- [Squad Overview](https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/app.js): `app.js`
- [Player Rankings](https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/app.js): `app.js`
- [Player Detail](https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/app.js): `app.js`
- [CSV Export](https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/app.js): `app.js`

### Configuration and Data

- [Upload Template](https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/fm26_upload_template.csv): `fm26_upload_template.csv`
- [Sample Squad](https://github.com/kfcbach/test/blob/Test-sau-s%E1%BB%ADa/fm26_sample_squad.csv): `fm26_sample_squad.csv`

### Other components

- **Squad Analyst**

## Connections

- Squad Analyst → Web Interface: opens (evidence: `README.md`)
- Squad Analyst → CSV Upload: uploads squad (evidence: `README.md`)
- Upload Template → CSV Upload: provides format (evidence: `README.md`)
- Sample Squad → CSV Upload: sample input (evidence: `README.md`)
- CSV Upload → CSV Parsing: parses CSV (evidence: `app.js`)
- CSV Parsing → Squad State: loads players (evidence: `app.js`)
- Squad Analyst → Manual Player Entry: enters players (evidence: `app.js`)
- Manual Player Entry → Squad State: updates squad (evidence: `app.js`)
- Squad State → Saved Squad: saves players (evidence: `app.js`)
- Match Situations → Lens Configuration: defines lenses
- Squad Analyst → Lens Configuration: chooses situation (evidence: `README.md`)
- Squad State → Squad Analysis: analyzes squad (evidence: `app.js`)
- Lens Configuration → Attribute Scoring: supplies weights (evidence: `app.js`)
- Squad Analysis → Attribute Scoring: scores attributes (evidence: `app.js`)
- Squad Analysis → Squad Overview: summarizes squad (evidence: `app.js`)
- Squad Analysis → Player Rankings: ranks players (evidence: `app.js`)
- Player Rankings → Player Detail: selects player (evidence: `app.js`)
- Squad Analyst → CSV Export: exports results
