# vusan/chesspuzzle architecture

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

- Interactive diagram: https://gitdiagram.com/vusan/chesspuzzle
- Repository: https://github.com/vusan/chesspuzzle

## Overview

This is a small Angular chess-board application: startup bootstraps an app shell, which initializes a board from a named position and enables drag-and-drop interaction. The model builds an 8×8 square grid and creates piece instances from position data. The README is empty, and the supplied excerpts do not show the board template or position-provider implementation; those paths are included from the tree, but their internal behavior and UI bindings are not inferred. Edges reflect only visible calls or explicit template configuration.

Main entry points: [`app/board/component/board.component.ts`](https://github.com/vusan/chesspuzzle/blob/master/app/board/component/board.component.ts) (Board controller), [`app/board/model/board.ts`](https://github.com/vusan/chesspuzzle/blob/master/app/board/model/board.ts) (Board builder), [`app/app.component.ts`](https://github.com/vusan/chesspuzzle/blob/master/app/app.component.ts) (App shell), [`app/board/model/position.ts`](https://github.com/vusan/chesspuzzle/blob/master/app/board/model/position.ts) (Position provider)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_startup["Angular startup<br/>[main.ts]"]
  node_appcomponent["App shell<br/>[app.component.ts]"]
end

subgraph group_board["Board interaction"]
  node_boardcomponent["Board controller<br/>[board.component.ts]"]
  node_boardview["Board template"]
  node_piecemover["Piece mover<br/>[piecemover.ts]"]
end

subgraph group_model["Chess model"]
  node_boardbuilder["Board builder<br/>[board.ts]"]
  node_boardstate["Board and squares<br/>[board.ts]"]
  node_positionprovider["Position provider<br/>[position.ts]"]
  node_piecefactory["Piece factory<br/>[piece.ts]"]
  node_piecetypes["Chess pieces<br/>[piece.ts]"]
  node_position["Position data<br/>[position.ts]"]
end

node_user(("Player"))

node_startup -->|"bootstraps"| node_appcomponent
node_appcomponent -->|"configures"| node_boardcomponent
node_boardcomponent -->|"configures template"| node_boardview
node_boardcomponent -->|"builds board"| node_boardbuilder
node_boardcomponent -->|"enables movement"| node_piecemover
node_boardbuilder -->|"gets position"| node_positionprovider
node_boardbuilder -->|"creates pieces"| node_piecefactory
node_boardbuilder -->|"builds squares"| node_boardstate
node_piecefactory -->|"instantiates pieces"| node_piecetypes
node_positionprovider -.->|"supplies position"| node_position

click node_startup "https://github.com/vusan/chesspuzzle/blob/master/app/main.ts"
click node_appcomponent "https://github.com/vusan/chesspuzzle/blob/master/app/app.component.ts"
click node_boardcomponent "https://github.com/vusan/chesspuzzle/blob/master/app/board/component/board.component.ts"
click node_boardview "https://github.com/vusan/chesspuzzle/blob/master/app/board/component/board.component.html"
click node_piecemover "https://github.com/vusan/chesspuzzle/blob/master/app/board/component/piecemover.ts"
click node_boardbuilder "https://github.com/vusan/chesspuzzle/blob/master/app/board/model/board.ts"
click node_boardstate "https://github.com/vusan/chesspuzzle/blob/master/app/board/model/board.ts"
click node_positionprovider "https://github.com/vusan/chesspuzzle/blob/master/app/board/model/position.ts"
click node_piecefactory "https://github.com/vusan/chesspuzzle/blob/master/app/board/model/piece.ts"
click node_piecetypes "https://github.com/vusan/chesspuzzle/blob/master/app/board/model/piece.ts"
click node_position "https://github.com/vusan/chesspuzzle/blob/master/app/board/model/position.ts"

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_startup,node_appcomponent toneBlue
class node_boardcomponent,node_boardview,node_piecemover toneAmber
class node_boardbuilder,node_boardstate,node_positionprovider,node_piecefactory,node_piecetypes,node_position toneMint
class node_user toneIndigo
```

## Components

### Application shell

- [Angular startup](https://github.com/vusan/chesspuzzle/blob/master/app/main.ts): `app/main.ts`
- [App shell](https://github.com/vusan/chesspuzzle/blob/master/app/app.component.ts): `app/app.component.ts`

### Board interaction

- [Board controller](https://github.com/vusan/chesspuzzle/blob/master/app/board/component/board.component.ts): `app/board/component/board.component.ts`
- [Board template](https://github.com/vusan/chesspuzzle/blob/master/app/board/component/board.component.html): `app/board/component/board.component.html`
- [Piece mover](https://github.com/vusan/chesspuzzle/blob/master/app/board/component/piecemover.ts): `app/board/component/piecemover.ts`

### Chess model

- [Board builder](https://github.com/vusan/chesspuzzle/blob/master/app/board/model/board.ts): `app/board/model/board.ts`
- [Board and squares](https://github.com/vusan/chesspuzzle/blob/master/app/board/model/board.ts): `app/board/model/board.ts`
- [Position provider](https://github.com/vusan/chesspuzzle/blob/master/app/board/model/position.ts): `app/board/model/position.ts`
- [Piece factory](https://github.com/vusan/chesspuzzle/blob/master/app/board/model/piece.ts): `app/board/model/piece.ts`
- [Chess pieces](https://github.com/vusan/chesspuzzle/blob/master/app/board/model/piece.ts): `app/board/model/piece.ts`
- [Position data](https://github.com/vusan/chesspuzzle/blob/master/app/board/model/position.ts): `app/board/model/position.ts`

### Other components

- **Player**

## Connections

- Angular startup → App shell: bootstraps (evidence: `app/main.ts`)
- App shell → Board controller: configures (evidence: `app/app.component.ts`)
- Board controller → Board template: configures template (evidence: `app/board/component/board.component.ts`)
- Board controller → Board builder: builds board (evidence: `app/board/component/board.component.ts`)
- Board controller → Piece mover: enables movement (evidence: `app/board/component/board.component.ts`)
- Board builder → Position provider: gets position (evidence: `app/board/model/board.ts`)
- Board builder → Piece factory: creates pieces (evidence: `app/board/model/board.ts`)
- Board builder → Board and squares: builds squares (evidence: `app/board/model/board.ts`)
- Piece factory → Chess pieces: instantiates pieces (evidence: `app/board/model/piece.ts`)
- Position provider → Position data: supplies position
