How sw-fantastic/desktop-file-server works
Main Components
a. Desktop Application (single JVM process)
b. JavaFX Client UI
c. Client Protocol Layer (FTP client, WebDAV client)
d. Vert.x Servers
• FTP Server Verticle
• HTTP Server (WebDAV + Web UI) Verticle
e. Business Logic / Service Layer
f. Data Access Layer (Hibernate Repos)
g. Embedded Database (MariaDB)
h. Configuration & Assets
i. Static Web UI (Vue3 + Tailwind)
Relationships & Data Flows
• JavaFX UI ↔ Client Protocol Layer: invokes FTP/WebDAV methods
• Client Protocol Layer → Vert.x Servers (over localhost TCP)
• FTP on port configured in assets/server-config.json
• HTTP/WebDAV on port configured in assets/server-config.json
• HTTP Server → Serves both WebDAV API and static Web UI files
• Vert.x Servers → Business Logic / Service classes
• Service classes → Repository layer (ORM entities)
• Repositories ↔ Embedded MariaDB
• On startup: Launcher reads assets/config.json & assets/system.json → RmDiskApplicationConfig
• Logging → logs directory
Architectural Patterns & Principles
• Layered Architecture: Presentation (JavaFX & Vue3), Protocol (FTP/WebDAV), Service, Repository, Database
• Vert.x Event-Driven Concurrency: separate verticles for HTTP and FTP handlers
• Repository Pattern via Hibernate (src/main/java/.../core/repo)
• Modular design: core (common types), client (protocols), service (verticles), views (UI)
• Configuration-Driven: all ports, skins, language, DB settings externalized in JSON/properties
Technologies & Frameworks
• Vert.x (Verticles, HTTP & Net servers)
• JavaFX (FXML views, Controllers)
• Hibernate / JPA (ORM) + MariaDB-Embedded
• Vue3 + Tailwind CSS (Web UI under src/main/resources/webcontent)
• Password4j, JCIFS, Caffeine, JJWT, Apache-Tika
Detailed Capture of Essential Elements
• That the Launcher initializes both JavaFX and Vert.x servers
• That static files (index.html, JS/CSS) are served by HTTP server verticle
• Authentication flow: SecureUtils → Token generation via JJWT → Caffeine cache for sessions
• That FTP handlers use FTPSessionContext and PathAccessor from core/ftp
• ORM entities and Hibernate configuration loaded from src/main/resources/database/hibernate.properties
• How the desktop client UI and the server protocols co-exist in one application
• The flow from user interactions through protocol, business logic, persistence, and back
• The role of external technologies and configuration files