Architecture
Licht Launcher is built with Tauri v2, React, TypeScript, Vite and a Rust Cargo workspace.
Layers
| Location | Responsibility | Boundary |
|---|---|---|
crates/licht-core | Manifests, downloads, Java, game execution, instances, authentication, loaders and modpacks | Standalone Rust library with no Tauri dependency |
src-tauri | Startup, logging configuration, typed commands and events | Delegates domain behavior to the core |
src | Screens, UI state and calls to the Tauri adapter | No Minecraft domain logic |
The workspace holds the licht-core library and the licht-launcher application. The core also builds the licht CLI, and both the app and the CLI call the same core services. Core modules include meta, transfer, game, instance, runtime, store, auth, loaders and modpacks.
Communication
Frontend -> typed Tauri commands -> licht-core
Frontend <- Tauri events <- adapter handling core progress and status- TanStack Query handles command loading, caching, mutations and errors.
- Progress events are throttled to about 100 ms.
- Shared types are generated with
ts-rsintosrc/lib/generated, not maintained by hand in TypeScript.
Frontend layout
src/routes: TanStack Router file-based routes that mount feature screens.src/features: screens and feature-specific UI behavior.src/components/ui: shared design-system components that use theme tokens.src/lib: UI utilities and typed invocation wrappers.
The generated src/routeTree.gen.ts is committed, so type checking does not depend on a Vite build. Hash history (/#/) avoids requiring the Tauri window to rewrite paths to index.html. The UI runs in WebView2 on Windows and WebKitGTK on Linux.
Errors and logging
- The core exports
CoreError, derived withthiserror, and aResult<T>alias. I/O errors keep their source. - Application startup uses
anyhowto add context at the boundary. Errors propagate with?. - Logging uses
tracingandtracing-subscriber, with structured text on stderr.RUST_LOGselects the filter, and an absent or empty value defaults to INFO. - Logs must not contain tokens, secrets or personal data.
Testing
The core is testable on its own with cargo test -p licht-core. Integration tests under crates/licht-core/tests/ mirror the source domains, and fixtures live under tests/fixtures/. Tests use saved JSON and temporary databases without network access. Frontend tests use Vitest, Testing Library and jsdom. See Tests.
Related internals
These documents live in the launcher repository:
- Storage: profile and content directories, the SQLite service and instance persistence.
- Runtime: Java selection, installation and discovery.
- Loaders: loader profiles and Forge and NeoForge processors.
- Compatibility: manifest formats, legacy execution, native libraries, assets, logs and known gaps.
- Integrations: Microsoft, Modrinth and CurseForge.
References
- Mojang version manifest
- minecraft.wiki for JSON formats and authentication
- Tauri v2 documentation
- Reference implementations: Prism Launcher, HMCL, portablemc and minecraft-launcher-lib.