# villavu/srl-development architecture

> Architecture diagram of the GitHub repository villavu/srl-development, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/villavu/srl-development
- Repository: https://github.com/villavu/srl-development

## Overview

##### Main Components Structure

A. Core Library Layer (Top Level)
- Utils Module (Fundamental utilities)
- OSR Module (Game-specific functionality)
- Plugins (Native extensions)

B. Feature Modules Layer (Middle Level)
- Interface Interaction Systems
- Navigation Systems
- Game State Detection
- Input/Output Systems

C. Resource Layer (Bottom Level)
- Fonts
- Templates
- Data

##### Component Relationships

- Utils (Base utilities)
- OSR (Game interface)
- Plugins (Native extensions)

b) Feature Modules (Use rounded rectangles):
- Interface Handlers (inventory.simba, bank.simba, etc.)
- Navigation System (walker/*)
- Combat System (combat.simba)
- Input System (remoteinput.simba)

- Font Resources
- Data
- Templates

##### Specific Implementation Details

Key subsystems:
**[Remote Input System] ←→ [Game Interface]**
- ↓
**[Navigation System] ←→ [World Map Data]**
- ↓
- ↓
**[Resource Management] ←→ [Font System]**

##### Notes Section
Technical notes about:
- Plugin dependencies
- Required Simba version
- OS compatibility
- Memory management

Remember to highlight the critical paths for:
- Input handling
- Navigation systems
- Interface interaction
- Resource management

This will create a comprehensive visualization of the SRL library's architecture while maintaining clarity about component relationships and dependencies.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Style Definitions
    classDef core fill:#3498db,stroke:#2980b9,color:white
    classDef feature fill:#2ecc71,stroke:#27ae60,color:white
    classDef resource fill:#f1c40f,stroke:#f39c12,color:black
    classDef critical fill:#e74c3c,stroke:#c0392b,color:white
    classDef utility fill:#95a5a6,stroke:#7f8c8d,color:white

    %% Core Layer
    subgraph Core
        Utils["Utils Module"]
        OSR["OSR Module"]
        Plugins["Plugins System"]
    end

    %% Feature Modules Layer
    subgraph Features
        Interface["Interface Handlers"]
        Navigation["Navigation System"]
        Combat["Combat System"]
        InputSystem["Input System"]
        Bank["Bank Interface"]
        Inventory["Inventory System"]
        GameTabs["Game Tabs"]
        Stats["Stats System"]
        Equipment["Equipment System"]
        Prayer["Prayer System"]
        Magic["Magic System"]
    end

    %% Resource Layer
    subgraph Resources
        Fonts[("Font Resources")]
        Colors[("Color Definitions")]
        MapData[("Map Data")]
        Templates[("Templates")]
    end

    %% Utility Components
    subgraph Utilities
        Mouse["Mouse Control"]
        Keyboard["Keyboard Control"]
        Math["Math Utilities"]
        Drawing["Drawing Utilities"]
    end

    %% Relationships
    Utils --> OSR
    OSR --> Plugins
    InputSystem --> OSR
    Navigation --> MapData
    Interface --> Colors
    Interface --> Templates
    Combat --> Equipment
    Bank --> Interface
    Inventory --> Interface
    Mouse --> InputSystem
    Keyboard --> InputSystem
    Drawing --> Interface
    Math --> Navigation

    %% Click Events
    click Utils "https://github.com/Villavu/SRL-Development/tree/master/utils"
    click OSR "https://github.com/Villavu/SRL-Development/tree/master/osr"
    click Plugins "https://github.com/Villavu/SRL-Development/tree/master/plugins"
    click Interface "https://github.com/Villavu/SRL-Development/blob/master/osr/interface.simba"
    click Navigation "https://github.com/Villavu/SRL-Development/tree/master/osr/walker"
    click Combat "https://github.com/Villavu/SRL-Development/blob/master/osr/combat.simba"
    click InputSystem "https://github.com/Villavu/SRL-Development/blob/master/osr/remoteinput.simba"
    click Bank "https://github.com/Villavu/SRL-Development/blob/master/osr/bank.simba"
    click Inventory "https://github.com/Villavu/SRL-Development/blob/master/osr/inventory.simba"
    click Fonts "https://github.com/Villavu/SRL-Development/tree/master/fonts"
    click Colors "https://github.com/Villavu/SRL-Development/tree/master/osr/colors"
    click MapData "https://github.com/Villavu/SRL-Development/tree/master/osr/walker/maps"
    click Templates "https://github.com/Villavu/SRL-Development/tree/master/templates"
    click GameTabs "https://github.com/Villavu/SRL-Development/blob/master/osr/gametabs.simba"
    click Stats "https://github.com/Villavu/SRL-Development/blob/master/osr/stats.simba"
    click Equipment "https://github.com/Villavu/SRL-Development/blob/master/osr/equipment.simba"
    click Prayer "https://github.com/Villavu/SRL-Development/blob/master/osr/prayer.simba"
    click Magic "https://github.com/Villavu/SRL-Development/blob/master/osr/magic.simba"
    click Mouse "https://github.com/Villavu/SRL-Development/blob/master/utils/mouse.simba"
    click Keyboard "https://github.com/Villavu/SRL-Development/blob/master/utils/keyboard.simba"
    click Math "https://github.com/Villavu/SRL-Development/blob/master/utils/math.simba"
    click Drawing "https://github.com/Villavu/SRL-Development/blob/master/utils/drawing.simba"

    %% Style Applications
    class Utils,OSR,Plugins core
    class Interface,Navigation,Combat,InputSystem,Bank,Inventory,GameTabs,Stats,Equipment,Prayer,Magic feature
    class Fonts,Colors,MapData,Templates resource
    class Mouse,Keyboard,Math,Drawing utility

    %% Legend
    subgraph Legend
        CoreL["Core Component"]:::core
        FeatureL["Feature Module"]:::feature
        ResourceL[("Resource")]:::resource
        UtilityL["Utility"]:::utility
    end
```
