Skip to content

feat: scaffold Tauri desktop GUI (Svelte + TypeScript)#14

Open
pszymkowiak wants to merge 1 commit into
mainfrom
feat/tauri-gui-scaffold
Open

feat: scaffold Tauri desktop GUI (Svelte + TypeScript)#14
pszymkowiak wants to merge 1 commit into
mainfrom
feat/tauri-gui-scaffold

Conversation

@pszymkowiak

Copy link
Copy Markdown
Owner

Summary

  • Adds `crates/enigma-gui/` — a Tauri 2 desktop application wrapping the existing CLI flows (init, backup, restore, list, status, config view).
  • Frontend: Svelte 4 + TypeScript + Vite. Backend: Rust, calls `enigma-core` / `enigma-storage` / `enigma-keys` directly with no IPC ceremony.
  • New crate added to workspace `members`; excluded from `default-members` so plain `cargo build` at the root does not require the Tauri toolchain (webkit2gtk on Linux, etc.).

What's in

Layer Files
Rust backend `src/main.rs`, `src/commands.rs` (7 `#[tauri::command]` handlers), `src/state.rs`, `tauri.conf.json`, `build.rs`, `capabilities/default.json`
Svelte frontend `ui/` — `App.svelte` + 7 route components (`Welcome`, `Init`, `Backup`, `Restore`, `BackupList`, `Status`, `ConfigView`)
TS plumbing `ui/src/lib/invoke.ts` (typed Tauri wrappers), `ui/src/lib/types.ts` (DTOs mirroring Rust structs)
Workspace `Cargo.toml` adds `crates/enigma-gui` and a `default-members` list

Test plan

  • `cd crates/enigma-gui/ui && npm install && npm run build` succeeds
  • `cargo check -p enigma-gui` succeeds (not validated locally — dev env missing build-essential)
  • `cargo tauri dev` launches the window (needs webkit2gtk on Linux)
  • Click through: Init flow → enter passphrase → Backup tab → pick a folder → run → check BackupList shows the record

Out of scope (follow-ups)

  • System tray + scheduled backups + notifications
  • Integration of the new OneDrive / Google Drive backends (parallel PR)
  • Code signing for macOS / Windows
  • E2E tests (Playwright / WebdriverIO)
  • Localization (i18n)

Known limitations

  • Not validated locally (no build-essential on dev machine).
  • The `init_providers` match in `src/commands.rs` currently lists `Azure` and `Gcs` as `bail!` cases; the parallel PR A adds `Onedrive` and `Gdrive` variants to `ProviderType` which will force this match to be updated when PR A merges first.

🤖 Generated with Claude Code

Adds crates/enigma-gui/ — a Tauri 2 desktop application wrapping the
existing CLI commands behind a graphical interface.

Stack:
- Rust backend: tauri 2, enigma-core/storage/keys as workspace deps
- Frontend: Svelte 4 + TypeScript + Vite
- Plugins: tauri-plugin-dialog (file picker), tauri-plugin-fs

Scope (MVP):
- 7 Tauri commands (is_initialized, init, backup, restore, list, status,
  get_config) mirroring the CLI subcommands
- 7 Svelte routes (Welcome, Init, Backup, Restore, BackupList, Status,
  ConfigView)
- Native file/folder pickers via tauri-plugin-dialog
- Reuses CLI's chunking/crypto/dedup pipeline — backups created here are
  interchangeable with the CLI

Workspace wiring:
- Added crates/enigma-gui to workspace members
- Added default-members excluding enigma-gui so root cargo build does not
  pull in the Tauri/webkit2gtk toolchain

Out of scope (follow-ups):
- System tray, scheduled backups, notifications
- OneDrive / Google Drive backends (parallel PR)
- Code signing for macOS / Windows
- E2E tests (Playwright / WebdriverIO)
- Localization (i18n)

How to build:
  cd crates/enigma-gui/ui && npm install && npm run build
  cargo build -p enigma-gui    # or: cargo tauri build (needs webkit2gtk on Linux)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants