# fvffv/drivedesktop architecture

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

- Interactive diagram: https://gitdiagram.com/fvffv/drivedesktop
- Repository: https://github.com/fvffv/drivedesktop

## Overview

DriveDesktop is a cross-platform Avalonia client for a cloud-drive service. Its main workflow takes a signed-in user from browsing and searching files through preview, file operations, transfer, and sharing; settings and usage analytics support that workflow. A separate plugin system extends file menus and app entry points using isolated plugin processes. The README documents capabilities beyond the sampled excerpts, so those branches are represented at subsystem level; links are limited to documented or sampled interactions.

Main entry points: [`PluginPlatform/Drive.Plugin.Hosting/PluginManager.cs`](https://github.com/fvffv/drivedesktop/blob/main/PluginPlatform/Drive.Plugin.Hosting/PluginManager.cs) (Plugin manager), [`Services/FileTransmissionService.cs`](https://github.com/fvffv/drivedesktop/blob/main/Services/FileTransmissionService.cs) (Transfer center), [`Services/ICloudDriveApi.cs`](https://github.com/fvffv/drivedesktop/blob/main/Services/ICloudDriveApi.cs) (Cloud API contract), [`PluginPlatform/Drive.Plugin.Hosting/PluginSession.cs`](https://github.com/fvffv/drivedesktop/blob/main/PluginPlatform/Drive.Plugin.Hosting/PluginSession.cs) (Plugin sessions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Desktop client"]
  node_app["Application startup<br/>[App.axaml.cs]"]
  node_main["Main window"]
  node_home["Home view<br/>[Home.axaml.cs]"]
end

subgraph group_files["File workflows"]
  node_filesvm["File management"]
  node_search["Search and filters"]
  node_preview["Content previews"]
  node_share["Sharing"]
  node_transfer["Transfer center"]
  node_multipart["Chunked uploads"]
  node_transferui["Transfer view model"]
end

subgraph group_account["Account services"]
  node_cloudapi["Cloud API contract<br/>[ICloudDriveApi.cs]"]
  node_webapi["Web API client<br/>[WebApiService.cs]"]
  node_accountsvc["Account and preferences<br/>[UserInfoService.cs]"]
  node_settings["User settings"]
  node_dashboard["Usage dashboard"]
end

subgraph group_plugins["Plugin platform"]
  node_pluginui["Plugin management UI"]
  node_manager["Plugin manager<br/>[PluginManager.cs]"]
  node_session["Plugin sessions<br/>[PluginSession.cs]"]
  node_runner["Plugin runner<br/>[Program.cs]"]
  node_sdk["Plugin SDK<br/>[PluginContext.cs]"]
  node_storage[("Plugin storage<br/>[PluginStorage.cs]")]
end

subgraph group_extensions["Built-in plugins"]
  node_archive["Archive preview<br/>[Plugin.cs]"]
  node_imagetools["Image tools<br/>[Plugin.cs]"]
  node_retouch["Portrait retouch<br/>[Plugin.cs]"]
end

node_user(("Drive user"))

node_user -->|"uses"| node_main
node_app -->|"opens"| node_main
node_main -->|"hosts"| node_home
node_home -->|"presents"| node_filesvm
node_user -->|"browses and acts"| node_filesvm
node_filesvm -->|"requests file operations"| node_cloudapi
node_search -->|"requests search"| node_cloudapi
node_user -->|"searches files"| node_search
node_user -->|"opens content"| node_preview
node_user -->|"manages shares"| node_share
node_share -->|"requests shared download"| node_transfer
node_user -->|"controls tasks"| node_transferui
node_transferui -->|"controls transfers"| node_transfer
node_transfer -->|"requests transfer data"| node_cloudapi
node_transfer -->|"uploads chunks"| node_multipart
node_transfer -->|"reads account context"| node_accountsvc
node_cloudapi -->|"implemented by"| node_webapi
node_settings -->|"updates preferences"| node_accountsvc
node_dashboard -->|"requests usage data"| node_cloudapi
node_user -->|"manages plugins"| node_pluginui
node_app -->|"starts and shuts down"| node_pluginui
node_pluginui -->|"scans and controls"| node_manager
node_manager -->|"creates sessions"| node_session
node_session -->|"launches process"| node_runner
node_runner -->|"hosts plugin context"| node_sdk
node_sdk -->|"sends host requests"| node_session
node_session -->|"dispatches storage operations"| node_storage
node_manager -.->|"loads enabled plugin"| node_archive
node_manager -.->|"loads enabled plugin"| node_imagetools
node_manager -.->|"loads enabled plugin"| node_retouch

click node_app "https://github.com/fvffv/drivedesktop/blob/main/App.axaml.cs"
click node_main "https://github.com/fvffv/drivedesktop/blob/main/Views/MainWindow.axaml.cs"
click node_home "https://github.com/fvffv/drivedesktop/blob/main/Views/Home.axaml.cs"
click node_filesvm "https://github.com/fvffv/drivedesktop/blob/main/ViewModels/FilePageViewModel.cs"
click node_search "https://github.com/fvffv/drivedesktop/blob/main/ViewModels/SearchPageViewModel.cs"
click node_preview "https://github.com/fvffv/drivedesktop/blob/main/Components/UserControls/DocumentViewDialog.axaml.cs"
click node_share "https://github.com/fvffv/drivedesktop/blob/main/ViewModels/FileSharePageViewModel.cs"
click node_transfer "https://github.com/fvffv/drivedesktop/blob/main/Services/FileTransmissionService.cs"
click node_multipart "https://github.com/fvffv/drivedesktop/blob/main/Services/MultipartUploadService.cs"
click node_transferui "https://github.com/fvffv/drivedesktop/blob/main/ViewModels/FileTransmissionViewModel.cs"
click node_cloudapi "https://github.com/fvffv/drivedesktop/blob/main/Services/ICloudDriveApi.cs"
click node_webapi "https://github.com/fvffv/drivedesktop/blob/main/Services/WebApiService.cs"
click node_accountsvc "https://github.com/fvffv/drivedesktop/blob/main/Services/UserInfoService.cs"
click node_settings "https://github.com/fvffv/drivedesktop/blob/main/ViewModels/SettingPageViewModel.cs"
click node_dashboard "https://github.com/fvffv/drivedesktop/blob/main/ViewModels/StatisticsDashboardPageViewModel.cs"
click node_pluginui "https://github.com/fvffv/drivedesktop/blob/main/Services/Plugins/DesktopPluginService.cs"
click node_manager "https://github.com/fvffv/drivedesktop/blob/main/PluginPlatform/Drive.Plugin.Hosting/PluginManager.cs"
click node_session "https://github.com/fvffv/drivedesktop/blob/main/PluginPlatform/Drive.Plugin.Hosting/PluginSession.cs"
click node_runner "https://github.com/fvffv/drivedesktop/blob/main/PluginPlatform/Drive.Plugin.Runner/Program.cs"
click node_sdk "https://github.com/fvffv/drivedesktop/blob/main/PluginPlatform/Drive.Plugin.SDK/PluginContext.cs"
click node_storage "https://github.com/fvffv/drivedesktop/blob/main/PluginPlatform/Drive.Plugin.Hosting/PluginStorage.cs"
click node_archive "https://github.com/fvffv/drivedesktop/blob/main/PluginPlatform/plugins/ArchivePreviewPlugin/Plugin.cs"
click node_imagetools "https://github.com/fvffv/drivedesktop/blob/main/PluginPlatform/plugins/ImageToolsPlugin/Plugin.cs"
click node_retouch "https://github.com/fvffv/drivedesktop/blob/main/PluginPlatform/plugins/PortraitRetouchPlugin/Plugin.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_main,node_home,node_user toneBlue
class node_filesvm,node_search,node_preview,node_share,node_transfer,node_multipart,node_transferui toneAmber
class node_cloudapi,node_webapi,node_accountsvc,node_settings,node_dashboard toneMint
class node_pluginui,node_manager,node_session,node_runner,node_sdk,node_storage toneRose
class node_archive,node_imagetools,node_retouch toneIndigo
```

## Components

### Desktop client

- [Application startup](https://github.com/fvffv/drivedesktop/blob/main/App.axaml.cs): `App.axaml.cs`
- [Main window](https://github.com/fvffv/drivedesktop/blob/main/Views/MainWindow.axaml.cs): `Views/MainWindow.axaml.cs`
- [Home view](https://github.com/fvffv/drivedesktop/blob/main/Views/Home.axaml.cs): `Views/Home.axaml.cs`

### File workflows

- [File management](https://github.com/fvffv/drivedesktop/blob/main/ViewModels/FilePageViewModel.cs): `ViewModels/FilePageViewModel.cs`
- [Search and filters](https://github.com/fvffv/drivedesktop/blob/main/ViewModels/SearchPageViewModel.cs): `ViewModels/SearchPageViewModel.cs`
- [Content previews](https://github.com/fvffv/drivedesktop/blob/main/Components/UserControls/DocumentViewDialog.axaml.cs): `Components/UserControls/DocumentViewDialog.axaml.cs`
- [Sharing](https://github.com/fvffv/drivedesktop/blob/main/ViewModels/FileSharePageViewModel.cs): `ViewModels/FileSharePageViewModel.cs`
- [Transfer center](https://github.com/fvffv/drivedesktop/blob/main/Services/FileTransmissionService.cs): `Services/FileTransmissionService.cs`
- [Chunked uploads](https://github.com/fvffv/drivedesktop/blob/main/Services/MultipartUploadService.cs): `Services/MultipartUploadService.cs`
- [Transfer view model](https://github.com/fvffv/drivedesktop/blob/main/ViewModels/FileTransmissionViewModel.cs): `ViewModels/FileTransmissionViewModel.cs`

### Account services

- [Cloud API contract](https://github.com/fvffv/drivedesktop/blob/main/Services/ICloudDriveApi.cs): `Services/ICloudDriveApi.cs`
- [Web API client](https://github.com/fvffv/drivedesktop/blob/main/Services/WebApiService.cs): `Services/WebApiService.cs`
- [Account and preferences](https://github.com/fvffv/drivedesktop/blob/main/Services/UserInfoService.cs): `Services/UserInfoService.cs`
- [User settings](https://github.com/fvffv/drivedesktop/blob/main/ViewModels/SettingPageViewModel.cs): `ViewModels/SettingPageViewModel.cs`
- [Usage dashboard](https://github.com/fvffv/drivedesktop/blob/main/ViewModels/StatisticsDashboardPageViewModel.cs): `ViewModels/StatisticsDashboardPageViewModel.cs`

### Plugin platform

- [Plugin management UI](https://github.com/fvffv/drivedesktop/blob/main/Services/Plugins/DesktopPluginService.cs): `Services/Plugins/DesktopPluginService.cs`
- [Plugin manager](https://github.com/fvffv/drivedesktop/blob/main/PluginPlatform/Drive.Plugin.Hosting/PluginManager.cs): `PluginPlatform/Drive.Plugin.Hosting/PluginManager.cs`
- [Plugin sessions](https://github.com/fvffv/drivedesktop/blob/main/PluginPlatform/Drive.Plugin.Hosting/PluginSession.cs): `PluginPlatform/Drive.Plugin.Hosting/PluginSession.cs`
- [Plugin runner](https://github.com/fvffv/drivedesktop/blob/main/PluginPlatform/Drive.Plugin.Runner/Program.cs): `PluginPlatform/Drive.Plugin.Runner/Program.cs`
- [Plugin SDK](https://github.com/fvffv/drivedesktop/blob/main/PluginPlatform/Drive.Plugin.SDK/PluginContext.cs): `PluginPlatform/Drive.Plugin.SDK/PluginContext.cs`
- [Plugin storage](https://github.com/fvffv/drivedesktop/blob/main/PluginPlatform/Drive.Plugin.Hosting/PluginStorage.cs): `PluginPlatform/Drive.Plugin.Hosting/PluginStorage.cs`

### Built-in plugins

- [Archive preview](https://github.com/fvffv/drivedesktop/blob/main/PluginPlatform/plugins/ArchivePreviewPlugin/Plugin.cs): `PluginPlatform/plugins/ArchivePreviewPlugin/Plugin.cs`
- [Image tools](https://github.com/fvffv/drivedesktop/blob/main/PluginPlatform/plugins/ImageToolsPlugin/Plugin.cs): `PluginPlatform/plugins/ImageToolsPlugin/Plugin.cs`
- [Portrait retouch](https://github.com/fvffv/drivedesktop/blob/main/PluginPlatform/plugins/PortraitRetouchPlugin/Plugin.cs): `PluginPlatform/plugins/PortraitRetouchPlugin/Plugin.cs`

### Other components

- **Drive user**

## Connections

- Drive user → Main window: uses
- Application startup → Main window: opens
- Main window → Home view: hosts
- Home view → File management: presents
- Drive user → File management: browses and acts
- File management → Cloud API contract: requests file operations
- Search and filters → Cloud API contract: requests search
- Drive user → Search and filters: searches files
- Drive user → Content previews: opens content
- Drive user → Sharing: manages shares
- Sharing → Transfer center: requests shared download
- Drive user → Transfer view model: controls tasks
- Transfer view model → Transfer center: controls transfers
- Transfer center → Cloud API contract: requests transfer data
- Transfer center → Chunked uploads: uploads chunks
- Transfer center → Account and preferences: reads account context
- Cloud API contract → Web API client: implemented by
- User settings → Account and preferences: updates preferences
- Usage dashboard → Cloud API contract: requests usage data
- Drive user → Plugin management UI: manages plugins
- Application startup → Plugin management UI: starts and shuts down
- Plugin management UI → Plugin manager: scans and controls
- Plugin manager → Plugin sessions: creates sessions
- Plugin sessions → Plugin runner: launches process
- Plugin runner → Plugin SDK: hosts plugin context
- Plugin SDK → Plugin sessions: sends host requests
- Plugin sessions → Plugin storage: dispatches storage operations
- Plugin manager → Archive preview: loads enabled plugin
- Plugin manager → Image tools: loads enabled plugin
- Plugin manager → Portrait retouch: loads enabled plugin
