A starter template for cross-platform app development with Tauri 2.x, React 19, TypeScript, and TailwindCSS 4. Ready for macOS, iOS, and Android development out of the box.
- Node.js (v18 or higher)
- pnpm (package manager)
- Rust (for Tauri backend)
- macOS only: Xcode Command Line Tools (
xcode-select --install) - iOS development: Xcode from the Mac App Store
- Android development: Android Studio with SDK and NDK
- Clone the repository:
git clone <repository-url>
cd my-tauri-app- Install dependencies:
pnpm install- Run the development server:
pnpm tauri dev # macOS desktop appThat's it! The app should launch on your desktop.
1. Install iOS Rust compilation targets:
rustup target add aarch64-apple-ios aarch64-apple-ios-sim x86_64-apple-ios2. Run on iOS simulator:
pnpm tauri ios devThe first time you run this command, Tauri will generate the Xcode project (in src-tauri/gen/ios/). After that, Tauri will prompt you to select an available simulator, which it will automatically start for you. You can skip the prompt by specifying the simulator name:
pnpm tauri ios dev "iPhone 16 Pro"Android development requires additional setup beyond installing Android Studio:
1. Install Android Studio and SDK components:
- Download Android Studio
- Open SDK Manager and install:
- Android SDK Platform (API Level 24 or higher)
- Android SDK Platform-Tools
- NDK (Side by side)
- Android SDK Build-Tools
- Android SDK Command-line Tools
2. Set environment variables (add to ~/.zshrc or ~/.bash_profile):
export JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home"
export ANDROID_HOME="$HOME/Library/Android/sdk"
export NDK_HOME="$ANDROID_HOME/ndk/$(ls -1 $ANDROID_HOME/ndk)"After adding these, restart your terminal or run source ~/.zshrc (or ~/.bash_profile).
3. Install Android Rust compilation targets:
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android4. Run the development server:
pnpm tauri android devThe first time you run this command, Tauri will generate the Android project (in src-tauri/gen/android/). The command will start the dev server and launch an Android emulator.
See the Quick Command Reference below for additional platform commands.
# Development
pnpm tauri dev # macOS desktop
pnpm tauri ios dev # iOS
pnpm tauri ios dev --open # iOS with Xcode
pnpm tauri android dev # Starts dev server + Android emulator
pnpm tauri android dev --open # Also opens Android Studio
# Building
pnpm tauri build # macOS
pnpm tauri ios build # iOS
pnpm tauri android build # Android
# Installing packages
pnpm add <package-name> # Add dependency
pnpm add -D <package-name> # Add dev dependency
pnpm install # Install all dependencies- Always use pnpm in this project (not npm) to avoid conflicts
- The pnpm-lock.yaml file should be committed to git (like package-lock.json)
- If you see commands in docs using npm, just replace with pnpm:
- npm install → pnpm install
- npm add → pnpm add
- npm run → pnpm (you can skip "run")
This template uses Tauri 2.x, enabling true cross-platform development from a single codebase. The Rust backend lets you write your application once and run it everywhere.
The same React components render on both platforms, automatically adapting to the available screen real estate. We use standard web responsive design techniques to adapt the UI across platforms:
- CSS media queries for screen size adaptations
- Flexbox and CSS Grid for flexible layouts
- Mobile-first design principles
- Viewport units (vh, vw) for proportional sizing
All development happens in the main project directory:
- Frontend:
src/contains our React + TypeScript UI components - Backend:
src-tauri/src/contains Rust code for system-level operations - Configuration:
src-tauri/tauri.conf.jsondefines app-wide settings - iOS project: Auto-generated in
src-tauri/gen/ios/on first run ofpnpm tauri ios dev - Android project: Auto-generated in
src-tauri/gen/android/on first run ofpnpm tauri android dev
- Write code in your main project (src/ and src-tauri/src/).
- Don't edit code in Xcode/Android Studio - they're just viewers.
- Always use the CLI to run - don't build directly from Xcode/Android Studio without the dev server running.
Assets work identically across all platforms (macOS, iOS, Android) in Tauri. There are three types:
- Code Assets (
src/assets/): Import directly in React components. Vite processes and optimizes these during build.
import logo from "./assets/logo.svg";
<img src={logo} />- Static Assets (public/): Reference with absolute paths starting with /. These are copied as-is without processing.
<img src="/icon.png" />- App Icons (src-tauri/icons/): Platform-specific icons for home screen/dock. Generate all sizes from one source:
pnpm tauri icon path/to/icon.pngAll runtime assets (images, fonts, videos) are bundled by Vite into dist/, then packaged into each platform's app. No platform-specific asset handling is needed - your React code and file structure remain identical across all targets.
This project uses a semantic color system with prefixed tokens instead of traditional named colors. Colors are organized into four categories:
tx-Text colors (primary, secondary, tertiary, disabled, brand)bg-Background colors (base, card, hover, pressed, button, brand)ic-Icon colors (same structure as text)bd-Border colors (base, primary, hover, pressed, brand)
Primitive Colors (in src/index.css):
- Base color values like
--dark-800,--light-100,--brand - Change these to customize your entire color scheme
Semantic Mappings (in tailwind.config.ts):
- Reference primitives with consistent opacity levels
- Provide meaningful names like
text-tx-primary,bg-bg-card
We use shadcn/ui for our component library. Unlike traditional component libraries, shadcn/ui copies components directly into your codebase rather than installing them as dependencies. It's built on top of Radix UI (unstyled, accessible primitives) and styled with Tailwind CSS, giving you full ownership and customization control. When you run pnpx shadcn@latest add button, it downloads the component source code into src/components/ui/, which you can then modify freely.
When installing new shadcn/ui components, you'll need to migrate their color tokens to our semantic system. See ./SHADCN_MIGRATION_GUIDE.md for:
- Complete mapping table (shadcn → semantic)
- Step-by-step migration protocol
- Edge case handling rules
- Examples and testing checklist