# marcaureldev/afircan-basketball-league architecture

> Architecture diagram of the GitHub repository marcaureldev/afircan-basketball-league, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-11-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/marcaureldev/afircan-basketball-league
- Repository: https://github.com/marcaureldev/afircan-basketball-league

## Overview

##### Project type and purpose
- This is a Next.js 13+ full-stack React application (frontend-centric) that uses the App Router (src/app), server-side rendering (SSR) and/or static site generation (SSG).
- The README confirms it was bootstrapped with create-next-app and is intended to render a series of UI components (hero section, gallery, match cards, metrics, etc.) with theme toggling.

##### File structure
- Top-level files:
- next.config.ts, postcss.config.mjs, eslint.config.mjs → build & tooling configuration
- pnpm-lock.yaml, package.json → dependencies & scripts
- public/assets → static images served directly
- src/app → Next.js App Router:
- layout.tsx (site shell, global providers)
- page.tsx (home page entry point)
- globals.css (global styles)
- src/components → React components, two layers:
- src/components/ui → “atomic” UI primitives (Badge, Card, Button)
- src/components → composite/presentational components (Header, HeroSection, ImageGallery, MatchCard, Metrics, etc.)
- src/contexts → shared React contexts (ThemeContext)
- src/lib → data and utility functions (data.ts, utils.ts)

##### README for additional insights
- No custom API routes or external services called out.
- Optimization via next/font, deployment recommendation is Vercel.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client & Server
    Client["Client (Browser)"]:::external
    Server["Next.js Server / Vercel Edge Functions"]:::external

    %% Routing Layer
    subgraph "App Router (src/app)" 
        Layout["layout.tsx"]:::route
        Page["page.tsx"]:::route
        Globals["globals.css"]:::route
    end

    %% Context Layer
    Context["ThemeContext.tsx"]:::context

    %% Component Layer
    subgraph "Composite Components (src/components)"
        Header["Header.tsx"]:::ui
        Hero["HeroSection.tsx"]:::ui
        Gallery["ImageGallery.tsx"]:::ui
        LiveMatch["LiveMatchCard.tsx"]:::ui
        MatchCard["MatchCard.tsx"]:::ui
        Metrics["Metrics.tsx"]:::ui
        Recent["ResultatsRécents.tsx"]:::ui
        StackComp["Stack.tsx"]:::ui
        TextCursor["TextCursor.jsx"]:::ui
        ThemeToggle["ThemeToggle.tsx"]:::ui
        IndexComp["index.ts"]:::ui
    end

    subgraph "UI Primitives (src/components/ui)"
        Badge["Badge.tsx"]:::ui
        Card["Card.tsx"]:::ui
        Button["button.tsx"]:::ui
    end

    %% Data & Utilities
    subgraph "Data & Utilities (src/lib & root)"
        DataTs["data.ts"]:::data
        Utils["utils.ts"]:::data
        JSONComp["components.json"]:::data
    end

    %% Static Assets
    Assets["public/assets/images"]:::assets

    %% Build & Config
    subgraph "Build & Configuration"
        NextCfg["next.config.ts"]:::config
        PostCSS["postcss.config.mjs"]:::config
        ESLint["eslint.config.mjs"]:::config
        Package["package.json"]:::config
        Lock["pnpm-lock.yaml"]:::config
        Readme["README.md"]:::config
    end

    %% Connections
    Client -->|"HTTP GET"| Server
    Server -->|"Route Request"| Layout
    Layout -->|"Wraps"| Page
    Layout -->|"Includes"| Globals
    Page -->|"Renders"| Header
    Page -->|"Renders"| Hero
    Page -->|"Renders"| Gallery
    Page -->|"Renders"| LiveMatch
    Page -->|"Renders"| MatchCard
    Page -->|"Renders"| Metrics
    Page -->|"Renders"| Recent
    Page -->|"Renders"| StackComp
    Page -->|"Renders"| TextCursor
    Page -->|"Renders"| ThemeToggle
    Page -->|"Imports"| IndexComp

    Header -->|"Uses Primitives"| Badge
    Header -->|"Uses Primitives"| Button
    Hero -->|"Uses Primitives"| Card
    Hero -->|"Uses Data"| DataTs
    Gallery -->|"Uses Assets"| Assets
    LiveMatch -->|"Uses Data"| JSONComp
    MatchCard -->|"Uses Data"| JSONComp
    Metrics -->|"Uses Data"| DataTs
    Metrics -->|"Uses Utils"| Utils
    Recent -->|"Uses Data"| JSONComp
    StackComp -->|"Uses Primitives"| Badge
    TextCursor -->|"Uses Utils"| Utils
    ThemeToggle -->|"Uses Context"| Context

    %% Context interactions
    Header -->|"Reads/Writes"| Context
    Hero -->|"Reads"| Context
    ThemeToggle -->|"Updates"| Context

    %% Build dependencies
    Server -->|"Configured by"| NextCfg
    Server -->|"Configured by"| PostCSS
    Server -->|"Configured by"| ESLint
    Server -->|"Uses"| Package
    Server -->|"Uses"| Lock
    Server -->|"Docs"| Readme

    %% Click Events
    click Layout "https://github.com/marcaureldev/afircan-basketball-league/blob/main/src/app/layout.tsx"
    click Page "https://github.com/marcaureldev/afircan-basketball-league/blob/main/src/app/page.tsx"
    click Globals "https://github.com/marcaureldev/afircan-basketball-league/blob/main/src/app/globals.css"
    click Badge "https://github.com/marcaureldev/afircan-basketball-league/blob/main/src/components/ui/Badge.tsx"
    click Card "https://github.com/marcaureldev/afircan-basketball-league/blob/main/src/components/ui/Card.tsx"
    click Button "https://github.com/marcaureldev/afircan-basketball-league/blob/main/src/components/ui/button.tsx"
    click Header "https://github.com/marcaureldev/afircan-basketball-league/blob/main/src/components/Header.tsx"
    click Hero "https://github.com/marcaureldev/afircan-basketball-league/blob/main/src/components/HeroSection.tsx"
    click Gallery "https://github.com/marcaureldev/afircan-basketball-league/blob/main/src/components/ImageGallery.tsx"
    click LiveMatch "https://github.com/marcaureldev/afircan-basketball-league/blob/main/src/components/LiveMatchCard.tsx"
    click MatchCard "https://github.com/marcaureldev/afircan-basketball-league/blob/main/src/components/MatchCard.tsx"
    click Metrics "https://github.com/marcaureldev/afircan-basketball-league/blob/main/src/components/Metrics.tsx"
    click Recent "https://github.com/marcaureldev/afircan-basketball-league/blob/main/src/components/ResultatsRécents.tsx"
    click StackComp "https://github.com/marcaureldev/afircan-basketball-league/blob/main/src/components/Stack.tsx"
    click TextCursor "https://github.com/marcaureldev/afircan-basketball-league/blob/main/src/components/TextCursor.jsx"
    click ThemeToggle "https://github.com/marcaureldev/afircan-basketball-league/blob/main/src/components/ThemeToggle.tsx"
    click IndexComp "https://github.com/marcaureldev/afircan-basketball-league/blob/main/src/components/index.ts"
    click Context "https://github.com/marcaureldev/afircan-basketball-league/blob/main/src/contexts/ThemeContext.tsx"
    click DataTs "https://github.com/marcaureldev/afircan-basketball-league/blob/main/src/lib/data.ts"
    click Utils "https://github.com/marcaureldev/afircan-basketball-league/blob/main/src/lib/utils.ts"
    click JSONComp "https://github.com/marcaureldev/afircan-basketball-league/blob/main/components.json"
    click Assets "https://github.com/marcaureldev/afircan-basketball-league/tree/main/public/assets/images"
    click NextCfg "https://github.com/marcaureldev/afircan-basketball-league/blob/main/next.config.ts"
    click PostCSS "https://github.com/marcaureldev/afircan-basketball-league/blob/main/postcss.config.mjs"
    click ESLint "https://github.com/marcaureldev/afircan-basketball-league/blob/main/eslint.config.mjs"
    click Package "https://github.com/marcaureldev/afircan-basketball-league/blob/main/package.json"
    click Lock "https://github.com/marcaureldev/afircan-basketball-league/blob/main/pnpm-lock.yaml"
    click Readme "https://github.com/marcaureldev/afircan-basketball-league/blob/main/README.md"

    %% Styles
    classDef external fill:#ECECEC,stroke:#BBB,stroke-width:1px
    classDef route fill:#E5DBFF,stroke:#9977CC,stroke-width:1px
    classDef ui fill:#CDEDF6,stroke:#3399CC,stroke-width:1px
    classDef data fill:#D4F8E8,stroke:#33CC77,stroke-width:1px
    classDef context fill:#FFE5B4,stroke:#FF9900,stroke-width:1px
    classDef assets fill:#F2F2F2,stroke:#999,stroke-width:1px
    classDef config fill:#E0E0E0,stroke:#666,stroke-width:1px
```
