Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 64 additions & 16 deletions apps/tauri/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,49 @@

Parallel greenfield client: **Tauri 2 + Vue 3 + Pinia**. Lives next to the Flutter app in this monorepo. UI kit is Querya (Fluid Motion + Liquid Glass) — **not** shadcn.

Integration branch: `epic/tauri-migration`. Child work: `issue/<n>-slug` → PR into that epic branch.
| | |
|---|---|
| Integration branch | `epic/tauri-migration` |
| Child branches | `issue/<n>-slug` → PR into the epic branch |
| Bundle id | `com.queryahub.querya_tauri` (Flutter stays `com.queryahub.querya_desktop`) |
| CI | [`.github/workflows/tauri-ci.yml`](../../.github/workflows/tauri-ci.yml) (path-filtered on `apps/tauri/**`) |

## Prerequisites
## Toolchain (pinned / expected)

- [Node.js](https://nodejs.org/) 20+ and [pnpm](https://pnpm.io/)
- [Rust](https://rustup.rs/) stable + platform Tauri deps
See [Tauri prerequisites](https://tauri.app/start/prerequisites/)
- `pnpm` / `cargo` on `PATH`
| Tool | Expect |
|------|--------|
| Node.js | **20+** (CI uses 22) |
| pnpm | **10+** |
| Rust | **stable** via [rustup](https://rustup.rs/) |
| Tauri CLI | via `pnpm` (`@tauri-apps/cli` in this package) |
| Vue / Vite | see `package.json` |

Do not use a global `cargo install tauri-cli` for day-to-day work — prefer `pnpm tauri …` so the CLI matches the lockfile.

## Platform dependencies

Official matrix: [Tauri prerequisites](https://tauri.app/start/prerequisites/).

### Linux (Debian/Ubuntu-like)

```bash
sudo apt update
sudo apt install -y \
build-essential curl wget file libxdo-dev libssl-dev \
libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf
```

Arch: `webkit2gtk-4.1`, `base-devel`, `curl`, `wget`, `file`, `openssl`, `appmenu-gtk-module`, `librsvg`, `xdotool`.

### macOS

- Xcode CLT: `xcode-select --install`
- Optional: `brew install` nothing extra for a basic `tauri dev` on recent macOS

### Windows

- Microsoft C++ Build Tools + WebView2 (Tauri installer docs cover this)
- Use a developer PowerShell / VS Dev environment so `link.exe` is on `PATH`

## First run

Expand All @@ -19,7 +54,9 @@ pnpm install
pnpm tauri dev
```

Useful scripts:
You should get an empty Querya splash window and an `app_info` IPC line in the UI.

### Scripts

| Script | What |
|--------|------|
Expand All @@ -29,24 +66,35 @@ Useful scripts:
| `pnpm typecheck` | TypeScript / Vue check |
| `pnpm tauri build` | Native bundles |

Rust checks:
### Rust

```bash
cd src-tauri
cargo check
cargo test
cd apps/tauri/src-tauri
cargo check --locked
cargo test --locked
```

## Layout

```
apps/tauri/
src/ # Vue 3 + Pinia
src-tauri/ # Rust / Tauri 2
src/ # Vue 3 + Pinia
src/stores/ # Pinia stores
src-tauri/ # Rust / Tauri 2
src-tauri/src/ # crate root (lib + bin)
pnpm-workspace.yaml # allows esbuild postinstall under pnpm 10+
```

Identifier: `com.queryahub.querya_tauri` (distinct from Flutter `com.queryahub.querya_desktop`).
## Troubleshooting

- **`ERR_PNPM_IGNORED_BUILDS` / missing esbuild** — this package lists `esbuild` under `onlyBuiltDependencies` in `pnpm-workspace.yaml`. Re-run `pnpm install`. On older pnpm, `pnpm approve-builds --all` then reinstall.
- **`cargo` cannot find webkit** — install the Linux packages above; wrong webkit major (4.0 vs 4.1) is a common miss.
- **Port 1420 in use** — Vite is fixed to `1420` for Tauri (`vite.config.ts`). Free the port or stop the other process.
- **Flutter analysis noisy after opening this folder** — use the repo editor settings from issue `#1859` / `.vscode` so rust-analyzer points at `apps/tauri/src-tauri` only.

## GitFlow note
## GitFlow

Do not open PRs from tauri issue branches into `dev` until the SQLite vertical slice on the epic branch is green. Target **`epic/tauri-migration`**.
1. `git fetch && git checkout epic/tauri-migration && git pull --ff-only`
2. `git checkout -b issue/<n>-short-slug`
3. PR **into `epic/tauri-migration`**, body contains `Closes #<n>`
4. Do **not** target `dev` until the SQLite vertical slice on the epic branch is green
Loading