# astercommunity/asterdrive architecture

> Architecture diagram of the GitHub repository astercommunity/asterdrive, 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/astercommunity/asterdrive
- Repository: https://github.com/astercommunity/asterdrive

## Overview

AsterDrive is a self-hosted team file service. Its core workflow is users uploading and organizing files, with storage policies routing file data to configured backends; users can then preview, download, share, and recover files. Separate product branches cover authentication, workspaces, WebDAV/WOPI interoperability, and administration/operations. The tree and excerpts show selected frontend controllers, storage abstractions, and a repository helper; backend routing and most service wiring are not sampled, so those links are intentionally omitted or shown only where the README documents the capability.

Main entry points: [`src`](https://github.com/astercommunity/asterdrive/tree/master/src) (File operations), [`frontend-panel/src/pages/admin/admin-policies-page`](https://github.com/astercommunity/asterdrive/tree/master/frontend-panel/src/pages/admin/admin-policies-page) (Storage policies), [`frontend-panel/src/components/admin`](https://github.com/astercommunity/asterdrive/tree/master/frontend-panel/src/components/admin) (Admin interface), [`frontend-panel/src/components/files`](https://github.com/astercommunity/asterdrive/tree/master/frontend-panel/src/components/files) (File interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_drive["Drive workflow"]
  node_file_ui["File interface"]
  node_upload["Upload manager"]
  node_folder_tree["Folder tree"]
  node_share_view["Shared-file view"]
  node_file_backend["File operations"]
end

subgraph group_storage["Storage routing"]
  node_storage_policy["Storage policies"]
  node_storage_contract["Storage driver API"]
  node_connectors["Storage connectors"]
  node_remote_storage["Remote-node storage"]
  node_blob_store[("Configured backends")]
end

subgraph group_access["Access and interoperability"]
  node_identity["Authentication"]
  node_security_settings["Account security"]
  node_webdav["WebDAV access<br/>[webdav_account.rs]"]
  node_wopi["WOPI sessions<br/>[wopi_session.rs]"]
end

subgraph group_operations["Administration"]
  node_admin_ui["Admin interface"]
  node_policy_editor["Policy editor"]
  node_policy_recovery["Policy recovery"]
  node_external_auth["External auth setup"]
  node_database[("Application database")]
  node_auth_flow_repo["Policy auth flows"]
end

node_user(("Drive user"))
node_office["Office service"]

node_user -->|"signs in"| node_identity
node_user -->|"manages files"| node_file_ui
node_file_ui -->|"starts uploads"| node_upload
node_file_ui -->|"browses folders"| node_folder_tree
node_user -->|"opens share"| node_share_view
node_share_view -->|"requests shared files"| node_file_backend
node_upload -->|"uploads files"| node_file_backend
node_folder_tree -->|"loads and moves"| node_file_backend
node_file_backend -->|"routes by policy"| node_storage_policy
node_file_backend -->|"uses driver interface"| node_storage_contract
node_storage_contract -->|"defines connector behavior"| node_connectors
node_connectors -->|"stores objects"| node_blob_store
node_remote_storage -.->|"configures targets"| node_storage_policy
node_user -->|"manages account"| node_security_settings
node_webdav -.->|"accesses files"| node_file_backend
node_wopi -.->|"supports editing"| node_office
node_office -.->|"saves edits"| node_file_backend
node_user -->|"administers service"| node_admin_ui
node_admin_ui -->|"edits policies"| node_policy_editor
node_admin_ui -->|"recovers storage"| node_policy_recovery
node_admin_ui -->|"configures providers"| node_external_auth
node_policy_editor -->|"creates and updates"| node_storage_policy
node_policy_recovery -->|"probes recovery"| node_storage_policy
node_storage_policy -->|"persists configuration"| node_database
node_auth_flow_repo -->|"reads and updates flows"| node_database

click node_file_ui "https://github.com/astercommunity/asterdrive/tree/master/frontend-panel/src/components/files"
click node_upload "https://github.com/astercommunity/asterdrive/blob/master/frontend-panel/src/components/files/useUploadAreaManager.ts"
click node_folder_tree "https://github.com/astercommunity/asterdrive/blob/master/frontend-panel/src/components/folders/folder-tree/useFolderTreeController.ts"
click node_share_view "https://github.com/astercommunity/asterdrive/blob/master/frontend-panel/src/pages/share-view/useShareViewPageController.ts"
click node_file_backend "https://github.com/astercommunity/asterdrive/tree/master/src"
click node_storage_policy "https://github.com/astercommunity/asterdrive/tree/master/frontend-panel/src/pages/admin/admin-policies-page"
click node_storage_contract "https://github.com/astercommunity/asterdrive/tree/master/crates/aster_drive_storage/src/traits"
click node_connectors "https://github.com/astercommunity/asterdrive/tree/master/crates/aster_drive_storage/src"
click node_remote_storage "https://github.com/astercommunity/asterdrive/tree/master/frontend-panel/src/components/admin/admin-remote-nodes-page"
click node_identity "https://github.com/astercommunity/asterdrive/tree/master/frontend-panel/src/components/auth"
click node_security_settings "https://github.com/astercommunity/asterdrive/blob/master/frontend-panel/src/components/settings/security-settings/useSecuritySettingsController.ts"
click node_webdav "https://github.com/astercommunity/asterdrive/blob/master/crates/aster_drive_model/src/entities/webdav_account.rs"
click node_wopi "https://github.com/astercommunity/asterdrive/blob/master/crates/aster_drive_model/src/entities/wopi_session.rs"
click node_admin_ui "https://github.com/astercommunity/asterdrive/tree/master/frontend-panel/src/components/admin"
click node_policy_editor "https://github.com/astercommunity/asterdrive/blob/master/frontend-panel/src/pages/admin/admin-policies-page/useStoragePolicyEditorController.ts"
click node_policy_recovery "https://github.com/astercommunity/asterdrive/blob/master/frontend-panel/src/pages/admin/admin-policies-page/useStoragePolicyRecoveryController.ts"
click node_external_auth "https://github.com/astercommunity/asterdrive/blob/master/frontend-panel/src/pages/admin/useAdminExternalAuthPageController.ts"
click node_database "https://github.com/astercommunity/asterdrive/tree/master/src/db"
click node_auth_flow_repo "https://github.com/astercommunity/asterdrive/blob/master/src/db/repository/storage_policy_authorization_flow_repo.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_file_ui,node_upload,node_folder_tree,node_share_view,node_file_backend,node_user toneBlue
class node_storage_policy,node_storage_contract,node_connectors,node_remote_storage,node_blob_store toneAmber
class node_identity,node_security_settings,node_webdav,node_wopi toneMint
class node_admin_ui,node_policy_editor,node_policy_recovery,node_external_auth,node_database,node_auth_flow_repo toneRose
class node_office toneIndigo
```

## Components

### Drive workflow

- [File interface](https://github.com/astercommunity/asterdrive/tree/master/frontend-panel/src/components/files): `frontend-panel/src/components/files`
- [Upload manager](https://github.com/astercommunity/asterdrive/blob/master/frontend-panel/src/components/files/useUploadAreaManager.ts): `frontend-panel/src/components/files/useUploadAreaManager.ts`
- [Folder tree](https://github.com/astercommunity/asterdrive/blob/master/frontend-panel/src/components/folders/folder-tree/useFolderTreeController.ts): `frontend-panel/src/components/folders/folder-tree/useFolderTreeController.ts`
- [Shared-file view](https://github.com/astercommunity/asterdrive/blob/master/frontend-panel/src/pages/share-view/useShareViewPageController.ts): `frontend-panel/src/pages/share-view/useShareViewPageController.ts`
- [File operations](https://github.com/astercommunity/asterdrive/tree/master/src): `src`

### Storage routing

- [Storage policies](https://github.com/astercommunity/asterdrive/tree/master/frontend-panel/src/pages/admin/admin-policies-page): `frontend-panel/src/pages/admin/admin-policies-page`
- [Storage driver API](https://github.com/astercommunity/asterdrive/tree/master/crates/aster_drive_storage/src/traits): `crates/aster_drive_storage/src/traits`
- [Storage connectors](https://github.com/astercommunity/asterdrive/tree/master/crates/aster_drive_storage/src): `crates/aster_drive_storage/src`
- [Remote-node storage](https://github.com/astercommunity/asterdrive/tree/master/frontend-panel/src/components/admin/admin-remote-nodes-page): `frontend-panel/src/components/admin/admin-remote-nodes-page`
- **Configured backends**

### Access and interoperability

- [Authentication](https://github.com/astercommunity/asterdrive/tree/master/frontend-panel/src/components/auth): `frontend-panel/src/components/auth`
- [Account security](https://github.com/astercommunity/asterdrive/blob/master/frontend-panel/src/components/settings/security-settings/useSecuritySettingsController.ts): `frontend-panel/src/components/settings/security-settings/useSecuritySettingsController.ts`
- [WebDAV access](https://github.com/astercommunity/asterdrive/blob/master/crates/aster_drive_model/src/entities/webdav_account.rs): `crates/aster_drive_model/src/entities/webdav_account.rs`
- [WOPI sessions](https://github.com/astercommunity/asterdrive/blob/master/crates/aster_drive_model/src/entities/wopi_session.rs): `crates/aster_drive_model/src/entities/wopi_session.rs`

### Administration

- [Admin interface](https://github.com/astercommunity/asterdrive/tree/master/frontend-panel/src/components/admin): `frontend-panel/src/components/admin`
- [Policy editor](https://github.com/astercommunity/asterdrive/blob/master/frontend-panel/src/pages/admin/admin-policies-page/useStoragePolicyEditorController.ts): `frontend-panel/src/pages/admin/admin-policies-page/useStoragePolicyEditorController.ts`
- [Policy recovery](https://github.com/astercommunity/asterdrive/blob/master/frontend-panel/src/pages/admin/admin-policies-page/useStoragePolicyRecoveryController.ts): `frontend-panel/src/pages/admin/admin-policies-page/useStoragePolicyRecoveryController.ts`
- [External auth setup](https://github.com/astercommunity/asterdrive/blob/master/frontend-panel/src/pages/admin/useAdminExternalAuthPageController.ts): `frontend-panel/src/pages/admin/useAdminExternalAuthPageController.ts`
- [Application database](https://github.com/astercommunity/asterdrive/tree/master/src/db): `src/db`
- [Policy auth flows](https://github.com/astercommunity/asterdrive/blob/master/src/db/repository/storage_policy_authorization_flow_repo.rs): `src/db/repository/storage_policy_authorization_flow_repo.rs`

### Other components

- **Drive user**
- **Office service**

## Connections

- Drive user → Authentication: signs in
- Drive user → File interface: manages files
- File interface → Upload manager: starts uploads
- File interface → Folder tree: browses folders
- Drive user → Shared-file view: opens share
- Shared-file view → File operations: requests shared files
- Upload manager → File operations: uploads files
- Folder tree → File operations: loads and moves
- File operations → Storage policies: routes by policy
- File operations → Storage driver API: uses driver interface
- Storage driver API → Storage connectors: defines connector behavior
- Storage connectors → Configured backends: stores objects
- Remote-node storage → Storage policies: configures targets
- Drive user → Account security: manages account
- WebDAV access → File operations: accesses files
- WOPI sessions → Office service: supports editing
- Office service → File operations: saves edits
- Drive user → Admin interface: administers service
- Admin interface → Policy editor: edits policies
- Admin interface → Policy recovery: recovers storage
- Admin interface → External auth setup: configures providers
- Policy editor → Storage policies: creates and updates
- Policy recovery → Storage policies: probes recovery
- Storage policies → Application database: persists configuration
- Policy auth flows → Application database: reads and updates flows
