# falleng0d/remoteinputserver architecture

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

- Interactive diagram: https://gitdiagram.com/falleng0d/remoteinputserver
- Repository: https://github.com/falleng0d/remoteinputserver

## Overview

##### Project Type Analysis
This is a Flutter application specifically designed for Windows, focusing on input handling and remote control functionality. The presence of win32-specific code suggests deep integration with Windows input systems.

##### Main Components

A. Frontend Layer (Flutter UI):
- Components Module (/lib/components/)
- Pages Module (/lib/pages/)
- Theme Configuration

B. Core Services Layer:
- Input Service System
- Win32 Integration Services
- Middleware Services

C. Platform Integration Layer:
- Windows Native Components
- Flutter-Windows Bridge

**[User Interface Layer]**
- ↑↓
**[Service Layer]**
- ↑↓
**[Platform Integration Layer]**

##### User Interface Layer (Top)
- To the central InputController
- Use light blue coloring for Flutter UI components

##### Service Layer (Middle)
- InputConfig and Middleware services
- Relationship between InputService and Win32InputService
- Use green coloring for service components

##### Platform Integration Layer (Bottom)
- Win32 Native Integration components
- Flutter-Windows bridge components
- Use orange coloring for platform-specific components

##### Data Flow Indicators
- Action buffering flow (referenced in architecture/action-buffering.puml)

##### The relationship between UI components and services

Remember to include references to the existing architecture files (.puml) in the architecture directory, as they likely contain additional detailed information about specific subsystems.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles and Classes
    classDef ui fill:#e1f5fe,stroke:#01579b
    classDef service fill:#e8f5e9,stroke:#1b5e20
    classDef platform fill:#fff3e0,stroke:#e65100
    classDef middleware fill:#f3e5f5,stroke:#4a148c

    %% UI Layer
    subgraph UI
        CursorBox["Cursor Interface"]:::ui
        KeyPreview["Key Preview"]:::ui
        ServerStatus["Server Status"]:::ui
        ServerStarter["Server Starter Page"]:::ui
        ThemeConfig["Theme Configuration"]:::ui
    end

    %% Service Layer
    subgraph Services
        InputService["Input Service"]:::service
        InputConfig["Input Configuration"]:::service
        InputController["Input Controller"]:::service
        Win32InputService["Win32 Input Service"]:::service
        Win32Input["Win32 Input Implementation"]:::service
        VirtualKeys["Virtual Key Handler"]:::service
        Middleware["Middleware Services"]:::middleware
    end

    %% Platform Layer
    subgraph Platform
        Win32Window["Win32 Window"]:::platform
        FlutterWindow["Flutter Window"]:::platform
        PluginRegistrant["Plugin Registrant"]:::platform
        CMakeConfig["CMake Configuration"]:::platform
    end

    %% Relationships
    CursorBox --> InputController
    KeyPreview --> InputController
    ServerStatus --> InputController
    ServerStarter --> InputService
    
    InputController --> InputService
    InputService --> InputConfig
    InputService --> Middleware
    InputService --> Win32InputService
    
    Win32InputService --> Win32Input
    Win32Input --> VirtualKeys
    
    Win32Input --> Win32Window
    Win32Window --> FlutterWindow
    FlutterWindow --> PluginRegistrant
    PluginRegistrant --> CMakeConfig

    %% Click Events
    click CursorBox "https://github.com/falleng0d/remoteinputserver/blob/master/lib/components/cursor_box.dart"
    click KeyPreview "https://github.com/falleng0d/remoteinputserver/blob/master/lib/components/key_preview.dart"
    click ServerStatus "https://github.com/falleng0d/remoteinputserver/blob/master/lib/components/server_status.dart"
    click ServerStarter "https://github.com/falleng0d/remoteinputserver/blob/master/lib/pages/server_starter.page.dart"
    click ThemeConfig "https://github.com/falleng0d/remoteinputserver/blob/master/lib/theme.dart"
    click InputService "https://github.com/falleng0d/remoteinputserver/blob/master/lib/services/input_service.dart"
    click InputConfig "https://github.com/falleng0d/remoteinputserver/blob/master/lib/services/input_config.dart"
    click InputController "https://github.com/falleng0d/remoteinputserver/blob/master/lib/controllers/input_controller.dart"
    click Win32InputService "https://github.com/falleng0d/remoteinputserver/blob/master/lib/services/win32_input_service.dart"
    click Win32Input "https://github.com/falleng0d/remoteinputserver/blob/master/lib/services/win32_input.dart"
    click VirtualKeys "https://github.com/falleng0d/remoteinputserver/blob/master/lib/win32vk/virtualkeys.dart"
    click Middleware "https://github.com/falleng0d/remoteinputserver/blob/master/lib/services/middlewares.dart"
    click Win32Window "https://github.com/falleng0d/remoteinputserver/blob/master/windows/runner/win32_window.cpp"
    click FlutterWindow "https://github.com/falleng0d/remoteinputserver/blob/master/windows/runner/flutter_window.cpp"
    click PluginRegistrant "https://github.com/falleng0d/remoteinputserver/blob/master/windows/flutter/generated_plugin_registrant.cc"
    click CMakeConfig "https://github.com/falleng0d/remoteinputserver/blob/master/windows/flutter/CMakeLists.txt"

    %% Legend
    subgraph Legend
        UI_Component["UI Component"]:::ui
        Service_Component["Service Component"]:::service
        Platform_Component["Platform Component"]:::platform
        Middleware_Component["Middleware Component"]:::middleware
    end
```
