···4455## Project Overview
6677-Tatami is a Rust application using GPUI (GPU-accelerated UI framework) and jj-lib (Jujutsu version control library).
77+Tatami is a desktop GUI client for Jujutsu (jj) version control. It's a Tauri v2 + React application with a Rust backend integrating jj-lib.
88+99+## Monorepo Structure
1010+1111+- `/apps/desktop` - Active Tauri + React application
1212+- `/apps/old-gui` - Legacy GPUI-based app (deprecated)
813914## Build Commands
10151116```bash
1212-cargo build # Build the project
1313-cargo run # Run the application
1414-cargo test # Run tests
1515-cargo clippy # Run linter
1616-cargo fmt # Format code
1717+# Development (from root)
1818+bun run dev # Start Vite dev server (frontend only)
1919+bun run tauri dev # Run full Tauri app in dev mode
2020+2121+# Build
2222+bun run build # Build frontend
2323+bun run tauri build # Build desktop app
2424+2525+# Frontend (from apps/desktop)
2626+bun run typecheck # TypeScript type checking (tsgo)
2727+bun run lint # Biome linter
2828+bun run format # Biome formatter
2929+3030+# Rust (from apps/desktop/src-tauri or root)
3131+cargo build # Build Rust backend
3232+cargo test # Run tests
3333+cargo clippy # Run linter
3434+cargo fmt # Format code
1735```
18363737+## Architecture
3838+3939+**Data Flow**:
4040+```
4141+React Frontend → Tauri IPC Commands → Rust Backend → jj-lib → Repository
4242+ → SQLite (projects, layout state)
4343+```
4444+4545+**Frontend Stack** (`apps/desktop/src/`):
4646+- TanStack Router for routing
4747+- TanStack Query + TanStack DB for state management
4848+- effect-atom for reactive global state
4949+- shadcn/ui + Tailwind CSS v4 for styling
5050+5151+**Backend** (`apps/desktop/src-tauri/src/`):
5252+- `lib.rs` - Tauri command definitions
5353+- `repo/` - jj-lib integration (jj.rs, log.rs, status.rs, diff.rs)
5454+- `storage.rs` - SQLite persistence layer
5555+- `watcher.rs` - File system watching for repo changes
5656+5757+**Key Frontend Files**:
5858+- `components/RevisionGraph.tsx` - DAG visualization with lane allocation
5959+- `hooks/useKeyboard.ts` - Vim-style keyboard navigation
6060+- `db.ts` - TanStack DB collections with file watcher integration
6161+- `tauri-commands.ts` - Type-safe Tauri command wrappers
6262+6363+## Browser-Only Development
6464+6565+The frontend supports running without Tauri via mocks in `src/mocks/`. Vite aliases Tauri imports when `TAURI_DEV_HOST` is not set, enabling UI development in a regular browser.
6666+1967## Dependencies
20682121-- **gpui**: GPU-accelerated UI framework (from Zed editor)
2222-- **jj-lib**: Jujutsu version control library for repository operations
6969+- **jj-lib** (0.35.0) - Jujutsu version control library
7070+- **Tauri** (2.1) - Desktop application framework
7171+- **SQLx** - SQLite database access
7272+- **notify** - File system watching