# ebkr/r2modmanplus architecture

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

- Interactive diagram: https://gitdiagram.com/ebkr/r2modmanplus
- Repository: https://github.com/ebkr/r2modmanplus

## Overview

##### Main Components

a) Frontend Layer:
- Vue.js based UI components (src/components)
- Quasar Framework integration
- Store management (Vuex - src/store)
- Routing system (src/router)

b) Backend Layer (Electron):
- Main process (src-electron/main-process)
- IPC communication system
- File system operations
- Game management system

c) Core Services:
- Mod Management System
- Profile Management
- Package Installation System
- Game Directory Resolution
- Configuration Management
- Update System

##### Key Relationships to Highlight

a) Data Flow:
- User Interface → IPC Bridge → Main Process
- Main Process → File System
- Main Process → External Services (Thunderstore)
- Profile System → Mod Management
- Config Editor → File System

b) Integration Points:
- Game Platform Integration (Steam, Epic, Xbox)
- Mod Repository Integration
- Update Service Integration

**[User Interface Layer]**
- ↓↑
**[IPC Communication Layer]**
- ↓↑
**[Core Services Layer]**
- ↓↑
**[System Integration Layer]**

##### Important Elements

a) Core Features:
- Mod Download/Installation Pipeline
- Profile Management System
- Configuration Editor
- Game Detection System
- Update Management

b) External Integrations:
- Game Platforms (Steam, Epic, Xbox)
- Mod Repositories
- Auto-Update System

c) Storage Systems:
- Local File System Integration
- Profile Storage
- Configuration Storage
- Cache Management

##### Implementation Details to Highlight

- Cross-platform compatibility (Windows, Linux, macOS)
- Multiple game support architecture
- Profile import/export system
- Mod dependency management
- Configuration management system

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph UI
        FrontendUI["Frontend UI Components"]
        Store["Store Management"]
        Router["Routing System"]
    end

    subgraph ElectronLayer
        MainProcess["Main Process"]
        IPC["IPC Communication"]
    end

    subgraph CoreServices
        ModMgmt["Mod Management System"]
        ProfileMgmt["Profile Management"]
        PackageInstall["Package Installation"]
        GameDir["Game Directory Resolution"]
        ConfigMgmt["Configuration Management"]
        GameMgmt["Game Management"]
        FSOps["File System Operations"]
        UpdateSys["Update System"]
        CoreModels["Core Models"]
        ErrorHandle["Error Handling"]
    end

    subgraph ExternalIntegrations
        GamePlatforms["Game Platforms"]
        ModRepos["Mod Repositories"]
        AutoUpdate["Auto-Update System"]
    end

    %% Relationships
    FrontendUI <--> IPC
    Store <--> IPC
    Router <--> IPC
    IPC <--> MainProcess
    MainProcess <--> CoreServices
    ModMgmt <--> FSOps
    ProfileMgmt <--> FSOps
    GameMgmt <--> GamePlatforms
    UpdateSys <--> ModRepos
    UpdateSys <--> AutoUpdate
    CoreModels --> ErrorHandle

    %% Styling
    classDef frontend fill:#3498db
    classDef electron fill:#e74c3c
    classDef core fill:#2ecc71
    classDef external fill:#f39c12
    classDef error fill:#c0392b

    class FrontendUI,Store,Router frontend
    class MainProcess,IPC electron
    class ModMgmt,ProfileMgmt,PackageInstall,GameDir,ConfigMgmt,GameMgmt,FSOps,UpdateSys,CoreModels core
    class GamePlatforms,ModRepos,AutoUpdate external
    class ErrorHandle error

    %% Click Events
    click FrontendUI "https://github.com/ebkr/r2modmanPlus/tree/develop/src/components/"
    click Store "https://github.com/ebkr/r2modmanPlus/tree/develop/src/store/"
    click Router "https://github.com/ebkr/r2modmanPlus/tree/develop/src/router/"
    click MainProcess "https://github.com/ebkr/r2modmanPlus/tree/develop/src-electron/main-process/"
    click IPC "https://github.com/ebkr/r2modmanPlus/blob/develop/src-electron/main-process/ipcListeners.js"
    click ModMgmt "https://github.com/ebkr/r2modmanPlus/tree/develop/src/r2mm/mods/"
    click ProfileMgmt "https://github.com/ebkr/r2modmanPlus/tree/develop/src/r2mm/profiles/"
    click PackageInstall "https://github.com/ebkr/r2modmanPlus/tree/develop/src/installers/"
    click GameDir "https://github.com/ebkr/r2modmanPlus/tree/develop/src/providers/generic/game/directory_resolver/"
    click ConfigMgmt "https://github.com/ebkr/r2modmanPlus/tree/develop/src/r2mm/configs/"
    click GameMgmt "https://github.com/ebkr/r2modmanPlus/tree/develop/src/model/game/"
    click FSOps "https://github.com/ebkr/r2modmanPlus/tree/develop/src/providers/generic/file/"
    click UpdateSys "https://github.com/ebkr/r2modmanPlus/tree/develop/src/r2mm/downloading/"
    click CoreModels "https://github.com/ebkr/r2modmanPlus/tree/develop/src/model/"
    click ErrorHandle "https://github.com/ebkr/r2modmanPlus/tree/develop/src/model/errors/"
```
