# simeydotme/pokemon-cards-css architecture

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

- Interactive diagram: https://gitdiagram.com/simeydotme/pokemon-cards-css
- Repository: https://github.com/simeydotme/pokemon-cards-css

## Overview

##### Static Assets Structure
- CSS Effects Library (showing the various card effect styles)
- Data Storage (cards.json)
- Images and Resources

##### State Management
- A "Stores" section showing:
- activeCard store
- orientation store

##### Specific Implementation Details

- How Card.svelte consumes the CSS effects
- Data flow from cards.json to the main components
- Demonstrate how the stores interact with the components

##### Technical Stack Indicators
- Badges or labels for:
- Svelte
- Vite
- CSS Modules
- JSON Data Storage

- The modular nature of the card effects (23+ different card styles)
- The component-based architecture of the Svelte application
- The separation of concerns between visual effects and application logic
- The state management flow

Key Considerations:
##### Build/bundling process with Vite

Remember to:
- Version information for major dependencies
- Entry points (main.js and App.svelte)
- Relationship between the development and production environments

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Legend"
        direction TB
        L1[Svelte Component]:::svelte
        L2[Static Asset]:::static
        L3[Store/State]:::store
        L4[Data File]:::data
        L5[Configuration]:::config
    end

    subgraph "Core Application"
        direction TB
        MAIN["main.js"]:::svelte
        APP["App.svelte"]:::svelte
        CARDS["Cards.svelte"]:::svelte
        SEARCH["Search.svelte"]:::svelte
    end

    subgraph "Component Library"
        direction TB
        CARD["Card.svelte"]:::svelte
        CARDPROXY["CardProxy.svelte"]:::svelte
        ALTARTS["alternate-arts.json"]:::data
        PROMOS["promos.json"]:::data
    end

    subgraph "Static Assets"
        direction TB
        subgraph "CSS Effects"
            direction TB
            BASE["base.css"]:::static
            EFFECTS["Card Effects"]:::static
            GLOBAL["global.css"]:::static
        end
        
        subgraph "Data"
            direction TB
            CARDSDATA["cards.json"]:::data
        end
    end

    subgraph "State Management"
        direction TB
        ACTIVECARD["activeCard Store"]:::store
        ORIENTATION["orientation Store"]:::store
    end

    subgraph "Configuration"
        direction TB
        VITE["vite.config.js"]:::config
        JSCONFIG["jsconfig.json"]:::config
    end

    subgraph "Utilities"
        direction TB
        MATH["Math.js"]:::svelte
    end

    %% Relationships
    MAIN --> APP
    APP --> CARDS
    APP --> SEARCH
    CARDS --> CARD
    CARD --> CARDPROXY
    CARD --> BASE
    CARD --> EFFECTS
    CARD -.-> ACTIVECARD
    CARD -.-> ORIENTATION
    CARDPROXY -.-> ALTARTS
    CARDPROXY -.-> PROMOS
    CARDS -.-> CARDSDATA
    SEARCH -.-> CARDSDATA
    CARD --> MATH

    %% Styles
    classDef svelte fill:#4A90E2,color:white
    classDef static fill:#2ECC71,color:white
    classDef store fill:#9B59B6,color:white
    classDef data fill:#F1C40F,color:black
    classDef config fill:#E74C3C,color:white

    %% Click Events
    click APP "https://github.com/simeydotme/pokemon-cards-css/blob/main/src/App.svelte"
    click CARDS "https://github.com/simeydotme/pokemon-cards-css/blob/main/src/Cards.svelte"
    click SEARCH "https://github.com/simeydotme/pokemon-cards-css/blob/main/src/Search.svelte"
    click CARD "https://github.com/simeydotme/pokemon-cards-css/blob/main/src/lib/components/Card.svelte"
    click CARDPROXY "https://github.com/simeydotme/pokemon-cards-css/blob/main/src/lib/components/CardProxy.svelte"
    click ALTARTS "https://github.com/simeydotme/pokemon-cards-css/blob/main/src/lib/components/alternate-arts.json"
    click PROMOS "https://github.com/simeydotme/pokemon-cards-css/blob/main/src/lib/components/promos.json"
    click BASE "https://github.com/simeydotme/pokemon-cards-css/blob/main/public/css/cards/base.css"
    click EFFECTS "https://github.com/simeydotme/pokemon-cards-css/tree/main/public/css/cards"
    click GLOBAL "https://github.com/simeydotme/pokemon-cards-css/blob/main/public/css/global.css"
    click ACTIVECARD "https://github.com/simeydotme/pokemon-cards-css/blob/main/src/lib/stores/activeCard.js"
    click ORIENTATION "https://github.com/simeydotme/pokemon-cards-css/blob/main/src/lib/stores/orientation.js"
    click CARDSDATA "https://github.com/simeydotme/pokemon-cards-css/blob/main/public/data/cards.json"
    click MAIN "https://github.com/simeydotme/pokemon-cards-css/blob/main/src/main.js"
    click VITE "https://github.com/simeydotme/pokemon-cards-css/blob/main/vite.config.js"
    click JSCONFIG "https://github.com/simeydotme/pokemon-cards-css/blob/main/jsconfig.json"
    click MATH "https://github.com/simeydotme/pokemon-cards-css/blob/main/src/lib/helpers/Math.js"
```
