Implement Hero File Manager — WebDAV-backed file management with Dioxus UI #1

Open
opened 2026-02-21 15:50:34 +00:00 by mik-tf · 0 comments
Owner

Summary

Complete implementation of the Hero File Manager, a web-based file management system built with Dioxus (Rust WASM) frontend and WebDAV-backed server.

Architecture

5-crate workspace following the Hero ecosystem pattern:

  • hero_filemanager_server — OpenRPC daemon with WebDAV client, OSIS object storage, JSON-RPC API
  • hero_filemanager_sdk — Async Rust SDK client for the daemon JSON-RPC API
  • hero_filemanager_ui — Dioxus 0.7 web frontend with router, components, and CSS
  • hero_filemanager_rhai — Rhai scripting bindings for automation
  • hero_filemanager — CLI binary entry point

Features Implemented

Server (WebDAV)

  • PROPFIND XML parsing with namespace-aware detection (D:, ns0:, bare)
  • Directory listing, file upload/download, move, copy, delete via WebDAV
  • 10 JSON-RPC methods: list_directory, get_file_info, create_folder, rename_item, move_items, copy_items, delete_items, trash_items, restore_items, search
  • OSchema-generated types with OSIS persistence

UI (Dioxus)

  • Browse route with async data loading (use_effect + spawn pattern)
  • File list with list/grid view modes, selection, double-click navigation
  • Toolbar with paste (cut/copy), search with API call, view mode toggle
  • Dialogs: New Folder, Rename, Upload (multi-file), Delete confirmation, Move To
  • Breadcrumb navigation with clickable path segments
  • Folder tree sidebar showing current directory folders
  • Context menu with Copy, Cut, Rename, Delete actions
  • File info panel with size, type, modification date
  • Keyboard shortcuts: Ctrl+C/X/V, Ctrl+A, Delete, F2
  • Viewers: Image, PDF (iframe), Text (syntax highlighted)
  • Markdown editor with Edit/Split/Preview modes, save to backend, markdown-to-HTML rendering
  • Complete CSS stylesheet (1000+ lines)

SDK

  • Full async JSON-RPC client for all 10 server methods
  • Direct file upload/download via HTTP PUT/GET
  • URL generation helpers

Rhai Bindings

  • fm_list, fm_mkdir, fm_rename, fm_delete, fm_search
  • tokio::runtime::Runtime::block_on() bridge for sync Rhai context
  • FileEntry type with property getters

Tests

11 tests passing:

  • 3 OSIS CRUD tests (FileEntry, Workspace, all objects)
  • 6 WebDAV XML parsing tests (D: namespace, subdirectory, URL-encoded, helpers)
  • 2 Rhai tests (engine creation, error handling)

Verification

cargo fmt --all -- --check  (clean)
cargo clippy --workspace     (2 warnings in generated code only)
cargo test --workspace       (11 passed, 0 failed)
## Summary Complete implementation of the Hero File Manager, a web-based file management system built with Dioxus (Rust WASM) frontend and WebDAV-backed server. ## Architecture 5-crate workspace following the Hero ecosystem pattern: - **hero_filemanager_server** — OpenRPC daemon with WebDAV client, OSIS object storage, JSON-RPC API - **hero_filemanager_sdk** — Async Rust SDK client for the daemon JSON-RPC API - **hero_filemanager_ui** — Dioxus 0.7 web frontend with router, components, and CSS - **hero_filemanager_rhai** — Rhai scripting bindings for automation - **hero_filemanager** — CLI binary entry point ## Features Implemented ### Server (WebDAV) - PROPFIND XML parsing with namespace-aware detection (D:, ns0:, bare) - Directory listing, file upload/download, move, copy, delete via WebDAV - 10 JSON-RPC methods: list_directory, get_file_info, create_folder, rename_item, move_items, copy_items, delete_items, trash_items, restore_items, search - OSchema-generated types with OSIS persistence ### UI (Dioxus) - Browse route with async data loading (use_effect + spawn pattern) - File list with list/grid view modes, selection, double-click navigation - Toolbar with paste (cut/copy), search with API call, view mode toggle - Dialogs: New Folder, Rename, Upload (multi-file), Delete confirmation, Move To - Breadcrumb navigation with clickable path segments - Folder tree sidebar showing current directory folders - Context menu with Copy, Cut, Rename, Delete actions - File info panel with size, type, modification date - Keyboard shortcuts: Ctrl+C/X/V, Ctrl+A, Delete, F2 - Viewers: Image, PDF (iframe), Text (syntax highlighted) - Markdown editor with Edit/Split/Preview modes, save to backend, markdown-to-HTML rendering - Complete CSS stylesheet (1000+ lines) ### SDK - Full async JSON-RPC client for all 10 server methods - Direct file upload/download via HTTP PUT/GET - URL generation helpers ### Rhai Bindings - fm_list, fm_mkdir, fm_rename, fm_delete, fm_search - tokio::runtime::Runtime::block_on() bridge for sync Rhai context - FileEntry type with property getters ## Tests 11 tests passing: - 3 OSIS CRUD tests (FileEntry, Workspace, all objects) - 6 WebDAV XML parsing tests (D: namespace, subdirectory, URL-encoded, helpers) - 2 Rhai tests (engine creation, error handling) ## Verification ``` cargo fmt --all -- --check (clean) cargo clippy --workspace (2 warnings in generated code only) cargo test --workspace (11 passed, 0 failed) ```
despiegk added this to the ACTIVE project 2026-02-23 10:24:56 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_drive#1
No description provided.