# zercorex/royal-blade-wiki architecture

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

- Interactive diagram: https://gitdiagram.com/zercorex/royal-blade-wiki
- Repository: https://github.com/zercorex/royal-blade-wiki

## Overview

##### Main Components
- HTML Pages – Represent the different sections of the wiki (e.g., index.html, store.html, database.html, mechanics.html, universes.html). These pages serve as entry points.
- CSS Styling – Located in docs/styles. This includes global styles (core.css and normalize.css), page-specific styles (e.g., home.css, store.css, etc.), and custom fonts.
- JavaScript Modules – Found under docs/scripts and its sub-folders. These files provide:
– Site navigation (nav.js, pages.js)
– Dynamic page functionality like dark mode (darkmode.js), image view handling (image-view.js), and slider functionality.
– Sheet data functionality (in docs/scripts/sheetdata), which likely handles fetching, viewing, and displaying dynamic or structured content.
- Fonts – The project imports custom fonts (Kanit, Rubik) which are defined in docs/styles/Fonts.

##### Architectural Patterns and Design Principles
- Client-Side Rendering – The entire site operates on the client side; the browser loads static content and enhances it with JavaScript.
- Separation of Concerns – Clearly distinguish between content (HTML), presentation (CSS, Fonts), behavior (JavaScript), and assets (images).

## Diagram (Mermaid)

```mermaid
graph TD
    Browser["Browser/Client"]:::client

    subgraph "HTML Pages"
        INDEX["index.html"]:::html
        STORE["store.html"]:::html
        DATABASE["database.html"]:::html
        MECHANICS["mechanics.html"]:::html
        UNIVERSES["universes.html"]:::html
    end

    CSS["CSS Styling"]:::css
    JS["JavaScript Modules"]:::js
    JS_Gen["General JS Modules"]:::js
    JS_Sheet["Sheetdata Modules"]:::sheet
    ASSETS["Assets (Images & Icons)"]:::assets
    FONTS["Fonts"]:::fonts

    Browser -->|"loads"| INDEX
    Browser -->|"loads"| STORE
    Browser -->|"loads"| DATABASE
    Browser -->|"loads"| MECHANICS
    Browser -->|"loads"| UNIVERSES

    %% HTML Pages load shared resources
    INDEX -->|"loads"| CSS
    INDEX -->|"loads"| JS
    INDEX -->|"loads"| ASSETS

    STORE -->|"loads"| CSS
    STORE -->|"loads"| JS
    STORE -->|"loads"| ASSETS

    DATABASE -->|"loads"| CSS
    DATABASE -->|"loads"| JS
    DATABASE -->|"loads"| ASSETS

    MECHANICS -->|"loads"| CSS
    MECHANICS -->|"loads"| JS
    MECHANICS -->|"loads"| ASSETS

    UNIVERSES -->|"loads"| CSS
    UNIVERSES -->|"loads"| JS
    UNIVERSES -->|"loads"| ASSETS

    %% CSS references fonts
    CSS -->|"references"| FONTS

    %% JavaScript Modules structure and interactions
    JS --> JS_Gen
    JS --> JS_Sheet
    JS_Gen -->|"calls"| JS_Sheet
    JS_Sheet -->|"updates"| INDEX

    %% Browser interacts with assets and triggers JS events
    Browser -->|"triggers"| JS
    Browser -->|"renders"| CSS
    Browser -->|"interacts"| ASSETS

    %% Click Events
    click INDEX "https://github.com/zercorex/royal-blade-wiki/blob/build-8/docs/index.html"
    click STORE "https://github.com/zercorex/royal-blade-wiki/blob/build-8/docs/store.html"
    click DATABASE "https://github.com/zercorex/royal-blade-wiki/blob/build-8/docs/database.html"
    click MECHANICS "https://github.com/zercorex/royal-blade-wiki/blob/build-8/docs/mechanics.html"
    click UNIVERSES "https://github.com/zercorex/royal-blade-wiki/blob/build-8/docs/universes.html"
    click CSS "https://github.com/zercorex/royal-blade-wiki/tree/build-8/docs/styles"
    click JS_Gen "https://github.com/zercorex/royal-blade-wiki/tree/build-8/docs/scripts"
    click JS_Sheet "https://github.com/zercorex/royal-blade-wiki/tree/build-8/docs/scripts/sheetdata"
    click ASSETS "https://github.com/zercorex/royal-blade-wiki/tree/build-8/docs/assets"
    click FONTS "https://github.com/zercorex/royal-blade-wiki/tree/build-8/docs/styles/Fonts"

    %% Styles
    classDef client fill:#FFEFD5,stroke:#333,stroke-width:2px;
    classDef html fill:#ADD8E6,stroke:#333,stroke-width:2px;
    classDef css fill:#90EE90,stroke:#333,stroke-width:2px;
    classDef js fill:#E6E6FA,stroke:#333,stroke-width:2px;
    classDef sheet fill:#DDA0DD,stroke:#333,stroke-width:2px;
    classDef assets fill:#FFFACD,stroke:#333,stroke-width:2px;
    classDef fonts fill:#F0E68C,stroke:#333,stroke-width:2px;
```
