# xlenore/ps2-covers architecture

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

- Interactive diagram: https://gitdiagram.com/xlenore/ps2-covers
- Repository: https://github.com/xlenore/ps2-covers

## Overview

##### Main Components

a. Repository Structure
- Three sub-containers for the cover types:
- "3D Covers Storage" (/covers/3d)
- "Default Covers Storage" (/covers/default)
- "Custom Covers Storage" (/covers/custom)

b. Distribution System
- GitHub Raw Content Delivery
- URL Endpoints for cover access

c. Integration Points
- PCSX2 Emulator Connection
- PSCoverDL Tool Connection

- [Client Layer]
- PCSX2 Emulator
- PSCoverDL Tool

- [Distribution Layer]
- GitHub Raw Content Delivery

- [Storage Layer]
- Cover Repository Structure

##### Important Details

a. URL Pattern Notation:
- raw.githubusercontent.com/xlenore/ps2-covers/main/covers/{type}/{serial}.{extension}

b. Cover Types Support:
- Default: JPG format
- 3D: PNG format
- Custom: Various formats

c. Serial Number System:
- A note about the various serial prefixes (SLUS, SLES, etc.)
- Coverage statistics reference

##### Additional Elements

- Supported emulator versions (PCSX2 v1.7.3329+)

##### Flow Representation

- How PCSX2 requests covers using serial numbers
- How PSCoverDL tool fetches covers
- The path from storage to delivery

Remember to include a note about the missing_covers.txt file's role in tracking incomplete coverage, and consider adding a small section showing the contribution flow for new covers or corrections.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Client Layer"
        PCSX2[PCSX2 Emulator]:::client
        PSCoverDL[PSCoverDL Tool]:::client
    end

    subgraph "Distribution Layer"
        GithubRaw["GitHub Raw Content Delivery"]:::distribution
    end

    subgraph "Storage Layer"
        RepoMain["PS2-Covers Repository"]:::storage
        subgraph "Cover Types"
            Covers3D["3D Covers Storage (PNG)"]:::storage
            CoversDefault["Default Covers Storage (JPG)"]:::storage
            CoversCustom["Custom Covers Storage (Various)"]:::storage
        end
        MissingCovers["Missing Covers Tracking"]:::system
        Documentation["Project Documentation"]:::system
        VCConfig["Version Control Config"]:::system
    end

    %% Relationships
    PCSX2 -->|"Requests covers"| GithubRaw
    PSCoverDL -->|"Fetches covers"| GithubRaw
    GithubRaw -->|"Serves content"| RepoMain
    RepoMain --- Covers3D
    RepoMain --- CoversDefault
    RepoMain --- CoversCustom
    RepoMain --- MissingCovers
    RepoMain --- Documentation
    RepoMain --- VCConfig

    %% Click Events
    click Covers3D "https://github.com/xlenore/ps2-covers/tree/main/covers/3d"
    click CoversDefault "https://github.com/xlenore/ps2-covers/tree/main/covers/default"
    click CoversCustom "https://github.com/xlenore/ps2-covers/tree/main/covers/custom"
    click MissingCovers "https://github.com/xlenore/ps2-covers/blob/main/missing_covers.txt"
    click Documentation "https://github.com/xlenore/ps2-covers/blob/main/README.md"
    click VCConfig "https://github.com/xlenore/ps2-covers/blob/main/.gitignore"

    %% Styles
    classDef client fill:#90EE90,stroke:#333,stroke-width:2px
    classDef distribution fill:#DCDCDC,stroke:#333,stroke-width:2px
    classDef storage fill:#87CEEB,stroke:#333,stroke-width:2px
    classDef system fill:#FFA500,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        ClientNode[Client Applications]:::client
        DistNode[Distribution System]:::distribution
        StorageNode[Storage Components]:::storage
        SystemNode[System Files]:::system
    end
```
