No description
  • Rust 63.5%
  • Shell 16.7%
  • TypeScript 12.1%
  • CSS 4.3%
  • JavaScript 2.4%
  • Other 1%
Find a file
mik-tf 70335abd33
All checks were successful
Build and Test / test (push) Successful in 3m0s
Build and Test / test (pull_request) Successful in 3m3s
test: comprehensive test suite for all issue #41 features
Add 15 markdown unit tests (frontmatter, headings, lists, tables,
blockquotes, code blocks, inline formatting, XSS prevention, horizontal
rules, images, links, HTML escaping, mixed content) and 8 new browser
E2E tests (image viewer controls, fullscreen, prev/next navigation,
move-to dialog, duplicate context menu, PDF page navigation,
permission-aware UI). Total: 137 tests across 4 layers.
2026-02-25 15:39:40 -05:00
.forgejo/workflows feat: complete all feature gaps — recursive search, conflict handling, trash tracking, folder tree, context menu, Rhai bindings 2026-02-21 13:17:23 -05:00
crates test: comprehensive test suite for all issue #41 features 2026-02-25 15:39:40 -05:00
docs/schemas fix(ci): adapt to upstream hero_rpc_osis generator changes 2026-02-25 08:59:40 -05:00
schemas/filemanager chore: final cleanup — fmt, clippy fixes, remove TODO stubs 2026-02-21 10:49:18 -05:00
scripts feat: date range search filter, ETag conflict detection, permission-aware UI 2026-02-25 11:59:35 -05:00
services fix: modified_at parsing, conditional WebDAV, --bind flag, hero_zero template, README 2026-02-25 10:34:27 -05:00
tests/e2e test: comprehensive test suite for all issue #41 features 2026-02-25 15:39:40 -05:00
.gitignore refine: robust trash encoding, search limits, gitignore generated files 2026-02-25 09:15:47 -05:00
buildenv.sh chore: final cleanup — fmt, clippy fixes, remove TODO stubs 2026-02-21 10:49:18 -05:00
Cargo.lock feat: zip download endpoint, folder upload via webkitdirectory 2026-02-25 10:40:56 -05:00
Cargo.toml fix: modified_at parsing, conditional WebDAV, --bind flag, hero_zero template, README 2026-02-25 10:34:27 -05:00
LICENSE add Apache 2.0 license for ThreeFold 2026 2026-02-25 09:21:48 -05:00
Makefile feat: complete all features, 102 tests, security hardening 2026-02-21 21:10:27 -05:00
README.md fix: modified_at parsing, conditional WebDAV, --bind flag, hero_zero template, README 2026-02-25 10:34:27 -05:00

Hero File Manager (hero_drive)

Web-based file manager built on the Hero ecosystem. Supports two modes of operation:

  • Standalone mode — embeds hero_fossil (WebDAV) and runs self-contained on TCP
  • Ecosystem mode — connects to external hero_fossil via WEBDAV_URL, binds a Unix socket for hero_proxy routing, validates JWT tokens from hero_auth

Quick Start (Standalone)

git clone https://forge.ourworld.tf/lhumina_code/hero_drive.git
cd hero_drive
make run        # Builds and starts backend (3394) + UI (8887)

Open http://localhost:8887 in your browser.

Ecosystem Mode

When deployed via hero_zero, hero_drive connects to an external hero_fossil and listens on a Unix socket:

hero_filemanager \
  --webdav-url http://localhost:3387/webdav/default \
  --bind unix:~/hero/var/sockets/hero_drive.sock

hero_proxy then routes /hero_drive/* traffic to the Unix socket.

The hero_zero service template is at services/hero_drive.toml.

Architecture

Standalone:
  Browser ──> Dioxus UI (8887) ──JSON-RPC──> OServer (3394) ──WebDAV──> hero_fossil (3387, embedded)

Ecosystem:
  Browser ──> hero_proxy ──> Unix socket proxy ──> OServer (TCP, internal)
                                                       └──WebDAV──> hero_fossil (external)
Crate Purpose
hero_filemanager Main binary — starts OServer + optional embedded WebDAV + optional Unix socket proxy
hero_filemanager_server RPC handlers, WebDAV client, OSIS types
hero_filemanager_ui Dioxus 0.7 web frontend (WASM)
hero_filemanager_sdk JSON-RPC client library (native + WASM)
hero_filemanager_rhai Rhai scripting bindings (10 functions)

Environment Variables

Variable Default Description
WEBDAV_URL External WebDAV URL (skips embedded hero_fossil when set)
HERO_DRIVE_BIND Bind address: host:port for TCP, unix:/path for Unix socket
HERO_SECRET Shared secret for JWT validation (auth disabled when unset)
RUST_LOG info Log level filter

Features

  • Browse, search, upload, download, rename, copy, move, delete files
  • Trash and restore with path-encoded .trash/ directory
  • Grid and list views with sortable columns and pagination
  • Markdown editor with edit/split/preview modes, autosave, image embed
  • Image viewer with zoom, rotate, gallery navigation
  • PDF viewer, text viewer with syntax highlighting
  • Drag-drop upload and drag-drop move (onto folders)
  • Keyboard shortcuts (Ctrl+C/X/V/A, Delete, F2, Backspace)
  • File info panel with metadata and copy-path
  • Activity/audit log panel
  • Context menus, inline rename, multi-select (shift+click)
  • MCP endpoint for AI tool integration

Development

make help          # Show all targets
make run           # Build and run backend + UI
make dev           # Same with RUST_LOG=debug
make check         # Fast cargo check
make fmt           # Format code
make lint          # Clippy

Testing

make test          # Rust unit tests
make smoke-test    # Curl-based HTTP/RPC tests
make e2e-test      # Playwright API tests
make e2e-browser   # Playwright browser tests (needs WEBDAV_AVAILABLE=1)
make test-all      # Full CI suite (fmt, lint, check, test, build, smoke, e2e)

Ports

Service Port
OServer backend 3394
Dioxus UI 8887
WebDAV (hero_fossil, embedded) 3387

RPC API

All via POST /api/root/filemanager/rpc (JSON-RPC 2.0):

Method Params Returns
fileservice.list_directory path, sort_by, sort_order Vec<FileEntry>
fileservice.get_file_info path FileEntry
fileservice.create_folder path, name FileEntry
fileservice.rename_item old_path, new_name FileEntry
fileservice.move_items paths, destination, on_conflict Vec<FileEntry>
fileservice.copy_items paths, destination, on_conflict Vec<FileEntry>
fileservice.delete_items paths bool
fileservice.trash_items paths bool
fileservice.restore_items paths bool
fileservice.search query, path Vec<FileEntry>

File upload/download via WebDAV: GET/PUT http://localhost:3387/webdav/default/{path}

License

Apache 2.0 — Copyright 2026 ThreeFold