README.md

July 15, 2026 · View on GitHub

Tauri logo Vite logo

template-tauri-vite-react-ts-tailwind

An opinionated Tauri v2 starter template organized as a pnpm monorepo.

React 19 TypeScript 5 Vite 7 Tailwind CSS 4 Tauri 2

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:

Prerequisites

Before using the template, install the following tools:

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.

ArgumentRequiredExampleDescription
--nameYes"My App"The project name, equivalent to the Project name field in create-tauri-app.
--idYescom.example.my-appThe 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.
InputWorkspace packageRust packageRust library
MyProjectHellomy-project-hellomyprojecthellomyprojecthello_lib
myProjectHellomy-project-hellomyprojecthellomyprojecthello_lib
my_project_hellomy-project-hellomy_project_hellomy_project_hello_lib

Start the desktop application

pnpm tauri dev

Available Scripts

Run these commands from the repository root:

CommandDescription
pnpm devStart the Vite frontend development server.
pnpm buildType-check the frontend and create a production frontend build.
pnpm previewPreview the production frontend build locally.
pnpm tauri devStart the Tauri application in development mode.
pnpm tauri buildBuild platform-specific desktop application bundles.
pnpm lintCheck the workspace with Oxlint.
pnpm lint:fixApply supported Oxlint fixes.
pnpm rename-project --name "My App" --id com.example.my-appRename 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

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.