-
Notifications
You must be signed in to change notification settings - Fork 0
desktop_engine_architecture
Xopher edited this page Aug 20, 2026
·
1 revision
This document outlines the refactored, decoupled engine architecture for YouMeOS Microverse Desktop.
-
Single Source of Truth: Engine lifecycle, status polling, and log management are unified under
BaseEngineandEngineManager. -
Reusable Utility Layer: Shared streaming, progress calculation, and archive extraction logic are isolated in
download.ts. -
Decoupled Engines:
-
DockerEngine: Exclusively manages Docker Compose lifecycle and service status inspection. -
EmbeddedEngine: Exclusively manages native FrankenPHP binary execution and HTTP health probing.
-
-
Typed IPC Bridge:
preload/index.tsexposes strongly-typed API wrappers to the renderer without exposing Node.js primitives directly.
Defines shared interfaces, enums, and callback signatures:
-
MicroverseEngine: Core contract for engine implementations. -
EngineStatusInfo: Unified status payload including service statuses and gateway URLs. -
DownloadProgress: Real-time transfer metrics. -
ProgressCallback,LogCallback,StatusCallback.
Abstract base class implementing MicroverseEngine:
- Manages log ring buffers (bounded to 600 entries).
- Handles callback subscription and dispatch.
- Provides standard
notifyStatus()andpushLog()helpers.
Shared networking and archive utility:
-
downloadFile(): Resilient HTTP/HTTPS stream downloader with redirect handling and throttled progress reporting. -
downloadAndExtractZip(): Downloads and extracts zip archives into designated directories with automatic cleanup. -
formatBytes(): Standard byte formatting helper.
-
DockerEngine: ExtendsBaseEngineto executedocker composecommands against the rootdocker-compose.yml. -
docker-setup.ts: Configures host directory permissions and ensures SQLite database integration drop-ins.
-
EmbeddedEngine: ExtendsBaseEngineto spawn FrankenPHP, detect open ports (80, 8080, 8081), and verify health. -
embedded-setup.ts: Downloads FrankenPHP binary and WordPress core if missing, generateswp-config.php, and configures symlinks.
Coordinates active engine selection and dispatches start/stop/status/log commands to the active engine instance.
-
index.html: Clean glassmorphism layout with mechanical tape deck controls, system architecture map, services list, and real-time logs. -
styles.css: Streamlined CSS tokens and glassmorphism styling without dead selectors. -
app.ts: UI presenter with strict event bindings, log formatting, and dynamic status rendering.