guanghu/docs/adr/0001-tauri-react-stack.md
Guanghu Domestic Migration 9b41d51231
Some checks are pending
Auto-update PR branches / Update open PR branches (push) Waiting to run
CI / Frontend Static Quality Checks (push) Waiting to run
CI / Frontend Tests & Coverage (push) Waiting to run
CI / Rust Tests & Quality Checks (push) Waiting to run
CI / Linux build verification (push) Waiting to run
Deploy docs / Build VitePress site (push) Waiting to run
Deploy docs / Deploy to GitHub Pages (push) Blocked by required conditions
Release (Alpha) / Compute alpha version (push) Waiting to run
Release (Alpha) / Build release artifacts (push) Blocked by required conditions
Release (Alpha) / GitHub Release (alpha) (push) Blocked by required conditions
Release (Alpha) / Update docs and release pages (push) Blocked by required conditions
chore: import sanitized domestic snapshot for REPO-004
Source snapshot: 514ab1975951d94342ea38e64101d5a0f1c51c77
2026-07-17 15:55:28 +08:00

1.6 KiB

type, id, title, status, date
type id title status date
ADR 0001 Tauri v2 + React as application stack active 2026-02-14

Context

Laputa is a desktop app for macOS (with iPad as a future target) that reads and writes a vault of markdown files. The app needs a native feel, filesystem access, git integration, and a rich text editor. A single developer (with AI assistance) is building it.

Decision

Use Tauri v2 (Rust backend + WebView frontend) with React + TypeScript for the UI, BlockNote for the editor, and Vitest + Playwright for testing.

Alternatives considered

  • Electron: heavier runtime (~150MB), slower, but more mature ecosystem. Rejected — Tauri is lighter and has better native integration.
  • SwiftUI: best native macOS/iOS experience, but locks to Apple platforms only, no code sharing with a potential web version, and requires rewriting the entire UI. Rejected for the initial version — revisited in ADR-0005.
  • Flutter: cross-platform but WebView-based editor would have been poor; Dart ecosystem is thin for markdown tooling.
  • Pure web app: no filesystem access, no git, would require a backend server. Rejected — offline-first is a core principle.

Consequences

  • React frontend can be shared with a future web version
  • Rust backend provides safe, fast filesystem/git operations
  • Tauri v2 supports iOS (beta) — see ADR-0005 for iPad strategy
  • CodeScene code health monitoring applies to both Rust and TypeScript code
  • Claude Code can work on both layers without context switching
  • Triggers re-evaluation if: Tauri iOS proves unstable for production, or if SwiftUI becomes the primary target platform