# 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](https://1003959744-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvs4LQcuzr0JR34ApS5sM%2Fuploads%2Fgit-blob-3f21a3c92aa0f552fdb9a8bec1075f2b8e5be0b5%2Fvscode_run_tauri.png?alt=media)

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](https://1003959744-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvs4LQcuzr0JR34ApS5sM%2Fuploads%2Fgit-blob-5650c549d903b25211f1d6451105e0b1cf365c30%2Ftauri_package_json.png?alt=media)

## Clean

Remove the build artifacts first when facing compiler errors.

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