README.md
July 15, 2026 · View on GitHub
template-tauri-vite-react-ts-tailwind
An opinionated Tauri v2 starter template organized as a pnpm monorepo.
Overview
This repository provides a practical foundation for building cross-platform desktop applications with Tauri. The frontend uses React, TypeScript, Vite, and Tailwind CSS, while reusable modules are organized as pnpm workspace packages.
The template includes:
- Tauri 2 for the native desktop application shell
- React 19 and TypeScript 5 for the frontend
- Vite 7 for development and production builds
- Tailwind CSS 4 through its Vite integration
- A pnpm workspace for application and shared packages
- Oxlint and Oxfmt configuration
- A project renaming script that synchronizes the workspace, Tauri, and Rust package names
Prerequisites
Before using the template, install the following tools:
- Node.js 20.19 or later, or 22.12 or later, as required by Vite 7
- pnpm
- Rust
- The platform-specific dependencies listed in the Tauri prerequisites guide
This repository is configured for pnpm. Using npm, Yarn, or another package
manager requires corresponding changes to the workspace scripts and
apps/tauri-app/src-tauri/tauri.conf.json.
Getting Started
Create a repository from the template
The recommended approach is to select Use this template on GitHub and create a new repository from this template.
Alternatively, download the source archive or create a clean local copy with tiged:
pnpm dlx tiged royrao2333/template-tauri-vite-react-ts-tailwind my-app
cd my-app
Install dependencies
pnpm install
Rename the project
Rename the template before starting application development:
pnpm rename-project --name "My App" --id com.example.my-app
The command updates the application directory, workspace package name, root scripts, Tauri product name, window title, bundle identifier, Cargo package, Rust library name, Rust entry point, and application README reference.
| Argument | Required | Example | Description |
|---|---|---|---|
--name | Yes | "My App" | The project name, equivalent to the Project name field in create-tauri-app. |
--id | Yes | com.example.my-app | The application bundle identifier, equivalent to the Identifier field in create-tauri-app. |
Name normalization
Workspace package names use kebab-case. This name is applied to the
apps/<workspace-package-name> directory, the @app/<workspace-package-name>
package, and the root pnpm filter scripts.
Rust and Tauri package names follow the normalization behavior used by
create-tauri-app:
- Input is converted to lowercase.
- Colons, semicolons, spaces, and tildes are converted to hyphens.
- Periods, forward slashes, and backslashes are removed.
- Leading digits and hyphens are removed.
- An empty result falls back to
tauri-app.
| Input | Workspace package | Rust package | Rust library |
|---|---|---|---|
MyProjectHello | my-project-hello | myprojecthello | myprojecthello_lib |
myProjectHello | my-project-hello | myprojecthello | myprojecthello_lib |
my_project_hello | my-project-hello | my_project_hello | my_project_hello_lib |
Start the desktop application
pnpm tauri dev
Available Scripts
Run these commands from the repository root:
| Command | Description |
|---|---|
pnpm dev | Start the Vite frontend development server. |
pnpm build | Type-check the frontend and create a production frontend build. |
pnpm preview | Preview the production frontend build locally. |
pnpm tauri dev | Start the Tauri application in development mode. |
pnpm tauri build | Build platform-specific desktop application bundles. |
pnpm lint | Check the workspace with Oxlint. |
pnpm lint:fix | Apply supported Oxlint fixes. |
pnpm rename-project --name "My App" --id com.example.my-app | Rename the template and update its application identifiers. |
Oxfmt behavior is defined in oxfmt.config.ts. Oxlint rules are defined in
oxlint.config.ts.
Project Structure
.
├── apps/
│ └── tauri-app/ # React frontend and Tauri application
├── packages/
│ ├── core/ # Shared core modules
│ ├── tauri-api/ # Shared Tauri API integrations
│ ├── ui/ # Shared UI modules
│ └── utils/ # Shared utility modules
├── scripts/
│ └── renameProject.ts # Project renaming utility
├── oxfmt.config.ts # Oxfmt configuration
├── oxlint.config.ts # Oxlint configuration
└── pnpm-workspace.yaml # pnpm workspace definition
Related Projects
Contributing
Contributions are welcome. Before opening a pull request, run the relevant build and lint commands and verify the application on the platform affected by your changes.
Use the issue tracker to report bugs, request features, or propose significant changes.
License
This project is available under the terms of the MIT License.