Skip to content
Home / Docs / development

Development Guide

Prerequisites

  • Node 20+ and pnpm 9+ (corepack enable)
  • Rust stable via rustup
  • Tauri v2 system dependencies — see the official list:
    • macOS: Xcode command line tools
    • Linux: libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libssl-dev
    • Windows: WebView2 (preinstalled on Win 11), MSVC build tools

Everyday commands

CommandWhat it does
pnpm installinstall all workspace deps
pnpm iconsgenerate placeholder app icons (required once before tauri dev)
pnpm tauri:devrun the full desktop app (Vite + Rust, hot reload both sides)
pnpm devfrontend only, in the browser, on the built-in demo dataset
pnpm typecheckTypeScript across all packages
pnpm test / pnpm test:watchunit tests (Vitest)
pnpm test:e2ePlaywright against demo mode
cd apps/desktop/src-tauri && cargo testgit engine integration tests (real temp repos)
pnpm tauri:buildproduction bundles (.dmg/.msi/.deb/.AppImage)
pnpm release:macbuild, then open the folder containing the .dmg
pnpm install:maccopy the built AngKorGit.app into /Applications and launch it

Demo mode

src/core/ipc.ts detects whether it runs inside Tauri. Outside (plain browser), every command is answered by src/core/demo.ts — a deterministic 400-commit synthetic repository with branches, merges, a dirty working copy and a conflict sample. Use it for all UI work; it is also what CI’s Playwright job tests.

Working on the Rust engine

The engine lives in apps/desktop/src-tauri/src/core/, one module per domain area. Conventions:

  • Commands (commands.rs) stay thin — parse args, call core::*, return serde types.
  • Everything blocking goes through the blocking() helper (spawn_blocking).
  • Every operation that can leave the repo mid-state (merge, rebase, cherry-pick) returns an OpOutcome with status: "conflicts" rather than an error.
  • Add integration coverage in tests/git_engine.rs for every new engine function — tests create real repositories in a temp dir.

Adding an AI provider

  1. Implement the adapter in packages/core/src/ai/providers.ts (one function, ~40 lines).
  2. Register it in createAiProvider and AI_PROVIDER_PRESETS.
  3. Done — settings UI, capabilities and transport pick it up automatically.

Release

Tag v* and push: .github/workflows/release.yml builds macOS (universal), Windows and Linux bundles via tauri-action and attaches them to a draft GitHub release.