# kando-menu/kando architecture

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

- Interactive diagram: https://gitdiagram.com/kando-menu/kando
- Repository: https://github.com/kando-menu/kando

## Overview

##### High-Level Architecture Components

a) Frontend Layer (Renderer Process)
- Menu System
- Editor Interface
- Input Methods

b) Backend Layer (Main Process)
- Platform-specific Backends
- Settings Management
- Update System

c) Common Layer
- Item Type System
- Action Registry
- Configuration Registry

##### Key Relationships to Highlight

a) Inter-Process Communication
- Electron's IPC between renderer and main processes
- Preload script as security boundary

b) Platform Integration
- Native backends for Windows, macOS, and Linux
- System-specific APIs (X11, Wayland, Windows API, macOS Cocoa)

##### Detailed Component Breakdown

Frontend (Renderer):
- Menu System
- Input Methods (Gamepad, Pointer, Touch)
- Theme Engine
- Sound System
- Editor
- Preview
- Properties
- Sidebar
- Toolbar
- Multiple Theme Implementations

Backend (Main):
- Platform Backends
- Windows
- macOS
- Linux (Multiple WM Support)
- Settings Manager
- Update Checker

##### Implementation Details

- Native code bridges (C++/Objective-C)
- Desktop environment integrations
- Input handling system
- Theme management
- Internationalization system

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Frontend["Frontend Layer (Renderer Process)"]
        MenuSystem["Menu System"]
        click MenuSystem "https://github.com/kando-menu/kando/tree/main/src/renderer/menu/"
        
        subgraph InputMethods["Input Methods"]
            GamepadInput["Gamepad Input"]
            PointerInput["Pointer Input"]
            TouchInput["Touch Input"]
        end
        click InputMethods "https://github.com/kando-menu/kando/tree/main/src/renderer/menu/input-methods/"
        
        SoundSystem["Sound System"]
        click SoundSystem "https://github.com/kando-menu/kando/blob/main/src/renderer/menu/sound-theme.ts"
        
        subgraph Editor["Editor Interface"]
            Preview["Preview"]
            Properties["Properties"]
            Sidebar["Sidebar"]
            Toolbar["Toolbar"]
        end
        click Editor "https://github.com/kando-menu/kando/tree/main/src/renderer/editor/"
        click Preview "https://github.com/kando-menu/kando/tree/main/src/renderer/editor/preview/"
        click Properties "https://github.com/kando-menu/kando/tree/main/src/renderer/editor/properties/"
        click Sidebar "https://github.com/kando-menu/kando/tree/main/src/renderer/editor/sidebar/"
        click Toolbar "https://github.com/kando-menu/kando/tree/main/src/renderer/editor/toolbar/"
        
        subgraph IconThemes["Icon Themes"]
            MaterialSymbols["Material Symbols"]
            SimpleIcons["Simple Icons"]
            EmojiTheme["Emoji Theme"]
        end
        click IconThemes "https://github.com/kando-menu/kando/tree/main/src/renderer/icon-themes/"
        click MaterialSymbols "https://github.com/kando-menu/kando/blob/main/src/renderer/icon-themes/material-symbols-theme.ts"
        click SimpleIcons "https://github.com/kando-menu/kando/blob/main/src/renderer/icon-themes/simple-icons-theme.ts"
        click EmojiTheme "https://github.com/kando-menu/kando/blob/main/src/renderer/icon-themes/emoji-theme.ts"
    end
    
    subgraph Backend["Backend Layer (Main Process)"]
        subgraph PlatformBackends["Platform Backends"]
            Windows["Windows Backend"]
            MacOS["macOS Backend"]
            Linux["Linux Backend"]
        end
        click PlatformBackends "https://github.com/kando-menu/kando/tree/main/src/main/backends/"
        click Windows "https://github.com/kando-menu/kando/tree/main/src/main/backends/windows/"
        click MacOS "https://github.com/kando-menu/kando/tree/main/src/main/backends/macos/"
        click Linux "https://github.com/kando-menu/kando/tree/main/src/main/backends/linux/"
        
        SettingsManager["Settings Manager"]
        click SettingsManager "https://github.com/kando-menu/kando/blob/main/src/main/settings.ts"
        
        UpdateChecker["Update Checker"]
        click UpdateChecker "https://github.com/kando-menu/kando/blob/main/src/main/update-checker.ts"
    end
    
    subgraph Common["Common Layer"]
        ItemTypes["Item Type System"]
        ActionRegistry["Action Registry"]
        ConfigRegistry["Configuration Registry"]
        click ItemTypes "https://github.com/kando-menu/kando/tree/main/src/common/item-types/"
        click ActionRegistry "https://github.com/kando-menu/kando/blob/main/src/common/item-action-registry.ts"
        click ConfigRegistry "https://github.com/kando-menu/kando/blob/main/src/common/item-config-registry.ts"
    end
    
    subgraph ThemeSystem["Theme System"]
        MenuThemes["Menu Themes"]
        DefaultTheme["Default Theme"]
        CleanCircle["Clean Circle"]
        NeonLights["Neon Lights"]
        RainbowLabels["Rainbow Labels"]
        click MenuThemes "https://github.com/kando-menu/kando/tree/main/assets/menu-themes/"
        click DefaultTheme "https://github.com/kando-menu/kando/tree/main/assets/menu-themes/default/"
        click CleanCircle "https://github.com/kando-menu/kando/tree/main/assets/menu-themes/clean-circle/"
        click NeonLights "https://github.com/kando-menu/kando/tree/main/assets/menu-themes/neon-lights/"
        click RainbowLabels "https://github.com/kando-menu/kando/tree/main/assets/menu-themes/rainbow-labels/"
    end
    
    %% Relationships
    MenuSystem --> InputMethods
    MenuSystem --> SoundSystem
    MenuSystem --> ThemeSystem
    Editor --> MenuSystem
    IconThemes --> MenuSystem
    
    PlatformBackends --> Windows
    PlatformBackends --> MacOS
    PlatformBackends --> Linux
    
    Frontend -.->|IPC| Backend
    Common --> Frontend
    Common --> Backend
    
    %% Styling
    classDef frontend fill:#a8d1f0,stroke:#333
    classDef backend fill:#90EE90,stroke:#333
    classDef common fill:#FFE5B4,stroke:#333
    classDef theme fill:#E6E6FA,stroke:#333
    
    class MenuSystem,Editor,IconThemes,InputMethods,SoundSystem frontend
    class PlatformBackends,SettingsManager,UpdateChecker backend
    class ItemTypes,ActionRegistry,ConfigRegistry common
    class ThemeSystem,MenuThemes,DefaultTheme,CleanCircle,NeonLights,RainbowLabels theme
```
