$ show error311/FileRise
FileRise is a self-hosted web file manager and storage hub with WebDAV, sharing, and per-folder ACLs. The backend is PHP 8.3+ with Apache, using flat-file storage (no database) and a REST API. The frontend is a modular vanilla JS SPA with i18n, dark mode, and drag-and-drop. It supports multi-source storage (local, S3, SFTP, WebDAV, etc.), encryption at rest (libsodium), TOTP 2FA, OIDC SSO, and background workers for transfers and ZIP creation. A commercial Pro add-on provides AI chat, client portals, automation, and advanced storage sources. The codebase is actively maintained with frequent releases and a comprehensive security regression test suite. While the architecture is clean with well-defined interfaces (storage adapter, ACL, encryption), there is some legacy debt from a namespace migration and monolithic domain models.
The LLM identified 4 files worth highlighting for reuse:
Defines a clean interface for file storage operations (read, write, delete, list, etc.) with implementations for local filesystem and WebDAV. The Pro edition adds S3, SFTP, FTP, and cloud storage adapters. This interface is isolated and could be extracted into a standalone library for any PHP project needing pluggable storage backends.
Implements a granular per-folder permission system with inheritance, memoization, and atomic user grant updates. Supports buckets (owners, read, write, share, etc.) and subtree operations. The design is self-contained and demonstrates non-obvious skill in handling complex permission logic with file-based storage and concurrent safety.
Provides streaming file encryption and decryption using libsodium secretstream (XChaCha20-Poly1305). Handles large files efficiently with chunked processing and atomic writes. The class is isolated and could be reused in any PHP project requiring transparent encryption of file streams.
Implements a file-based rate limiter for TOTP attempts using flock for concurrency safety and HMAC-keyed identifiers to avoid leaking usernames/IPs. The pattern is reusable for any rate-limiting scenario where a database is not available, and demonstrates careful handling of atomic file operations.