# Desktop app Active contributors: Douwe de Vries, vriesd ## Purpose The desktop app is the QA Scribe runtime users install and run. `src-tauri/src/main.rs` initializes the native shell and backend state, while `frontend/src/main.tsx` mounts the React renderer. ## Directory layout ```text src-tauri/ src/main.rs src/commands/ src/jobs.rs src/settings.rs frontend/src/ main.tsx App.tsx app/ views/ editor/ ``` ## Key source files | File | Purpose | | --- | --- | | `src-tauri/src/main.rs` | Creates app state, opens SQLite, registers plugins and command handler, kills children on exit. | | `src-tauri/src/settings.rs` | Wraps `SessionService` in Tauri-managed `AppState`. | | `src-tauri/src/commands.rs` | Groups command modules exposed to the renderer. | | `frontend/src/main.tsx` | Mounts the React root. | | `frontend/src/App.tsx` | Connects `AppShell` to `useAppController`. | | `frontend/src/app/AppShell.tsx` | Desktop layout and view routing. | ## How it works ```mermaid graph TD Main[src-tauri/src/main.rs] --> State[AppState] Main --> Jobs[JobStore] Main --> Commands[Specta command handler] React[frontend/src/App.tsx] --> Shell[AppShell] Shell --> Controller[useAppController] Controller --> Commands ``` The app opens `qa-scribe.sqlite` in the app-data directory and stores attachments under the same app-data root. The frontend boots by calling `getSettings()` and `listSessions()` through `frontend/src/tauri.ts`, then opens the first Session if one exists. ## Integration points The desktop app depends on [Rust core](systems--rust-core.md), [Tauri command bridge](systems--tauri-command-bridge.md), and [Frontend shell](systems--frontend-shell.md). Generation paths also use [Generation jobs](systems--generation-jobs.md). ## Entry points for modification Start in `frontend/src/app/AppShell.tsx` for layout changes, `frontend/src/app/useAppController.ts` for workflow state, and `src-tauri/src/main.rs` for native app setup.