This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a Tauri Desktop Application Template that provides a modern, cross-platform foundation for building desktop applications using web technologies. It combines the power of Rust (backend) with React + TypeScript (frontend) to create performant native applications.
- Cross-platform: Windows, macOS, and Linux support
- Modern Stack: Tauri 2.0 + React 18.3 + TypeScript 5.6
- Production-ready: Includes CI/CD, testing setup, and documentation
- Customizable: Modular architecture for easy adaptation
npm run tauri dev- Start development mode (React + Tauri desktop app)npm run tauri build- Build production desktop applicationnpm run dev- Start Vite dev server only (for frontend-only development)npm run build- Build frontend for production (TypeScript + Vite)
npm run docker:menu- Open interactive Docker build menunpm run docker:build-image- Build Docker image for native architecturenpm run docker:build-tauri- Build Tauri app in Dockernpm run docker:build-all- Build on host + all Docker architecturesnpm run docker:run- Start interactive Docker shellnpm run docker:clean- Clean build artifactsnpm run docker:check- Check Docker image statusnpm run docker:help- Show Docker script help
npm run lint:css- Lint and fix SCSS files (development mode, shows all warnings)npm run lint:css:production- Lint SCSS for CI/CD (clean output, no warnings)npm run lint:css:ci- Lint SCSS with compact formatter for CI
npm test- Run test suite (configure based on your testing framework)npm run test:watch- Run tests in watch modenpm run test:coverage- Generate coverage report
This template provides a foundation for building desktop applications with a clear separation between frontend and backend concerns.
- Frontend: React 18.3 + TypeScript 5.6 + Blueprint.js 6.0 + SCSS
- Backend: Tauri 2.0 + Rust + Tokio (async runtime)
- Build: Vite 6.0 + Git hooks (Husky + lint-staged)
- CI/CD: GitHub Actions for automated builds and releases
your-app/
├── src/ # Frontend React application
│ ├── components/ # React components
│ ├── hooks/ # Custom React hooks
│ ├── styles/ # SCSS design system
│ ├── assets/ # Static assets
│ ├── App.tsx # Main application component
│ └── main.tsx # React entry point
├── src-tauri/ # Backend Rust application
│ ├── src/ # Rust source code
│ │ ├── commands/ # Tauri commands
│ │ ├── modules/ # Feature modules
│ │ ├── utils/ # Utilities
│ │ ├── lib.rs # Library entry
│ │ └── main.rs # Application entry
│ ├── capabilities/ # Permission configs
│ ├── icons/ # App icons
│ └── tauri.conf.json # Tauri configuration
├── docs/ # Documentation
│ ├── TODO-INDEX.md # Task tracking
│ ├── DEVELOPMENT_PLAN.md # Project roadmap
│ └── README.md # Documentation overview
├── .github/ # GitHub Actions workflows
├── scripts/ # Build and utility scripts
└── docker/ # Docker configurations
- Uses Tauri's IPC system via
@tauri-apps/api/core - Define commands in
src-tauri/src/lib.rs - Call from frontend using the
invokefunction - Async operations handled with Rust's Tokio runtime
-
Clone and Initialize
git clone [template-repo] my-app cd my-app npm install -
Customize Configuration
- Update
package.jsonwith your app details - Modify
src-tauri/tauri.conf.jsonfor app metadata - Replace icons in
src-tauri/icons/
- Update
-
Plan Your Features
- Review
/docs/DEVELOPMENT_PLAN.md - Update with your specific requirements
- Define your module architecture
- Review
-
Track Development
- Use
/docs/TODO-INDEX.mdfor task management - Update session progress regularly
- Keep documentation current
- Use
- Start Session: Check
/docs/TODO-INDEX.md - Run Development:
npm run tauri dev - Make Changes: Follow the architecture patterns
- Test: Run tests before committing
- Update Progress: Mark tasks complete
# Feature development
git checkout -b feature/your-feature
git add .
git commit -m "feat: add your feature"
git push origin feature/your-feature
# Create pull request for review- Central hub for tracking development tasks
- Session progress tracking
- Priority-based task organization
- Quick reference commands
- Development phases and timelines
- Module architecture design
- Technology decisions
- Performance requirements
- Overview of all documentation
- Quick start guides
- Documentation guidelines
- External resources
-
Plan the Module
- Define in
/docs/DEVELOPMENT_PLAN.md - Create module structure in
src-tauri/src/modules/ - Design frontend components
- Define in
-
Implement Backend
// src-tauri/src/modules/your_module/mod.rs pub mod commands; pub mod state; pub mod utils;
-
Create Tauri Commands
#[tauri::command] pub async fn your_command() -> Result<String, String> { Ok("Response".to_string()) }
-
Build Frontend
- Create components in
src/components/ - Add styles in
src/styles/components/ - Wire up IPC calls
- Create components in
The template includes a comprehensive SCSS design system:
// Use design tokens
.your-component {
background: color(slate, 800);
padding: spacing(4);
border-radius: radius(md);
@include shadow(lg);
}# Build for current platform
npm run tauri build
# Cross-platform builds via Docker
npm run docker:menu- Startup Time: Target < 2 seconds
- Memory Usage: Keep under 100MB baseline
- Bundle Size: Optimize for < 10MB installer
- Response Time: UI interactions < 100ms
- Use Tauri's capability system for permissions
- Validate all IPC inputs
- Implement CSP headers
- Keep dependencies updated
- Follow Rust safety guidelines
- Replace icons in
src-tauri/icons/ - Update colors in
src/styles/abstracts/_colors.scss - Modify app metadata in
tauri.conf.json
- Add modules to
src-tauri/src/modules/ - Create corresponding frontend components
- Define new IPC commands
- Update documentation
- Configure GitHub Actions workflows
- Set up code signing certificates
- Define update server endpoints
- Create distribution strategy
- Keep modules focused and single-purpose
- Use TypeScript strictly (no
anytypes) - Follow Rust idioms and patterns
- Maintain clear separation of concerns
- Update docs with code changes
- Use meaningful commit messages
- Comment complex logic
- Keep README files current
- Write tests for critical paths
- Mock external dependencies
- Test on all target platforms
- Maintain good coverage
- Profile before optimizing
- Use React.memo wisely
- Implement virtual scrolling for lists
- Lazy load heavy components
- Tauri Documentation
- React Documentation
- Blueprint.js Components
- Template issues on GitHub
- Platform-specific bugs: Check Tauri GitHub issues
- Build failures: Verify Rust toolchain installation
- Performance issues: Use browser DevTools profiler
- Styling conflicts: Check Blueprint.js specificity
This template is designed to accelerate your desktop app development. Customize it to fit your needs and build something amazing!