# arathi8/chess-trainer-system architecture

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

- Interactive diagram: https://gitdiagram.com/arathi8/chess-trainer-system
- Repository: https://github.com/arathi8/chess-trainer-system

## Overview

This is a small Python proof of concept for chess-move coaching: it validates a FEN position and UCI move, analyzes the position before and after the move with Stockfish, formats both evaluations into a coaching prompt, copies it to the clipboard, and prints it. The single script contains all product behavior; there is no documented README or separate subsystem architecture. Edges reflect calls visible in the excerpt.

Main entry points: [`chess_trainer_system_poc.py`](https://github.com/arathi8/chess-trainer-system/blob/main/chess_trainer_system_poc.py) (Prompt generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_analysis["Position analysis"]
  node_entry["Prompt generation"]
  node_board["FEN parsing"]
  node_move["Move validation"]
  node_engine["Stockfish engine"]
end

subgraph group_output["Coaching output"]
  node_summary["Evaluation summary"]
  node_block["Analysis formatting"]
end

node_user(("Chess user"))
node_clipboard["System clipboard"]
node_terminal["Terminal output"]

node_user -->|"provides position"| node_entry
node_entry -->|"parses FEN"| node_board
node_entry -->|"validates move"| node_move
node_entry -->|"analyzes positions"| node_engine
node_entry -->|"formats results"| node_summary
node_entry -->|"formats prompt"| node_block
node_entry -->|"copies prompt"| node_clipboard
node_entry -->|"prints prompt"| node_terminal

click node_entry "https://github.com/arathi8/chess-trainer-system/blob/main/chess_trainer_system_poc.py"
click node_board "https://github.com/arathi8/chess-trainer-system/blob/main/chess_trainer_system_poc.py"
click node_move "https://github.com/arathi8/chess-trainer-system/blob/main/chess_trainer_system_poc.py"
click node_summary "https://github.com/arathi8/chess-trainer-system/blob/main/chess_trainer_system_poc.py"
click node_block "https://github.com/arathi8/chess-trainer-system/blob/main/chess_trainer_system_poc.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_entry,node_board,node_move,node_engine,node_user toneBlue
class node_summary,node_block toneAmber
class node_clipboard,node_terminal toneIndigo
```

## Components

### Position analysis

- [Prompt generation](https://github.com/arathi8/chess-trainer-system/blob/main/chess_trainer_system_poc.py): `chess_trainer_system_poc.py`
- [FEN parsing](https://github.com/arathi8/chess-trainer-system/blob/main/chess_trainer_system_poc.py): `chess_trainer_system_poc.py`
- [Move validation](https://github.com/arathi8/chess-trainer-system/blob/main/chess_trainer_system_poc.py): `chess_trainer_system_poc.py`
- **Stockfish engine**

### Coaching output

- [Evaluation summary](https://github.com/arathi8/chess-trainer-system/blob/main/chess_trainer_system_poc.py): `chess_trainer_system_poc.py`
- [Analysis formatting](https://github.com/arathi8/chess-trainer-system/blob/main/chess_trainer_system_poc.py): `chess_trainer_system_poc.py`

### Other components

- **Chess user**
- **System clipboard**
- **Terminal output**

## Connections

- Chess user → Prompt generation: provides position (evidence: `chess_trainer_system_poc.py`)
- Prompt generation → FEN parsing: parses FEN (evidence: `chess_trainer_system_poc.py`)
- Prompt generation → Move validation: validates move (evidence: `chess_trainer_system_poc.py`)
- Prompt generation → Stockfish engine: analyzes positions (evidence: `chess_trainer_system_poc.py`)
- Prompt generation → Evaluation summary: formats results (evidence: `chess_trainer_system_poc.py`)
- Prompt generation → Analysis formatting: formats prompt (evidence: `chess_trainer_system_poc.py`)
- Prompt generation → System clipboard: copies prompt (evidence: `chess_trainer_system_poc.py`)
- Prompt generation → Terminal output: prints prompt (evidence: `chess_trainer_system_poc.py`)
