A production-ready template for building modern desktop applications with Tauri v2, React 19, and TypeScript. This template provides a solid foundation with best practices, comprehensive documentation, and quality tooling built-in.
- Modern Stack: Tauri v2 + React 19 + TypeScript + Vite
- UI Components: shadcn/ui v4 + Tailwind CSS v4 + Lucide React
- State Management: Zustand v5 + TanStack Query v5
- Testing: Vitest v3 + Testing Library
- Quality Tools: ESLint + Prettier + Rust clippy + comprehensive CI
- Native Integration: Menu system + keyboard shortcuts + notifications + auto-updater
- Documentation: Comprehensive developer and user guides
- AI-Ready: Claude Code agents and documentation structure
Centralized command palette with keyboard shortcuts and menu integration:
// Execute commands via palette (Cmd+K), shortcuts, or menus
const commands = [
{ id: 'preferences', label: 'Open Preferences', shortcut: 'Cmd+,' },
{ id: 'toggle-sidebar', label: 'Toggle Sidebar', shortcut: 'Cmd+1' },
]
Layered state management approach:
- useState: Component-local state
- Zustand: App-wide UI state (sidebar visibility, themes)
- TanStack Query: Server state and caching (preferences, data)
// β
Use getState() to avoid render cascades
const handleAction = useCallback(() => {
const { data, setData } = useStore.getState()
setData(newData)
}, []) // Stable callback
- User Guide - End-user documentation
- Developer Docs - Architecture, patterns, and guides
- Testing Guide - Testing strategies and utilities
- Claude Agents - AI development assistants
- Node.js (v18+)
- Rust (latest stable)
- Platform-specific dependencies (see Tauri Prerequisites)
# Clone and install
git clone <your-repo>
cd tauri-template
npm install
# Start development server
npm run dev
# Run tests and quality checks
npm run check:all
# Build for production
npm run build
βββ src/ # React frontend
β βββ components/ # UI components
β βββ hooks/ # Custom hooks
β βββ store/ # Zustand stores
β βββ services/ # API and external services
βββ src-tauri/ # Rust backend
βββ docs/ # Documentation
β βββ developer/ # Developer guides
β βββ userguide/ # User documentation
βββ .claude/agents/ # AI development assistants
This template includes comprehensive quality gates:
npm run check:all # Runs all checks below:
- β TypeScript type checking
- β ESLint code linting
- β Prettier code formatting
- β Rust formatting (cargo fmt)
- β Rust linting (cargo clippy)
- β React component tests
- β Rust unit tests
- Native menus with keyboard shortcuts
- System notifications and tray integration
- Auto-updater with GitHub releases
- File system access with security validation
- Cross-platform builds (macOS, Windows, Linux)
- Hot reload in development
- Comprehensive testing setup
- Type-safe Rust β React communication
- CLI tools for common tasks
- AI assistants for code generation and review
- Security best practices built-in
- Error handling and logging
- Performance optimization patterns
- CI/CD workflows included
- Documentation for maintenance
- Commands: Add to
src/lib/commands/
- UI State: Extend Zustand stores in
src/store/
- Rust APIs: Add Tauri commands in
src-tauri/src/lib.rs
- Documentation: Update relevant docs in
docs/
- App metadata:
src-tauri/tauri.conf.json
- Build settings:
src-tauri/Cargo.toml
- Dependencies:
package.json
Before deploying your application to production, ensure you complete these critical steps:
- Generate proper Ed25519 updater keys - Replace placeholder keys in
src-tauri/tauri.conf.json
- Store private keys securely - Never commit signing keys to version control
- Review plugin permissions - Remove unused permissions in
src-tauri/capabilities/desktop.json
- Update app metadata - Change productName, version, identifier, publisher in
tauri.conf.json
- Update package.json - Set correct name, author, license, and copyright
- Configure proper logging - Set production log levels (Info, not Debug)
- Set up error tracking - Add Sentry, Rollbar, or similar service
- Run full test suite -
npm run check:all
must pass - Test on all target platforms - macOS, Windows, Linux as needed
- Verify auto-updater flow - Test with signed releases
- Performance testing - Ensure app performs well with real data
- Code signing certificates - Set up proper certificates for each platform
- Release automation - Configure CI/CD for automated builds and releases
- Update server setup - Configure server for hosting app updates
- Analytics setup - Add usage analytics if desired
π For detailed security instructions, see SECURITY_PRODUCTION.md
This project is licensed under the AGPL-3.0-or-later license.
Please read CONTRIBUTING.md for contribution guidelines.
For security concerns, please see SECURITY.md.
- VS Code + Tauri + rust-analyzer
- Cursor with the included
.claude/agents/
for AI-assisted development