# Tauri Setup

## Clone AppFlowy

Clone [AppFlowy](https://github.com/AppFlowy-IO/AppFlowy)

```shell
git clone git@github.com:AppFlowy-IO/AppFlowy.git
```

## Install prerequisites

1. Follow the instructions [here](https://tauri.app/v1/guides/getting-started/prerequisites) to install Tauri
2. Install cargo-make

```shell
# AppFlowy use cargo-make to run the scripts
cargo install cargo-make
```

3. Install AppFlowy dev tools

```shell
# install development tools
cd AppFlowy/frontend
cargo make appflowy-tauri-deps-tools

cd appflowy_tauri
npm install -g pnpm
pnpm install
```

## IDE setup

### VSCode

You can run from VSCode: Open the [**frontend**](https://github.com/AppFlowy-IO/AppFlowy/tree/main/frontend) folder located at `AppFlowy/frontend` with VSCode.

![img.png](/files/BVc3tuHy8UEWeBkuq8Rd)

This option enable debugging the [core process](https://tauri.app/v1/references/architecture/process-model#the-core-process) directly. Or you can run manually:

```shell
cd frontend
cargo make tauri_dev
```

### WebStorm

Open the **appflowy\_tauri** folder located at `AppFlowy/frontend/appflowy_tauri` and then run the `tauri:dev`.

![img.png](/files/Tg2GrBOOC9mlhhX7V98V)

## Clean

Remove the build artifacts first when facing compiler errors.

```shell
cd frontend
cargo make tauri_clean
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.appflowy.io/docs/documentation/appflowy/from-source/tauri-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
