# souandresouza/cadrocfile architecture

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

- Interactive diagram: https://gitdiagram.com/souandresouza/cadrocfile
- Repository: https://github.com/souandresouza/cadrocfile

## Overview

Cadrocfile is a GTK4 Linux file manager. Users enter through the application window, browse folders and tabs, then invoke file actions or specialized features such as search, preview, archive handling, and mounts. The graph preserves these distinct feature stages and the shared filesystem/configuration layer. Edges follow shown calls or module references and explicit README descriptions; several listed subsystems were not sampled, so their internal wiring is omitted.

Main entry points: [`src/ui/actions.rs`](https://github.com/souandresouza/cadrocfile/blob/master/src/ui/actions.rs) (Window Actions), [`src/ui/window.rs`](https://github.com/souandresouza/cadrocfile/blob/master/src/ui/window.rs) (Main Window), [`src/ui/sidebar.rs`](https://github.com/souandresouza/cadrocfile/blob/master/src/ui/sidebar.rs) (Sidebar), [`src/app.rs`](https://github.com/souandresouza/cadrocfile/blob/master/src/app.rs) (Application Setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Application UI"]
  node_app["Application Setup<br/>[app.rs]"]
  node_window["Main Window<br/>[window.rs]"]
  node_actions["Window Actions<br/>[actions.rs]"]
  node_fileview["File Views<br/>[file_view.rs]"]
  node_sidebar["Sidebar<br/>[sidebar.rs]"]
end

subgraph group_filesystem["File Operations"]
  node_search["Search<br/>[search.rs]"]
  node_scan["Directory Scan<br/>[scan.rs]"]
  node_fileops["File Operations<br/>[ops.rs]"]
  node_batchrename["Batch Rename<br/>[batch_rename.rs]"]
  node_delete["Trash and Shred<br/>[trash.rs]"]
  node_archive["Archive Handling<br/>[mod.rs]"]
  node_downloads["Downloads<br/>[mod.rs]"]
  node_usage["Disk Usage<br/>[usage.rs]"]
end

subgraph group_integrations["Storage Integrations"]
  node_drives["Drive Mounts<br/>[mod.rs]"]
  node_portable["Portable Devices<br/>[portable.rs]"]
  node_network["Network Shares<br/>[remote.rs]"]
  node_cloud["Cloud Drives<br/>[cloud.rs]"]
end

subgraph group_media["Media Features"]
  node_preview["File Preview<br/>[preview.rs]"]
  node_thumbnails["Thumbnails<br/>[thumbs.rs]"]
  node_thumbnailers["Thumbnail Providers<br/>[thumbnailers.rs]"]
  node_raw["Raw Photo Support<br/>[raw.rs]"]
end

subgraph group_platform["Shared Services"]
  node_config[("Settings<br/>[config.rs]")]
  node_parallel["Worker Threads<br/>[parallel.rs]"]
  node_exif["Photo Metadata<br/>[exif.rs]"]
end

node_user(("User"))
node_udisks{{"UDisks2"}}
node_gvfs{{"GVFS"}}
node_rclone{{"rclone"}}

node_user -->|"launches"| node_app
node_app -->|"loads"| node_config
node_app -->|"sets workers"| node_parallel
node_app -->|"creates"| node_window
node_user -->|"browses"| node_window
node_window -->|"scans folders"| node_scan
node_window -->|"starts search"| node_search
node_window -->|"updates view"| node_fileview
node_window -->|"shows"| node_sidebar
node_user -->|"invokes actions"| node_actions
node_actions -->|"runs operations"| node_fileops
node_actions -->|"invokes rename"| node_batchrename
node_actions -.->|"invokes deletion"| node_delete
node_actions -->|"creates archives"| node_archive
node_actions -->|"starts download"| node_downloads
node_actions -->|"mounts volumes"| node_drives
node_actions -->|"connects shares"| node_network
node_actions -->|"configures accounts"| node_cloud
node_sidebar -->|"lists volumes"| node_drives
node_sidebar -->|"lists devices"| node_portable
node_sidebar -->|"lists shares"| node_network
node_sidebar -->|"lists accounts"| node_cloud
node_drives -->|"mounts through"| node_udisks
node_network -->|"mounts through"| node_gvfs
node_cloud -->|"mounts through"| node_rclone
node_window -->|"opens preview"| node_preview
node_preview -->|"decodes formats"| node_raw
node_preview -->|"reads metadata"| node_exif
node_preview -->|"uses thumbnails"| node_thumbnails
node_thumbnails -->|"uses providers"| node_thumbnailers
node_window -->|"opens analysis"| node_usage
node_usage -->|"scans folders"| node_scan
node_config -->|"stores servers"| node_network
node_config -->|"stores settings"| node_cloud

click node_app "https://github.com/souandresouza/cadrocfile/blob/master/src/app.rs"
click node_window "https://github.com/souandresouza/cadrocfile/blob/master/src/ui/window.rs"
click node_actions "https://github.com/souandresouza/cadrocfile/blob/master/src/ui/actions.rs"
click node_fileview "https://github.com/souandresouza/cadrocfile/blob/master/src/ui/file_view.rs"
click node_sidebar "https://github.com/souandresouza/cadrocfile/blob/master/src/ui/sidebar.rs"
click node_search "https://github.com/souandresouza/cadrocfile/blob/master/src/fs/search.rs"
click node_scan "https://github.com/souandresouza/cadrocfile/blob/master/src/fs/scan.rs"
click node_fileops "https://github.com/souandresouza/cadrocfile/blob/master/src/fs/ops.rs"
click node_batchrename "https://github.com/souandresouza/cadrocfile/blob/master/src/fs/batch_rename.rs"
click node_delete "https://github.com/souandresouza/cadrocfile/blob/master/src/fs/trash.rs"
click node_archive "https://github.com/souandresouza/cadrocfile/blob/master/src/archive/mod.rs"
click node_downloads "https://github.com/souandresouza/cadrocfile/blob/master/src/fs/download/mod.rs"
click node_drives "https://github.com/souandresouza/cadrocfile/blob/master/src/drives/mod.rs"
click node_portable "https://github.com/souandresouza/cadrocfile/blob/master/src/fs/portable.rs"
click node_network "https://github.com/souandresouza/cadrocfile/blob/master/src/fs/remote.rs"
click node_cloud "https://github.com/souandresouza/cadrocfile/blob/master/src/fs/cloud.rs"
click node_preview "https://github.com/souandresouza/cadrocfile/blob/master/src/ui/preview.rs"
click node_thumbnails "https://github.com/souandresouza/cadrocfile/blob/master/src/ui/thumbs.rs"
click node_thumbnailers "https://github.com/souandresouza/cadrocfile/blob/master/src/ui/thumbnailers.rs"
click node_raw "https://github.com/souandresouza/cadrocfile/blob/master/src/fs/raw.rs"
click node_usage "https://github.com/souandresouza/cadrocfile/blob/master/src/ui/usage.rs"
click node_config "https://github.com/souandresouza/cadrocfile/blob/master/src/config.rs"
click node_parallel "https://github.com/souandresouza/cadrocfile/blob/master/src/fs/parallel.rs"
click node_exif "https://github.com/souandresouza/cadrocfile/blob/master/src/fs/exif.rs"

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_window,node_actions,node_fileview,node_sidebar,node_user toneBlue
class node_search,node_scan,node_fileops,node_batchrename,node_delete,node_archive,node_downloads,node_usage toneAmber
class node_drives,node_portable,node_network,node_cloud toneMint
class node_preview,node_thumbnails,node_thumbnailers,node_raw toneRose
class node_config,node_parallel,node_exif,node_udisks,node_gvfs,node_rclone toneIndigo
```

## Components

### Application UI

- [Application Setup](https://github.com/souandresouza/cadrocfile/blob/master/src/app.rs): `src/app.rs`
- [Main Window](https://github.com/souandresouza/cadrocfile/blob/master/src/ui/window.rs): `src/ui/window.rs`
- [Window Actions](https://github.com/souandresouza/cadrocfile/blob/master/src/ui/actions.rs): `src/ui/actions.rs`
- [File Views](https://github.com/souandresouza/cadrocfile/blob/master/src/ui/file_view.rs): `src/ui/file_view.rs`
- [Sidebar](https://github.com/souandresouza/cadrocfile/blob/master/src/ui/sidebar.rs): `src/ui/sidebar.rs`

### File Operations

- [Search](https://github.com/souandresouza/cadrocfile/blob/master/src/fs/search.rs): `src/fs/search.rs`
- [Directory Scan](https://github.com/souandresouza/cadrocfile/blob/master/src/fs/scan.rs): `src/fs/scan.rs`
- [File Operations](https://github.com/souandresouza/cadrocfile/blob/master/src/fs/ops.rs): `src/fs/ops.rs`
- [Batch Rename](https://github.com/souandresouza/cadrocfile/blob/master/src/fs/batch_rename.rs): `src/fs/batch_rename.rs`
- [Trash and Shred](https://github.com/souandresouza/cadrocfile/blob/master/src/fs/trash.rs): `src/fs/trash.rs`
- [Archive Handling](https://github.com/souandresouza/cadrocfile/blob/master/src/archive/mod.rs): `src/archive/mod.rs`
- [Downloads](https://github.com/souandresouza/cadrocfile/blob/master/src/fs/download/mod.rs): `src/fs/download/mod.rs`
- [Disk Usage](https://github.com/souandresouza/cadrocfile/blob/master/src/ui/usage.rs): `src/ui/usage.rs`

### Storage Integrations

- [Drive Mounts](https://github.com/souandresouza/cadrocfile/blob/master/src/drives/mod.rs): `src/drives/mod.rs`
- [Portable Devices](https://github.com/souandresouza/cadrocfile/blob/master/src/fs/portable.rs): `src/fs/portable.rs`
- [Network Shares](https://github.com/souandresouza/cadrocfile/blob/master/src/fs/remote.rs): `src/fs/remote.rs`
- [Cloud Drives](https://github.com/souandresouza/cadrocfile/blob/master/src/fs/cloud.rs): `src/fs/cloud.rs`

### Media Features

- [File Preview](https://github.com/souandresouza/cadrocfile/blob/master/src/ui/preview.rs): `src/ui/preview.rs`
- [Thumbnails](https://github.com/souandresouza/cadrocfile/blob/master/src/ui/thumbs.rs): `src/ui/thumbs.rs`
- [Thumbnail Providers](https://github.com/souandresouza/cadrocfile/blob/master/src/ui/thumbnailers.rs): `src/ui/thumbnailers.rs`
- [Raw Photo Support](https://github.com/souandresouza/cadrocfile/blob/master/src/fs/raw.rs): `src/fs/raw.rs`

### Shared Services

- [Settings](https://github.com/souandresouza/cadrocfile/blob/master/src/config.rs): `src/config.rs`
- [Worker Threads](https://github.com/souandresouza/cadrocfile/blob/master/src/fs/parallel.rs): `src/fs/parallel.rs`
- [Photo Metadata](https://github.com/souandresouza/cadrocfile/blob/master/src/fs/exif.rs): `src/fs/exif.rs`

### Other components

- **User**
- **UDisks2**
- **GVFS**
- **rclone**

## Connections

- User → Application Setup: launches
- Application Setup → Settings: loads (evidence: `src/app.rs`)
- Application Setup → Worker Threads: sets workers (evidence: `src/app.rs`)
- Application Setup → Main Window: creates (evidence: `src/app.rs`)
- User → Main Window: browses
- Main Window → Directory Scan: scans folders (evidence: `src/ui/window.rs`)
- Main Window → Search: starts search (evidence: `src/ui/window.rs`)
- Main Window → File Views: updates view (evidence: `src/ui/window.rs`)
- Main Window → Sidebar: shows (evidence: `src/ui/window.rs`)
- User → Window Actions: invokes actions
- Window Actions → File Operations: runs operations
- Window Actions → Batch Rename: invokes rename (evidence: `src/ui/actions.rs`)
- Window Actions → Trash and Shred: invokes deletion
- Window Actions → Archive Handling: creates archives (evidence: `src/ui/actions.rs`)
- Window Actions → Downloads: starts download (evidence: `src/ui/actions.rs`)
- Window Actions → Drive Mounts: mounts volumes (evidence: `src/ui/actions.rs`)
- Window Actions → Network Shares: connects shares (evidence: `src/ui/actions.rs`)
- Window Actions → Cloud Drives: configures accounts (evidence: `src/ui/actions.rs`)
- Sidebar → Drive Mounts: lists volumes (evidence: `src/ui/sidebar.rs`)
- Sidebar → Portable Devices: lists devices (evidence: `src/ui/sidebar.rs`)
- Sidebar → Network Shares: lists shares (evidence: `src/ui/sidebar.rs`)
- Sidebar → Cloud Drives: lists accounts (evidence: `src/ui/sidebar.rs`)
- Drive Mounts → UDisks2: mounts through
- Network Shares → GVFS: mounts through (evidence: `src/fs/remote.rs`)
- Cloud Drives → rclone: mounts through (evidence: `src/fs/cloud.rs`)
- Main Window → File Preview: opens preview (evidence: `src/ui/window.rs`)
- File Preview → Raw Photo Support: decodes formats (evidence: `src/ui/preview.rs`)
- File Preview → Photo Metadata: reads metadata (evidence: `src/ui/preview.rs`)
- File Preview → Thumbnails: uses thumbnails (evidence: `src/ui/preview.rs`)
- Thumbnails → Thumbnail Providers: uses providers (evidence: `src/ui/thumbs.rs`)
- Main Window → Disk Usage: opens analysis (evidence: `src/ui/window.rs`)
- Disk Usage → Directory Scan: scans folders (evidence: `src/ui/usage.rs`)
- Settings → Network Shares: stores servers (evidence: `src/config.rs`)
- Settings → Cloud Drives: stores settings (evidence: `src/fs/cloud.rs`)
