# brunobriante/moondeck architecture

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

- Interactive diagram: https://gitdiagram.com/brunobriante/moondeck
- Repository: https://github.com/brunobriante/moondeck

## Overview

##### Main Components Identification

a) Frontend Components (src/components/):
- Game Session Management
- Host Selection/Management
- Settings Management
- Quick Settings Interface
- Status Indicators
- Shortcuts Management

b) Backend Components (defaults/python/):
- Buddy Client
- Moonlight Proxy
- Settings Manager
- Runner System

c) External Services:
- MoonDeck Buddy (remote component)
- Moonlight Client
- Sunshine Server
- Steam Client

**[User Interface Layer]**
- ↓↑
**[Plugin Core Layer]**
- ↓↑
**[Integration Layer]**
- ↓↑
**[External Services Layer]**

##### Component Relationships

- → Synchronous communication
- ⇢ Asynchronous communication
- ⇄ Bi-directional communication

##### Detailed Component Breakdown

Frontend Layer:
**[Quick Settings View] ← [Game Session View]**
- ↓
**[Host Selection] ← [Settings Management]**
- ↓
**[Status Indicators] ← [Shortcuts Manager]**

Backend Layer:
**[Buddy Client] ⇄ [Moonlight Proxy]**
- ↓
**[Settings Manager] ⇄ [Runner System]**
- ↓
**[Steam Utils] ⇄ [Connectivity Manager]**

External Services:
**[MoonDeck Buddy] ⇄ [Sunshine Server]**
- ↓
**[Moonlight Client] ⇄ [Steam Client]**

##### Key Features to Highlight

- Automation flow for game launching
- Communication between plugin and MoonDeck Buddy
- Integration with Steam client
- Settings synchronization
- Status monitoring system

##### Additional Elements

- File storage locations
- Configuration paths
- Log file locations
- Communication protocols

##### Implementation Notes

- Use standardized UML notation where applicable
- Version information
- System requirements
- Security boundaries
- Critical paths

##### Technical Details

- Python backend services
- React/TypeScript frontend
- Steam integration points
- Network protocols
- File system interactions

##### Documentation References

References to:
- Configuration files
- Log locations
- Plugin installation path
- External dependencies

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "User Interface Layer"
        GSV["Game Session View"]
        QSV["Quick Settings View"]
        HSV["Host Selection View"]
        SSV["Status Indicators View"]
        SCV["Shortcuts View"]
        HSM["Host Settings View"]
    end

    subgraph "Plugin Core Layer"
        SM["Settings Manager"]
        SCM["Shortcuts Manager"]
        CM["Connectivity Manager"]
        MAL["MoonDeck App Launcher"]
        SU["Steam Utils"]
    end

    subgraph "Backend Layer"
        BC["Buddy Client"]
        MP["Moonlight Proxy"]
        RS["Runner System"]
        BSM["Backend Settings Manager"]
    end

    subgraph "External Services Layer"
        MDB["MoonDeck Buddy"]
        MC["Moonlight Client"]
        SS["Sunshine Server"]
        SC["Steam Client"]
    end

    %% Frontend Relationships
    GSV --> QSV
    QSV --> HSV
    HSV --> HSM
    HSV --> SSV
    SSV --> SCV

    %% Core Layer Relationships
    SM --> MAL
    SCM --> MAL
    CM --> MAL
    SU --> MAL

    %% Backend Relationships
    BC <--> MP
    MP <--> RS
    RS <--> BSM

    %% Cross-Layer Relationships
    MAL --> BC
    BSM --> SM
    BC --> MDB
    MP --> MC
    MDB --> SS
    MC --> SC

    %% Component Styling
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef core fill:#2ecc71,stroke:#27ae60,color:white
    classDef backend fill:#e67e22,stroke:#d35400,color:white
    classDef external fill:#95a5a6,stroke:#7f8c8d,color:white

    class GSV,QSV,HSV,SSV,SCV,HSM frontend
    class SM,SCM,CM,MAL,SU core
    class BC,MP,RS,BSM backend
    class MDB,MC,SS,SC external

    %% Click Events
    click GSV "https://github.com/brunobriante/moondeck/blob/main/src/components/gamesessionview/gamesessionview.tsx"
    click QSV "https://github.com/brunobriante/moondeck/blob/main/src/components/quicksettingsview/quicksettingsview.tsx"
    click HSV "https://github.com/brunobriante/moondeck/blob/main/src/components/hostselectionview/hostselectionview.tsx"
    click SSV "https://github.com/brunobriante/moondeck/blob/main/src/components/statusindicatorsview/statusindicatorsview.tsx"
    click SCV "https://github.com/brunobriante/moondeck/blob/main/src/components/shortcutsview/shortcutsview.tsx"
    click HSM "https://github.com/brunobriante/moondeck/blob/main/src/components/hostsettingsview/hostsettingsview.tsx"
    click SM "https://github.com/brunobriante/moondeck/blob/main/src/lib/settingsmanager.ts"
    click SCM "https://github.com/brunobriante/moondeck/blob/main/src/lib/shortcutmanager.ts"
    click CM "https://github.com/brunobriante/moondeck/blob/main/src/lib/connectivitymanager.ts"
    click MAL "https://github.com/brunobriante/moondeck/blob/main/src/lib/moondeckapplauncher.ts"
    click SU "https://github.com/brunobriante/moondeck/blob/main/src/lib/steamutils.ts"
    click BC "https://github.com/brunobriante/moondeck/blob/main/defaults/python/lib/buddyclient.py"
    click MP "https://github.com/brunobriante/moondeck/blob/main/defaults/python/lib/moonlightproxy.py"
    click RS "https://github.com/brunobriante/moondeck/blob/main/defaults/python/runner.py"
    click BSM "https://github.com/brunobriante/moondeck/blob/main/defaults/python/lib/settings.py"
```
