# hovhanneskeshishyan/pl-fixtures architecture

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

- Interactive diagram: https://gitdiagram.com/hovhanneskeshishyan/pl-fixtures
- Repository: https://github.com/hovhanneskeshishyan/pl-fixtures

## Overview

Premier League Fixtures is a Next.js app for browsing Premier League match schedules. The main workflow loads teams and saved filter preferences in the fixtures view, then hands them to the fixtures widget for team and limit selection and fixture display; preferences persist in cookies after consent. The app also offers AI score predictions, cookie consent, and a privacy-policy page. The fixture-list implementation is referenced in the source index but is absent from the supplied tree, so its node has no path; connections to it are limited to the shown widget usage.

Main entry points: [`src/widgets/pl-fixtures/ui/PlFixtures.tsx`](https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/widgets/pl-fixtures/ui/PlFixtures.tsx) (Fixtures Widget), [`src/views/fixtures-view/ui/FixturesView.tsx`](https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/views/fixtures-view/ui/FixturesView.tsx) (Fixtures View), [`src/app/page.tsx`](https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/app/page.tsx) (Fixtures Route), [`src/app/privacy-policy/page.tsx`](https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/app/privacy-policy/page.tsx) (Privacy Route)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and Navigation"]
  node_fixtures_route["Fixtures Route<br/>[page.tsx]"]
  node_privacy_route["Privacy Route<br/>[page.tsx]"]
  node_layout["Site Layout<br/>[layout.tsx]"]
  node_header["Header<br/>[Header.tsx]"]
  node_footer["Footer<br/>[Footer.tsx]"]
  node_privacy_view["Privacy View"]
  node_privacy_widget["Privacy Content<br/>[PrivacyPolicy.tsx]"]
end

subgraph group_fixtures["Fixture Browsing"]
  node_fixtures_view["Fixtures View<br/>[FixturesView.tsx]"]
  node_teams_api["Teams API<br/>[getTeams.ts]"]
  node_fixtures_widget["Fixtures Widget<br/>[PlFixtures.tsx]"]
  node_fixture_list["Fixture List"]
  node_team_selector["Team Selector<br/>[SelectTeams.tsx]"]
  node_limit_selector["Limit Selector<br/>[SelectLimit.tsx]"]
end

subgraph group_features["User Features"]
  node_cookie_consent["Cookie Consent<br/>[CookieConsent.tsx]"]
  node_ai_prediction["AI Prediction<br/>[AiPrediction.tsx]"]
  node_prediction_api["Prediction API<br/>[getPrediction.ts]"]
end

subgraph group_shared["Shared Services"]
  node_error_boundary["Error Boundary"]
  node_http_client["HTTP Client<br/>[http.ts]"]
end

node_visitor(("Visitor"))
node_backend(("Fixtures Backend"))

node_visitor -->|"opens"| node_fixtures_route
node_visitor -->|"opens"| node_privacy_route
node_fixtures_route -->|"wraps"| node_error_boundary
node_fixtures_route -->|"renders"| node_fixtures_view
node_privacy_route -->|"wraps"| node_error_boundary
node_privacy_route -->|"renders"| node_privacy_view
node_layout -->|"includes"| node_header
node_layout -->|"includes"| node_footer
node_fixtures_view -->|"loads teams"| node_teams_api
node_fixtures_view -->|"renders"| node_fixtures_widget
node_fixtures_view -->|"shows if needed"| node_cookie_consent
node_fixtures_widget -->|"renders"| node_team_selector
node_fixtures_widget -->|"renders"| node_limit_selector
node_fixtures_widget -->|"renders"| node_fixture_list
node_fixtures_widget -->|"reads consent"| node_cookie_consent
node_teams_api -->|"uses"| node_http_client
node_prediction_api -->|"uses"| node_http_client
node_http_client -->|"configures requests"| node_backend
node_privacy_view -->|"renders"| node_privacy_widget
node_ai_prediction -->|"requests prediction"| node_prediction_api

click node_fixtures_route "https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/app/page.tsx"
click node_privacy_route "https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/app/privacy-policy/page.tsx"
click node_layout "https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/app/layout.tsx"
click node_header "https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/widgets/header/ui/Header.tsx"
click node_footer "https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/widgets/footer/ui/Footer.tsx"
click node_fixtures_view "https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/views/fixtures-view/ui/FixturesView.tsx"
click node_teams_api "https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/entities/team/api/getTeams.ts"
click node_fixtures_widget "https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/widgets/pl-fixtures/ui/PlFixtures.tsx"
click node_team_selector "https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/features/select-teams/ui/SelectTeams.tsx"
click node_limit_selector "https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/features/select-limit/ui/SelectLimit.tsx"
click node_cookie_consent "https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/features/cookie-consent/ui/CookieConsent.tsx"
click node_ai_prediction "https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/features/ai-prediction/ui/AiPrediction.tsx"
click node_prediction_api "https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/features/ai-prediction/api/getPrediction.ts"
click node_privacy_view "https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/views/privacy-policy/ui/PrivacyPolicyView.tsx"
click node_privacy_widget "https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/widgets/privacy-policy/ui/PrivacyPolicy.tsx"
click node_error_boundary "https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/shared/ui/error-boundary/WithErrorBoundary.tsx"
click node_http_client "https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/shared/api/http.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_fixtures_route,node_privacy_route,node_layout,node_header,node_footer,node_privacy_view,node_privacy_widget toneBlue
class node_fixtures_view,node_teams_api,node_fixtures_widget,node_fixture_list,node_team_selector,node_limit_selector toneAmber
class node_cookie_consent,node_ai_prediction,node_prediction_api toneMint
class node_error_boundary,node_http_client toneRose
class node_visitor,node_backend toneIndigo
```

## Components

### App and Navigation

- [Fixtures Route](https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Privacy Route](https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/app/privacy-policy/page.tsx): `src/app/privacy-policy/page.tsx`
- [Site Layout](https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/app/layout.tsx): `src/app/layout.tsx`
- [Header](https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/widgets/header/ui/Header.tsx): `src/widgets/header/ui/Header.tsx`
- [Footer](https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/widgets/footer/ui/Footer.tsx): `src/widgets/footer/ui/Footer.tsx`
- [Privacy View](https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/views/privacy-policy/ui/PrivacyPolicyView.tsx): `src/views/privacy-policy/ui/PrivacyPolicyView.tsx`
- [Privacy Content](https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/widgets/privacy-policy/ui/PrivacyPolicy.tsx): `src/widgets/privacy-policy/ui/PrivacyPolicy.tsx`

### Fixture Browsing

- [Fixtures View](https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/views/fixtures-view/ui/FixturesView.tsx): `src/views/fixtures-view/ui/FixturesView.tsx`
- [Teams API](https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/entities/team/api/getTeams.ts): `src/entities/team/api/getTeams.ts`
- [Fixtures Widget](https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/widgets/pl-fixtures/ui/PlFixtures.tsx): `src/widgets/pl-fixtures/ui/PlFixtures.tsx`
- **Fixture List**
- [Team Selector](https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/features/select-teams/ui/SelectTeams.tsx): `src/features/select-teams/ui/SelectTeams.tsx`
- [Limit Selector](https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/features/select-limit/ui/SelectLimit.tsx): `src/features/select-limit/ui/SelectLimit.tsx`

### User Features

- [Cookie Consent](https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/features/cookie-consent/ui/CookieConsent.tsx): `src/features/cookie-consent/ui/CookieConsent.tsx`
- [AI Prediction](https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/features/ai-prediction/ui/AiPrediction.tsx): `src/features/ai-prediction/ui/AiPrediction.tsx`
- [Prediction API](https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/features/ai-prediction/api/getPrediction.ts): `src/features/ai-prediction/api/getPrediction.ts`

### Shared Services

- [Error Boundary](https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/shared/ui/error-boundary/WithErrorBoundary.tsx): `src/shared/ui/error-boundary/WithErrorBoundary.tsx`
- [HTTP Client](https://github.com/hovhanneskeshishyan/pl-fixtures/blob/main/src/shared/api/http.ts): `src/shared/api/http.ts`

### Other components

- **Visitor**
- **Fixtures Backend**

## Connections

- Visitor → Fixtures Route: opens (evidence: `src/app/page.tsx`)
- Visitor → Privacy Route: opens (evidence: `src/app/privacy-policy/page.tsx`)
- Fixtures Route → Error Boundary: wraps (evidence: `src/app/page.tsx`)
- Fixtures Route → Fixtures View: renders (evidence: `src/app/page.tsx`)
- Privacy Route → Error Boundary: wraps (evidence: `src/app/privacy-policy/page.tsx`)
- Privacy Route → Privacy View: renders (evidence: `src/app/privacy-policy/page.tsx`)
- Site Layout → Header: includes (evidence: `src/app/layout.tsx`)
- Site Layout → Footer: includes (evidence: `src/app/layout.tsx`)
- Fixtures View → Teams API: loads teams (evidence: `src/views/fixtures-view/ui/FixturesView.tsx`)
- Fixtures View → Fixtures Widget: renders (evidence: `src/views/fixtures-view/ui/FixturesView.tsx`)
- Fixtures View → Cookie Consent: shows if needed (evidence: `src/views/fixtures-view/ui/FixturesView.tsx`)
- Fixtures Widget → Team Selector: renders (evidence: `src/widgets/pl-fixtures/ui/PlFixtures.tsx`)
- Fixtures Widget → Limit Selector: renders (evidence: `src/widgets/pl-fixtures/ui/PlFixtures.tsx`)
- Fixtures Widget → Fixture List: renders (evidence: `src/widgets/pl-fixtures/ui/PlFixtures.tsx`)
- Fixtures Widget → Cookie Consent: reads consent (evidence: `src/widgets/pl-fixtures/ui/PlFixtures.tsx`)
- Teams API → HTTP Client: uses (evidence: `src/entities/team/api/getTeams.ts`)
- Prediction API → HTTP Client: uses (evidence: `src/features/ai-prediction/api/getPrediction.ts`)
- HTTP Client → Fixtures Backend: configures requests (evidence: `src/shared/api/http.ts`)
- Privacy View → Privacy Content: renders (evidence: `src/views/privacy-policy/ui/PrivacyPolicyView.tsx`)
- AI Prediction → Prediction API: requests prediction (evidence: `src/features/ai-prediction/ui/AiPrediction.tsx`)
