# nishancshetty/football-9a-tactics-planner architecture

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

- Interactive diagram: https://gitdiagram.com/nishancshetty/football-9a-tactics-planner
- Repository: https://github.com/nishancshetty/football-9a-tactics-planner

## Overview

9A Tactics Planner is a browser-based editor for 9-a-side match plans. Users choose a formation, populate and reposition its players, add instructions, and save a tactic; they can also manage a reusable squad and reopen or delete saved plans. The map separates navigation, formation selection, the tactical board, squad management, and saved tactics, with reusable data and browser storage shown as supporting layers. Some pitch interactions are omitted from the excerpt, so only relationships shown in excerpts or documented in the README are connected.

Main entry points: [`src/components/FootballPitch.tsx`](https://github.com/nishancshetty/football-9a-tactics-planner/blob/main/src/components/FootballPitch.tsx) (Tactical pitch), [`src/app/page.tsx`](https://github.com/nishancshetty/football-9a-tactics-planner/blob/main/src/app/page.tsx) (Planner page), [`src/components/FormationGrid.tsx`](https://github.com/nishancshetty/football-9a-tactics-planner/blob/main/src/components/FormationGrid.tsx) (Formation grid), [`src/components/Players.tsx`](https://github.com/nishancshetty/football-9a-tactics-planner/blob/main/src/components/Players.tsx) (Squad manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_home["Planner page<br/>[page.tsx]"]
end

subgraph group_formations["Formation selection"]
  node_formation_grid["Formation grid<br/>[FormationGrid.tsx]"]
  node_formation_card["Formation card<br/>[FormationCard.tsx]"]
end

subgraph group_board["Tactical board"]
  node_pitch["Tactical pitch<br/>[FootballPitch.tsx]"]
  node_player_marker["Player marker<br/>[PlayerMarker.tsx]"]
  node_instructions["Player instructions"]
end

subgraph group_squad["Squad management"]
  node_players_ui["Squad manager<br/>[Players.tsx]"]
  node_saved_tactics["Saved tactics<br/>[SavedTactics.tsx]"]
end

subgraph group_storage["Data and storage"]
  node_formation_data["Formation definitions<br/>[formations.ts]"]
  node_player_data["Player storage helpers<br/>[players.ts]"]
  node_browser_storage[("Browser localStorage")]
end

node_user(("Team planner"))

node_user -->|"uses"| node_home
node_home -->|"shows"| node_formation_grid
node_home -->|"shows"| node_pitch
node_home -->|"shows"| node_players_ui
node_home -->|"shows"| node_saved_tactics
node_formation_grid -->|"reads"| node_formation_data
node_formation_grid -->|"renders"| node_formation_card
node_formation_card -->|"uses type"| node_formation_data
node_pitch -->|"uses type"| node_formation_data
node_pitch -->|"loads players"| node_player_data
node_pitch -->|"renders"| node_player_marker
node_pitch -->|"uses"| node_instructions
node_players_ui -->|"manages players"| node_player_data
node_player_data -->|"reads and writes"| node_browser_storage
node_players_ui -.->|"reads and writes"| node_browser_storage
node_pitch -->|"saves tactics"| node_browser_storage
node_saved_tactics -->|"loads and deletes"| node_browser_storage
node_saved_tactics -->|"opens tactic"| node_home

click node_home "https://github.com/nishancshetty/football-9a-tactics-planner/blob/main/src/app/page.tsx"
click node_formation_grid "https://github.com/nishancshetty/football-9a-tactics-planner/blob/main/src/components/FormationGrid.tsx"
click node_formation_card "https://github.com/nishancshetty/football-9a-tactics-planner/blob/main/src/components/FormationCard.tsx"
click node_formation_data "https://github.com/nishancshetty/football-9a-tactics-planner/blob/main/src/data/formations.ts"
click node_pitch "https://github.com/nishancshetty/football-9a-tactics-planner/blob/main/src/components/FootballPitch.tsx"
click node_player_marker "https://github.com/nishancshetty/football-9a-tactics-planner/blob/main/src/components/PlayerMarker.tsx"
click node_instructions "https://github.com/nishancshetty/football-9a-tactics-planner/blob/main/src/components/PlayerInstructions.tsx"
click node_players_ui "https://github.com/nishancshetty/football-9a-tactics-planner/blob/main/src/components/Players.tsx"
click node_saved_tactics "https://github.com/nishancshetty/football-9a-tactics-planner/blob/main/src/components/SavedTactics.tsx"
click node_player_data "https://github.com/nishancshetty/football-9a-tactics-planner/blob/main/src/data/players.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_home toneBlue
class node_formation_grid,node_formation_card toneAmber
class node_pitch,node_player_marker,node_instructions toneMint
class node_players_ui,node_saved_tactics toneRose
class node_formation_data,node_player_data,node_browser_storage,node_user toneIndigo
```

## Components

### App navigation

- [Planner page](https://github.com/nishancshetty/football-9a-tactics-planner/blob/main/src/app/page.tsx): `src/app/page.tsx`

### Formation selection

- [Formation grid](https://github.com/nishancshetty/football-9a-tactics-planner/blob/main/src/components/FormationGrid.tsx): `src/components/FormationGrid.tsx`
- [Formation card](https://github.com/nishancshetty/football-9a-tactics-planner/blob/main/src/components/FormationCard.tsx): `src/components/FormationCard.tsx`

### Tactical board

- [Tactical pitch](https://github.com/nishancshetty/football-9a-tactics-planner/blob/main/src/components/FootballPitch.tsx): `src/components/FootballPitch.tsx`
- [Player marker](https://github.com/nishancshetty/football-9a-tactics-planner/blob/main/src/components/PlayerMarker.tsx): `src/components/PlayerMarker.tsx`
- [Player instructions](https://github.com/nishancshetty/football-9a-tactics-planner/blob/main/src/components/PlayerInstructions.tsx): `src/components/PlayerInstructions.tsx`

### Squad management

- [Squad manager](https://github.com/nishancshetty/football-9a-tactics-planner/blob/main/src/components/Players.tsx): `src/components/Players.tsx`
- [Saved tactics](https://github.com/nishancshetty/football-9a-tactics-planner/blob/main/src/components/SavedTactics.tsx): `src/components/SavedTactics.tsx`

### Data and storage

- [Formation definitions](https://github.com/nishancshetty/football-9a-tactics-planner/blob/main/src/data/formations.ts): `src/data/formations.ts`
- [Player storage helpers](https://github.com/nishancshetty/football-9a-tactics-planner/blob/main/src/data/players.ts): `src/data/players.ts`
- **Browser localStorage**

### Other components

- **Team planner**

## Connections

- Team planner → Planner page: uses (evidence: `README.md`)
- Planner page → Formation grid: shows (evidence: `src/app/page.tsx`)
- Planner page → Tactical pitch: shows (evidence: `src/app/page.tsx`)
- Planner page → Squad manager: shows (evidence: `src/app/page.tsx`)
- Planner page → Saved tactics: shows (evidence: `src/app/page.tsx`)
- Formation grid → Formation definitions: reads (evidence: `src/components/FormationGrid.tsx`)
- Formation grid → Formation card: renders (evidence: `src/components/FormationGrid.tsx`)
- Formation card → Formation definitions: uses type (evidence: `src/components/FormationCard.tsx`)
- Tactical pitch → Formation definitions: uses type (evidence: `src/components/FootballPitch.tsx`)
- Tactical pitch → Player storage helpers: loads players (evidence: `src/components/FootballPitch.tsx`)
- Tactical pitch → Player marker: renders (evidence: `src/components/FootballPitch.tsx`)
- Tactical pitch → Player instructions: uses (evidence: `src/components/FootballPitch.tsx`)
- Squad manager → Player storage helpers: manages players (evidence: `src/components/Players.tsx`)
- Player storage helpers → Browser localStorage: reads and writes (evidence: `src/data/players.ts`)
- Squad manager → Browser localStorage: reads and writes
- Tactical pitch → Browser localStorage: saves tactics (evidence: `src/components/FootballPitch.tsx`)
- Saved tactics → Browser localStorage: loads and deletes (evidence: `src/components/SavedTactics.tsx`)
- Saved tactics → Planner page: opens tactic (evidence: `src/components/SavedTactics.tsx`)
