# marcant01/fluent-screen-recorder architecture

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

- Interactive diagram: https://gitdiagram.com/marcant01/fluent-screen-recorder
- Repository: https://github.com/marcant01/fluent-screen-recorder

## Overview

##### Main Components

A. Core Recording Components:
- CaptureEncoder Module
- ScreenSenderComponent (Audio Capture)
- Direct3D11 Graphics Pipeline

B. Application Layer:
- UI Components (XAML-based)
- ViewModels (MVVM Pattern)
- Settings Management

C. External Integrations:
- Windows Share API
- AppCenter Integration
- Windows Store Integration

**[User Interface Layer]**
- ↑↓
**[Application Logic Layer]**
- ↑↓
**[Core Recording Layer]**
- ↑↓
**[System Integration Layer]**

##### Detailed Component Breakdown

A. User Interface Layer (Purple):
- Main Recording Interface
- Video Preview
- Settings Panel
- Player Interface

B. Application Logic Layer (Green):
- RecorderHelper
- SettingsViewModel
- Custom Media Transport Controls

C. Core Recording Layer (Orange):
- Screen Capture Engine
- Audio Graph Helper
- Loopback Audio Capture
- Encoder Pipeline

D. System Integration Layer (Gray):
- Windows API Integration
- File System Access
- Share Contract

##### Technical Details to Highlight

- Direct3D11 Integration
- Audio Graph System
- Encoding Pipeline
- MVVM Architecture
- UWP Platform Services

##### Implementation Notes

- Real-time processing flow
- Audio/Video synchronization
- Settings management
- UI/Backend communication

Key Relationships to Highlight:
- CaptureEncoder ↔ Direct3D11Helpers
- AudioGraphHelper ↔ LoopbackAudioCapture
- ViewModels ↔ Views
- Settings System ↔ Application State

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph UI
        MainUI["Main Recording Interface"]:::ui
        VP["Video Preview"]:::ui
        SP["Settings Panel"]:::ui
        PI["Player Interface"]:::ui
        CMTC["Custom Media Transport Controls"]:::ui
    end

    subgraph AppLogic
        RH["RecorderHelper"]:::logic
        SVM["SettingsViewModel"]:::logic
        SM["Settings Management"]:::logic
    end

    subgraph CoreRecording
        CE["CaptureEncoder Module"]:::core
        D3D["Direct3D11 Graphics Pipeline"]:::core
        ACS["Audio Capture System"]:::core
        LAC["Loopback Audio Capture"]:::core
    end

    subgraph SystemIntegration
        WSA["Windows Share API"]:::system
        ACI["AppCenter Integration"]:::system
        WSI["Windows Store Integration"]:::system
    end

    subgraph Support
        MLS["Multilingual Support System"]:::support
        SUC["Settings UI Controls"]:::support
    end

    %% Relationships
    MainUI --> RH
    VP --> RH
    SP --> SVM
    PI --> CMTC
    
    RH --> CE
    RH --> ACS
    SVM --> SM
    
    CE --> D3D
    ACS --> LAC
    
    CE --> WSA
    RH --> ACI
    SM --> WSI
    
    SP --> SUC
    MainUI --> MLS

    %% Click Events
    click MainUI "https://github.com/MarcAnt01/Fluent-Screen-Recorder/blob/master/FluentScreenRecorder/Views/MainPage.xaml"
    click VP "https://github.com/MarcAnt01/Fluent-Screen-Recorder/blob/master/FluentScreenRecorder/Views/VideoPreviewPage.xaml"
    click SP "https://github.com/MarcAnt01/Fluent-Screen-Recorder/blob/master/FluentScreenRecorder/Views/SettingsPage.xaml"
    click PI "https://github.com/MarcAnt01/Fluent-Screen-Recorder/blob/master/FluentScreenRecorder/Views/PlayerPage.xaml"
    click CMTC "https://github.com/MarcAnt01/Fluent-Screen-Recorder/blob/master/FluentScreenRecorder/CustomMediaTransportControls.cs"
    click RH "https://github.com/MarcAnt01/Fluent-Screen-Recorder/blob/master/FluentScreenRecorder/ViewModels/RecorderHelper.cs"
    click SVM "https://github.com/MarcAnt01/Fluent-Screen-Recorder/blob/master/FluentScreenRecorder/ViewModels/SettingsViewModel.cs"
    click SM "https://github.com/MarcAnt01/Fluent-Screen-Recorder/blob/master/Microsoft.PowerToys.Settings.UI"
    click CE "https://github.com/MarcAnt01/Fluent-Screen-Recorder/tree/master/CaptureEncoder"
    click D3D "https://github.com/MarcAnt01/Fluent-Screen-Recorder/blob/master/CaptureEncoder/Direct3D11Helpers.cs"
    click ACS "https://github.com/MarcAnt01/Fluent-Screen-Recorder/blob/master/ScreenSenderComponent/AudioGraphHelper.cpp"
    click LAC "https://github.com/MarcAnt01/Fluent-Screen-Recorder/blob/master/ScreenSenderComponent/LoopbackAudioCapture.cpp"
    click MLS "https://github.com/MarcAnt01/Fluent-Screen-Recorder/tree/master/FluentScreenRecorder/MultilingualResources"
    click SUC "https://github.com/MarcAnt01/Fluent-Screen-Recorder/tree/master/Microsoft.PowerToys.Settings.UI/Controls/Setting"

    %% Styles
    classDef ui fill:#e6e6fa,stroke:#000
    classDef logic fill:#90ee90,stroke:#000
    classDef core fill:#ffa500,stroke:#000
    classDef system fill:#d3d3d3,stroke:#000
    classDef support fill:#add8e6,stroke:#000

    %% Legend
    subgraph Legend
        UI_L["UI Component"]:::ui
        LOG_L["Logic Component"]:::logic
        CORE_L["Core Component"]:::core
        SYS_L["System Integration"]:::system
        SUP_L["Support Systems"]:::support
    end
```
