A modern desktop application template built with Tauri v2, React 19, and Rust. The goal is not to provide a starter that only shows a launch screen, but to provide an engineering foundation you can move straight into real product development with.
The reasons to recommend this template are concrete:
- It is not an empty shell: desktop app, CLI, mobile shell, i18n, themes, command system, tests, and quality checks are already wired up, so you do not need to assemble everything from scratch.
- It is suitable for long-term maintenance: directory boundaries, state management layers, frontend-backend bridge patterns, and shared package structure are already defined, so the codebase is less likely to collapse as features grow.
- It lowers the Tauri learning curve: if you already know frontend development but are new to Rust or Tauri, common integration patterns are already prepared and easy to follow.
- It reduces engineering overhead: type checking, linting, Rust checks, i18n, theme tokens, and shared UI infrastructure are already in place, so you do not need to keep rebuilding scaffolding while developing features.
- It works well with AI-assisted development: the repository structure, docs, and rules are explicit enough that generated code is more likely to follow the same conventions instead of drifting into chaos.
If you only want a minimal Hello World, this template will feel heavy. But if you want to build a desktop app that will keep evolving, involve collaboration, or expand across platforms, it is a better fit than a blank starter.
Companion UI project (in progress):
If you are new to this repository, this is the best section to understand first.
- React 19 Used to build the desktop app UI.
- TypeScript Adds type safety to frontend code.
- Vite Handles the frontend dev server and build pipeline.
- Tauri v2 Packages the frontend as a desktop app and provides native capability bridges.
- Rust Powers Tauri commands, file access, system integration, and part of the application logic.
- shadcn/ui Base component system for common UI primitives such as buttons, dialogs, and forms.
- Tailwind CSS v4 Used for styling and shared theme tokens.
- Lucide React Icon library.
- useState For temporary component-local state.
- Zustand For shared frontend UI / app state.
- TanStack Query For async and persistent data flows.
- react-i18next
Frontend i18n, with locale files in
packages/i18n/locales. - rust-i18n
Rust-side i18n, with locale files in
crates/locales.
The template supports Chinese and English by default.
- Vitest Frontend test runner.
- Testing Library React component testing utilities.
- cargo test Rust-side tests.
- ESLint JavaScript / TypeScript linting.
- Prettier Code formatting.
- ast-grep Structural rule checks used to enforce architecture constraints.
- clippy Rust linting.
- knip Detects unused code and dependencies.
- jscpd Detects duplicate code.
Out of the box, this template already includes:
- a desktop app shell
- a CLI subproject
- a mobile Tauri shell
- React + TypeScript + Vite setup
- Rust command bindings
- Chinese and English i18n
- shared UI components and shared style tokens
- tests, linting, formatting, and Rust checks
- one-command quality checks with
npm run check:all
You do not need to assemble these basics from scratch.
The easiest way to get lost in this repository is to treat it like a small single-app repo. Start with this map:
apps/
desktop/ Main desktop app (most common place to edit)
cli/ CLI tool
mobile/ Mobile Tauri shell
packages/
components/ Shared UI components
css/ Shared global styles and theme tokens
config/ Shared config
i18n/ Frontend translations
shared/ Shared state or common logic
crates/
locales/ Rust-side translations
icons/ App icon resources
docs/
developer/ Developer documentation
userguide/ User documentation template
If you only want to get the app running and start changing the UI, focus on:
apps/desktop/src: React pages and componentsapps/desktop/src-tauri/src: Rust codepackages/i18n/locales: frontend translationscrates/locales: Rust translationspackages/css: themes and global styles
At minimum, install these first.
Use Node.js 20 or newer.
Check it with:
node -v
npm -vInstall the stable toolchain.
Check it with:
rustc -V
cargo -VTauri is not a frontend-only project. It depends on native system tooling, so different platforms need different setup.
- macOS: run
xcode-select --install - Windows: install Visual Studio C++ Build Tools
- Linux: install the packages listed in the Tauri prerequisites guide
Official guide:
If you are a beginner, it is best to install those first before continuing.
git clone <your-repo-url>
cd app01-templateThis repository requires npm. Do not use pnpm, yarn, or bun.
npm installnpm run tauri:devIf everything is set up correctly, the desktop app window should open.
npm run tauri:devnpm run devImportant difference:
npm run devstarts only the Vite frontendnpm run tauri:devstarts the full desktop app development workflow
npm run tauri:buildnpm run test:runnpm run rust:testnpm run check:allThat command checks:
- TypeScript
- ESLint
- Prettier
- ast-grep
- Rust fmt
- clippy
- Vitest
- cargo test
If you changed a meaningful amount of code, run it before finishing.
You can think about work in this template in the following order.
Most UI work usually lives in:
apps/desktop/src/componentsapps/desktop/src/App.tsxapps/desktop/src/components/layout
This repository has clear rules:
- component-local temporary state:
useState - shared UI state across components:
Zustand - persistent or async data:
TanStack Query
If you are new, you do not need to move everything into global state immediately.
Examples:
- file reading and writing
- system notifications
- desktop window control
- local database operations
Those usually live in:
apps/desktop/src-tauri/src/commands
Avoid calling low-level system features directly from the frontend. Prefer typed Tauri command bindings.
This project supports Chinese and English by default.
So when you add visible text:
- frontend strings go into
packages/i18n/locales/en.jsonandzh.json - Rust strings go into
crates/locales/en.jsonandzh.json
The easiest way to learn this repo is to start with a small change.
Start here:
apps/desktop/src/App.tsxpackages/i18n/locales/zh.jsonpackages/i18n/locales/en.json
Change one frontend string and confirm you can see the UI update.
Look here:
packages/css/light.csspackages/css/dark.css
These files store the shared theme tokens.
Look here:
apps/desktop/src/componentspackages/components/ui
If it is only used by the current desktop app, prefer apps/desktop/src/components.
Only move it into packages/components/ui when it is actually shared across apps.
The most common beginner mistake is not syntax. It is editing the wrong place. These rules matter:
Do not switch package managers.
Do not assume everything belongs in a root src/ folder.
Modern paths are usually:
apps/desktop/src/...apps/desktop/src-tauri/...packages/...
- React translations:
packages/i18n - Rust translations:
crates/locales
This repository is strict about state layering. Once state affects multiple components or app flow, it should not stay spread across ad hoc hooks.
Frontend business data access should go through Rust commands.
For UI primitives, check:
packages/components/ui
Do not create another parallel set of basic buttons, forms, and dialogs unless needed.
If you are new, read in this order:
- docs/USING_THIS_TEMPLATE.md
- docs/developer/README.md
- docs/developer/architecture-guide.md
- docs/developer/state-management.md
- docs/developer/tauri-commands.md
- docs/developer/i18n-patterns.md
If you do not want to read too much at once, at least start with:
architecture-guide.mdREADME.md
Most likely this is not a project code problem. Missing system dependencies are more common.
Check first:
- whether Rust is installed
- whether
xcode-select --install/ Windows Build Tools / Linux dependencies are installed - whether
cargo -Vruns successfully
Make sure you are running:
npm run tauri:devand not only:
npm run devAsk yourself first:
- is this code only used by the desktop app?
If yes, keep it in apps/desktop.
Only move it into packages when it is actually shared across multiple apps.
Because this template is not meant for quickly stacking a demo. It is meant for projects that will keep evolving.
These checks are there to catch problems early:
- type errors
- styling / formatting issues
- architecture violations
- Rust warnings
- test failures
If you want to build your own app from this template, a good starting order is:
- get the project running
- change app name, title, and icon
- change a few UI strings
- tweak theme colors
- add one small component
- run
npm run check:all - then start building real product features
Do not try to change Rust, database code, windows, i18n, and release workflows all at once. Get the smallest working loop first.
This template is a good fit for:
- frontend developers learning Tauri
- indie developers building desktop apps
- developers who want to move from a simple starter to a more structured engineering base
- developers who want AI-assisted coding but do not want the project structure to become messy
If you only want a minimal Hello World, this template may feel heavy. If you want to build an app that will actually be maintained over time, it is a better fit.
- Chinese README: README-zh.md
- Template usage guide: docs/USING_THIS_TEMPLATE.md
- Developer docs index: docs/developer/README.md
- User guide template: docs/userguide/userguide.md