# samuelasherrivello/rmc-umvcs architecture

> Architecture diagram of the GitHub repository samuelasherrivello/rmc-umvcs, 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/samuelasherrivello/rmc-umvcs
- Repository: https://github.com/samuelasherrivello/rmc-umvcs

## Overview

##### Main components
– Controller (with further subdivisions for Commands, Events, and a base controller)
– Model (including data types, configuration data, and model locator)
– View (with base view implementations)
– Service (with base service classes)
– Context (the layer that glues actors together; includes BaseActor, BaseApp, etc.)
- Editor Extensions – Found under “RMC UMVCS/Editor”, these components provide Unity Editor-specific functionality. They mirror parts of the runtime structure but are meant for tooling and configuration within the Unity Editor.
- Core Utilities – Additionally, there are supporting directories for Components, Attributes, Design Patterns (like Singleton), and PropertyDrawers that are used throughout the framework.
- Samples & Tests – Although not “core” to the architecture, the Samples (especially the MyBouncyBallExample) demonstrate the practical implementation of the MVCS pattern. The Tests confirm that the architecture adheres to expected behaviors.

##### Out the relationships and interactions
- That the Context layer acts as an orchestrator between different modules, with the ability to coordinate or route messages/commands.

##### Architectural patterns and design principles
- Also, incorporate a section for “Utilities” (attributes, components, design patterns) which serve across multiple modules.
- If needed, add a note on external integration: although this package is self-contained, it is installed via npm or Git URL into Unity’s Package Manager. You might add a small “Package Manager” or “External Package” label to indicate this.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Runtime MVCS Core
    subgraph "Runtime MVCS Core"
        CONTROLLER["Controller"]:::runtime
        subgraph "Controller Submodules"
            CMD["Commands"]:::runtimeSub
            EVT["Events"]:::runtimeSub
        end
        MODEL["Model"]:::runtime
        VIEW["View"]:::runtime
        SERVICE["Service"]:::runtime
        CONTEXT["Context"]:::runtime
    end

    %% Editor Extensions
    subgraph "Editor Extensions"
        EDITOR["Editor Extensions"]:::editor
        PD["PropertyDrawers"]:::editorSub
    end

    %% Core Utilities
    subgraph "Core Utilities"
        ATTR["Attributes"]:::utilities
        COMP["Components"]:::utilities
        SINGLETON["Singleton"]:::utilities
    end

    %% Samples & Tests
    subgraph "Samples & Tests"
        SAMPLES["Samples (MyBouncyBallExample)"]:::samples
        TESTS["Tests"]:::samples
    end

    %% Relationships within Runtime MVCS Core
    CONTROLLER -->|"MethodCall"| MODEL
    CONTROLLER -->|"CommandEvent"| VIEW
    CONTROLLER -->|"Routes"| CONTEXT
    MODEL -->|"Data"| CONTEXT
    SERVICE -->|"ServiceCall"| CONTEXT
    CMD -->|"Triggers"| CONTROLLER
    EVT -->|"Triggers"| CONTROLLER
    CONTEXT -->|"Orchestrates"| SERVICE
    CONTEXT -->|"Orchestrates"| MODEL
    CONTEXT -->|"Orchestrates"| VIEW

    %% Editor interactions with Runtime
    EDITOR -->|"Configures"| CONTEXT
    EDITOR -->|"Configures"| VIEW

    %% Utilities usage inside Runtime
    ATTR -->|"UsedBy"| MODEL
    COMP -->|"UsedBy"| CONTROLLER
    SINGLETON -->|"PatternIn"| CONTROLLER
    SINGLETON -->|"PatternIn"| MODEL

    %% Samples and Tests interacting with Runtime
    SAMPLES -->|"Demonstrates"| CONTROLLER
    SAMPLES -->|"Demonstrates"| MODEL
    SAMPLES -->|"Demonstrates"| VIEW
    TESTS -->|"Tests"| CONTROLLER
    TESTS -->|"Tests"| MODEL
    TESTS -->|"Tests"| SERVICE

    %% Click Events
    click CONTROLLER "https://github.com/samuelasherrivello/rmc-umvcs/tree/master/RMC UMVCS/Runtime/RMC/Core/Architectures/UMVCS/Controller"
    click CMD "https://github.com/samuelasherrivello/rmc-umvcs/tree/master/RMC UMVCS/Runtime/RMC/Core/Architectures/UMVCS/Controller/Commands"
    click EVT "https://github.com/samuelasherrivello/rmc-umvcs/tree/master/RMC UMVCS/Runtime/RMC/Core/Architectures/UMVCS/Controller/Events"
    click MODEL "https://github.com/samuelasherrivello/rmc-umvcs/tree/master/RMC UMVCS/Runtime/RMC/Core/Architectures/UMVCS/Model"
    click VIEW "https://github.com/samuelasherrivello/rmc-umvcs/tree/master/RMC UMVCS/Runtime/RMC/Core/Architectures/UMVCS/View"
    click SERVICE "https://github.com/samuelasherrivello/rmc-umvcs/tree/master/RMC UMVCS/Runtime/RMC/Core/Architectures/UMVCS/Service"
    click CONTEXT "https://github.com/samuelasherrivello/rmc-umvcs/tree/master/RMC UMVCS/Runtime/RMC/Core/Architectures/UMVCS/Context"
    click EDITOR "https://github.com/samuelasherrivello/rmc-umvcs/tree/master/RMC UMVCS/Editor"
    click ATTR "https://github.com/samuelasherrivello/rmc-umvcs/tree/master/RMC UMVCS/Runtime/RMC/Core/Attributes"
    click COMP "https://github.com/samuelasherrivello/rmc-umvcs/tree/master/RMC UMVCS/Runtime/RMC/Core/Components"
    click SINGLETON "https://github.com/samuelasherrivello/rmc-umvcs/tree/master/RMC UMVCS/Runtime/RMC/Core/DesignPatterns/Singleton"
    click PD "https://github.com/samuelasherrivello/rmc-umvcs/tree/master/RMC UMVCS/Editor/RMC/Core/PropertyDrawers"
    click SAMPLES "https://github.com/samuelasherrivello/rmc-umvcs/tree/master/RMC UMVCS/Samples~"
    click TESTS "https://github.com/samuelasherrivello/rmc-umvcs/tree/master/RMC UMVCS/Tests"

    %% Styles
    classDef runtime fill:#ADD8E6,stroke:#000,stroke-width:1px;
    classDef runtimeSub fill:#B0E0E6,stroke:#000,stroke-width:1px;
    classDef editor fill:#90EE90,stroke:#000,stroke-width:1px;
    classDef editorSub fill:#98FB98,stroke:#000,stroke-width:1px;
    classDef utilities fill:#FFFACD,stroke:#000,stroke-width:1px;
    classDef samples fill:#FFB6C1,stroke:#000,stroke-width:1px;
```
