# guminskiadrian/playercards architecture

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

- Interactive diagram: https://gitdiagram.com/guminskiadrian/playercards
- Repository: https://github.com/guminskiadrian/playercards

## Overview

This React app presents English Premier League teams and their players using TheSportsDB. The page loads teams first, each team loads its roster, and selecting a player requests and displays that player’s additional details. The excerpts show the main component calls and API endpoints; no README product documentation beyond the Create React App boilerplate describes further capabilities.

Main entry points: [`src/services/api.ts`](https://github.com/guminskiadrian/playercards/blob/main/src/services/api.ts) (Sports data API), [`src/App.tsx`](https://github.com/guminskiadrian/playercards/blob/main/src/App.tsx) (Teams page), [`src/components/teamCard.tsx`](https://github.com/guminskiadrian/playercards/blob/main/src/components/teamCard.tsx) (Team roster), [`src/components/playerCard.tsx`](https://github.com/guminskiadrian/playercards/blob/main/src/components/playerCard.tsx) (Player card)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["League browser"]
  node_entry["React entry<br/>[index.tsx]"]
  node_teams_page["Teams page<br/>[App.tsx]"]
end

subgraph group_components["Team and player views"]
  node_team_view["Team roster<br/>[teamCard.tsx]"]
  node_player_view["Player card<br/>[playerCard.tsx]"]
  node_player_details["Player details<br/>[playerDataCard.tsx]"]
end

subgraph group_data["API and models"]
  node_api["Sports data API<br/>[api.ts]"]
  node_types["Domain interfaces<br/>[interfaces.ts]"]
end

node_user(("Browser user"))
node_sportsdb["TheSportsDB"]

node_user -->|"opens app"| node_entry
node_entry -->|"renders"| node_teams_page
node_teams_page -->|"fetches teams"| node_api
node_api -->|"requests league data"| node_sportsdb
node_teams_page -->|"renders teams"| node_team_view
node_team_view -->|"fetches roster"| node_api
node_api -->|"requests players"| node_sportsdb
node_team_view -->|"renders roster"| node_player_view
node_player_view -->|"fetches details"| node_api
node_api -->|"requests player data"| node_sportsdb
node_player_view -->|"renders details"| node_player_details

click node_entry "https://github.com/guminskiadrian/playercards/blob/main/src/index.tsx"
click node_teams_page "https://github.com/guminskiadrian/playercards/blob/main/src/App.tsx"
click node_team_view "https://github.com/guminskiadrian/playercards/blob/main/src/components/teamCard.tsx"
click node_player_view "https://github.com/guminskiadrian/playercards/blob/main/src/components/playerCard.tsx"
click node_player_details "https://github.com/guminskiadrian/playercards/blob/main/src/components/playerDataCard.tsx"
click node_api "https://github.com/guminskiadrian/playercards/blob/main/src/services/api.ts"
click node_types "https://github.com/guminskiadrian/playercards/blob/main/src/interfaces.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_entry,node_teams_page,node_user toneBlue
class node_team_view,node_player_view,node_player_details toneAmber
class node_api,node_types toneMint
class node_sportsdb toneIndigo
```

## Components

### League browser

- [React entry](https://github.com/guminskiadrian/playercards/blob/main/src/index.tsx): `src/index.tsx`
- [Teams page](https://github.com/guminskiadrian/playercards/blob/main/src/App.tsx): `src/App.tsx`

### Team and player views

- [Team roster](https://github.com/guminskiadrian/playercards/blob/main/src/components/teamCard.tsx): `src/components/teamCard.tsx`
- [Player card](https://github.com/guminskiadrian/playercards/blob/main/src/components/playerCard.tsx): `src/components/playerCard.tsx`
- [Player details](https://github.com/guminskiadrian/playercards/blob/main/src/components/playerDataCard.tsx): `src/components/playerDataCard.tsx`

### API and models

- [Sports data API](https://github.com/guminskiadrian/playercards/blob/main/src/services/api.ts): `src/services/api.ts`
- [Domain interfaces](https://github.com/guminskiadrian/playercards/blob/main/src/interfaces.ts): `src/interfaces.ts`

### Other components

- **Browser user**
- **TheSportsDB**

## Connections

- Browser user → React entry: opens app (evidence: `src/index.tsx`)
- React entry → Teams page: renders (evidence: `src/index.tsx`)
- Teams page → Sports data API: fetches teams (evidence: `src/App.tsx`)
- Sports data API → TheSportsDB: requests league data (evidence: `src/services/api.ts`)
- Teams page → Team roster: renders teams (evidence: `src/App.tsx`)
- Team roster → Sports data API: fetches roster (evidence: `src/components/teamCard.tsx`)
- Sports data API → TheSportsDB: requests players (evidence: `src/services/api.ts`)
- Team roster → Player card: renders roster (evidence: `src/components/teamCard.tsx`)
- Player card → Sports data API: fetches details (evidence: `src/components/playerCard.tsx`)
- Sports data API → TheSportsDB: requests player data (evidence: `src/services/api.ts`)
- Player card → Player details: renders details (evidence: `src/components/playerCard.tsx`)
