Skip to main content

Prerequisites

Before you begin, install the following tools:
ToolVersionNotes
Node.jsLTS recommendedRequired by the Vue 3 frontend
pnpm10.26.2Specified in package.json as packageManager
Rust toolchainstableInstall via rustup
Tauri platform depsPlatform-specific system libraries
Tauri requires additional platform dependencies (WebView2 on Windows, webkit2gtk on Linux). Refer to the Tauri prerequisites guide for the full list.

Setup

1

Install prerequisites

Install Rust via rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Install pnpm:
npm install -g [email protected]
Then follow the Tauri prerequisites guide for your operating system.
2

Clone the repository

git clone https://github.com/TouchAI-org/TouchAI.git
cd TouchAI
3

Install dependencies

pnpm install
This installs all Node.js dependencies. Rust crate dependencies are fetched automatically during the first build.
4

Run the development server

pnpm tauri dev
This starts the Vite dev server on http://localhost:1420 and launches the Tauri application with hot-module replacement.
The main window starts hidden. It becomes visible when triggered via the global shortcut or system tray.
5

Build for production

pnpm tauri build
Runs vue-tsc --noEmit && vite build for the frontend, then compiles the Rust backend with release optimisations (lto = "fat", opt-level = "z", dead-code stripping). Bundles are written to src-tauri/target/release/bundle/.

Development modes

MCP Bridge mode

Start the app with the optional mcp-bridge Cargo feature enabled for automated MCP testing:
pnpm run tauri:dev:mcp
This maps to tauri dev --features mcp-bridge and conditionally includes tauri-plugin-mcp-bridge.

Frontend only

Run just the Vite dev server without launching the Tauri shell:
pnpm dev

Database

TouchAI uses Drizzle ORM with SQLite (data/touchai.db). The schema lives in src/database/schema.ts and migrations are output to drizzle/.
pnpm run db:generate

Testing

pnpm test
test:run passes with no tests (--passWithNoTests), so CI does not fail on a clean checkout.

Linting and formatting

pnpm run lint
format:fix runs Prettier on all tracked file types and then cargo fmt on the Rust sources in one command.

Rust checks

pnpm run check:rust
Runs cargo check --all-targets against src-tauri/Cargo.toml without producing a binary — useful for fast compile-error feedback.

Build docs developers (and LLMs) love