# arjun99ab/ovo architecture

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

- Interactive diagram: https://gitdiagram.com/arjun99ab/ovo
- Repository: https://github.com/arjun99ab/ovo

## Overview

##### Main Components
a. Modloader Core: The heart of the system responsible for orchestrating mod management. This includes modules like the modloader scripts found under src/modloaders and the various version-specific directories (e.g., 1.4.x, dimensions_v101, etc.).
b. User Interface (GUI): The front-end components (HTML, CSS, and JavaScript under directories such as src/img, assets, and various index.html files) that display menus, mod lists, and settings dialogs.
c. Mod Management & Customization: Components that handle the enabling/disabling of mods, configuration of custom mod settings, and integration of community-made mods. This is reflected in the “mods” directories (e.g., src/mods/general, src/mods/modloader) and the configuration files (such as storage.json and mod configuration files).
d. Skin and Community Level Support: There are directories for skins (src/skins), community levels (src/communitylevels) and other customization assets that allow users to extend or modify the game experience.
e. Cross-Version & Data Persistence Layer: The project supports 9+ versions with shared storage and compatibility. This layer deals with saving settings, caching data across sessions, and ensuring that different versions of the modloader and the game runtime co-exist.

##### Relationships and Interactions
- The User Interface interacts directly with the Modloader Core by sending commands (enable/disable mods, update settings) and receiving status updates.
- The Modloader Core acts as a mediator – it loads mod scripts from both the “mods” and “modloaders” directories, coordinates community levels, and applies skins.
- The persistent data/configuration component ensures settings and mod choices persist in local storage or configuration files across sessions.
- The system supports multiple game runtime versions. These are maintained in separate version-specific directories (like 1.4.x, dimensions_qa_*, etc.) and the mod loader switches or adapts its behavior accordingly.
- External integrations (like GameAnalytics, Crazygames SDK, etc.) are included in several directories and should be represented as external services interacting with the modloader.

##### Architectural Patterns and Important Design Principles
- Modularity: The project is broken up into many independent modules (for mods, skins, community-levels, version-specific configuration) that the core loader integrates.
- Separation of Concerns: A clear separation is maintained between the user interface components and the logic for loading and managing mods.
- Extensibility/Plugin System: The design supports adding custom mods and skins with minimal changes to the core structure.
- Cross-Version Compatibility: The system design allows a single modloader to work with multiple, sometimes significantly different versions of underlying game code.

##### Relevant Technologies
- JavaScript is used heavily for dynamic mod loading and interactivity.
- HTML/CSS (with usage of files such as animate.css and fonts.css) for the GUI.
- Various support libraries like Tween.js for animations, Howler.js for audio, and GameAnalytics.js for analytics.
- Offline and caching solutions (e.g., offlineClient.js, sw.js) to support cross-session data persistence.

## Diagram (Mermaid)

```mermaid
flowchart TD
    User["User"]:::user
    GUI["OvO Modloader GUI"]:::ui
    Core["Modloader Core"]:::core

    User -->|"initiate"| GUI
    GUI -->|"sendCommands"| Core

    subgraph "Mods & Customization"
        GM["General Mods"]:::module
        MM["Modloader Mods"]:::module
        CFG["Mod Configurations"]:::module
    end
    Core -->|"loads"| GM
    Core -->|"loads"| MM
    Core -->|"updates"| CFG
    GM -->|"feedback"| Core
    MM -->|"feedback"| Core
    CFG -->|"feedback"| Core

    subgraph "Skins & Community Levels"
        SK["Skins"]:::module
        SI["Skin Icons"]:::module
        CL["Community Levels"]:::module
    end
    Core -->|"applies"| SK
    Core -->|"applies"| CL
    SK -->|"statusUpdate"| GUI

    subgraph "Version Management Module"
        V14["1.4"]:::module
        VQA["dimensions_qa_v3"]:::module
        V101["dimensions_v101"]:::module
    end
    Core -->|"adaptsTo"| V14
    Core -->|"adaptsTo"| VQA
    Core -->|"adaptsTo"| V101
    V14 -->|"runtimeInfo"| Core
    VQA -->|"runtimeInfo"| Core
    V101 -->|"runtimeInfo"| Core

    Persistence["Persistence Layer"]:::persistence
    Core -->|"savesTo"| Persistence
    Persistence -->|"returnsSettings"| Core

    External["External Services"]:::external
    Core -->|"reportsTo"| External

    click Core "https://github.com/arjun99ab/ovo/tree/main/src/modloaders"
    click V14 "https://github.com/arjun99ab/ovo/blob/main/1.4"
    click VQA "https://github.com/arjun99ab/ovo/tree/main/dimensions_qa_v3"
    click V101 "https://github.com/arjun99ab/ovo/tree/main/dimensions_v101"
    click GUI "https://github.com/arjun99ab/ovo/tree/main/assets"
    click GM "https://github.com/arjun99ab/ovo/tree/main/src/mods/general"
    click MM "https://github.com/arjun99ab/ovo/tree/main/src/mods/modloader"
    click CFG "https://github.com/arjun99ab/ovo/tree/main/src/mods/modloader/config"
    click SK "https://github.com/arjun99ab/ovo/tree/main/src/skins"
    click SI "https://github.com/arjun99ab/ovo/tree/main/src/skins/icons"
    click CL "https://github.com/arjun99ab/ovo/tree/main/src/communitylevels"
    click Persistence "https://github.com/arjun99ab/ovo/blob/main/offlineClient.js"

    classDef user fill:#cfc,stroke:#090,stroke-width:2px;
    classDef ui fill:#ccf,stroke:#339,stroke-width:2px;
    classDef core fill:#fcf,stroke:#933,stroke-width:2px;
    classDef module fill:#ffd,stroke:#cc0,stroke-width:2px;
    classDef persistence fill:#dff,stroke:#393,stroke-width:2px;
    classDef external fill:#fdd,stroke:#933,stroke-width:2px;
```
