How eythaann/seelen-ui works
Project Type and Purpose
• This is a full-stack desktop application built with Tauri (Rust + WebView).
• Purpose: Provide a fully customizable Windows desktop environment—taskbar (toolbar), app launcher, tiling window manager, media controller, settings UI, widgets, virtual desktops, etc.
File-Structure Analysis
• Top-level:
– src/apps/… → Multiple independent React/TypeScript “mini-apps” (toolbar, seelen_rofi launcher, task-switcher, wallpaper, window manager, settings, etc.)
– src/background/… → Rust “background” process modules interfacing with Windows APIs (monitor, input, network, trays, virtual desktops, etc.)
– src/service/… → Rust “service” process (TCP CLI, scheduler, Windows service entry, shutdown hooks)
– scripts/, templates/ → Build, bundle, installer, MSIX packaging
– tauri.conf.json, Cargo.toml, package.json → Configuration for Rust/Cargo, Node/npm, Tauri
Key Insights from README
• Architecture is two-process: a GUI/WebView front end for each UI module, plus two Rust backends (background & service) that expose OS functionality via Tauri commands.
• Uses a modular pattern: each feature has application/domain/infrastructure layers under both TS and Rust.
Diagramming the Architecture
a. Main Components:
1. Frontend WebViews (each mini-app in src/apps)
2. Tauri Core / Runtime
3. Rust Background Process (OS integration modules)
4. Rust Service Process (Windows service, CLI, task scheduler)
5. Shared Data & State (state persistence in JSON, settings, profiles)
7. External Dependencies: Windows OS & WinAPI, WebView2, AutoHotkey, PowerShell scripts
b. Relationships & Data Flow:
• WebView UIs communicate with the Background Process via Tauri IPC/commands (e.g., “getMonitors”, “launchApp”, “tileWindow”).
• Background Process calls Windows API (via direct FFI, winapi crates) or invokes AHK/Powershell helpers.
• Service Process runs as a Windows service, scheduling tasks or providing a CLI over TCP, also exposes commands to Background if needed.
• Shared modules (TS and Rust) encapsulate domain logic and data-serialization.
• Static assets loaded by UIs or passed to Background (e.g., theme files).
c. Architectural Patterns & Principles:
• Modular layering: application → domain → infrastructure per feature.
• Clear separation: UI (React/TS) vs. OS logic (Rust).
• Single-source state bridging via shared store modules in TS and Rust.
• Plug-in capability via static/plugins & capabilities JSON for Tauri security.
d. Notable Technologies & Libraries:
– Tauri (tauri.conf.json, build scripts)
– Rust crates: tauri, winapi, serde, tokio
– React + TypeScript + Jest + ESLint
– AutoHotkey mocks, PowerShell scripts for installer & network profiles
– Packaging: MSIX, NSIS, Squirrel (templates/)