A modern, production-ready boilerplate for building cross-platform desktop applications with Tauri, SvelteKit, and Tailwind CSS.
โโโ frontend/ # SvelteKit application
โ โโโ src/
โ โ โโโ routes/ # SvelteKit routes
โ โ โโโ lib/ # Shared utilities
โ โ โโโ components/ # Reusable components
โ โโโ static/ # Static assets
โ โโโ package.json
โโโ backend/ # Tauri application
โ โโโ src/
โ โ โโโ main.rs # Rust commands and logic
โ โโโ Cargo.toml
โ โโโ tauri.conf.json # Tauri configuration
โโโ dev.bat # Development script
Clone the repository
git clone https://github.com/Kamionn/tauri-sveltekit-tailwind-boilerplate
cd tauri-sveltekit-boilerplate
Install frontend dependencies
cd frontend
npm install
Install Tauri CLI (if not already installed)
npm install -g @tauri-apps/cli
Using the dev script (recommended):
dev.bat
Or manually:
# Terminal 1 - Start frontend dev server
cd frontend
npm run dev
# Terminal 2 - Start Tauri app
cd backend
cargo tauri dev
cd backend
cargo tauri build
The built application will be available in backend/target/release/bundle/
.
Frontend (frontend/
directory):
npm run dev
- Start development servernpm run build
- Build for productionnpm run preview
- Preview production buildBackend (backend/
directory):
cargo tauri dev
- Start development with hot reloadcargo tauri build
- Build production executableThe boilerplate includes a comprehensive test suite accessible at /test
route:
The following Tauri commands are available from the frontend:
import { invoke } from '@tauri-apps/api/core';
// Get system information
const systemInfo = await invoke('get_system_info');
// Perform basic operations
const result = await invoke('test_basic_operation');
// Math operations
const sum = await invoke('test_math_operation', { a: 5, b: 3 });
// File operations
const fileResult = await invoke('test_file_operations');
// JSON parsing
const parsed = await invoke('test_json_parsing', { jsonStr: '{"key": "value"}' });
Modify frontend/tailwind.config.js
to customize your design system:
theme: {
extend: {
colors: {
primary: {
50: '#eff6ff',
500: '#3b82f6',
600: '#2563eb',
700: '#1d4ed8'
}
}
}
}
Edit backend/tauri.conf.json
to:
.msi
installer.exe
executable.dmg
disk image.app
application bundle.deb
package.AppImage
portable appgit checkout -b feature/amazing-feature
)git commit -m 'Add amazing feature'
)git push origin feature/amazing-feature
)This project is licensed under the MIT License - see the LICENSE file for details.
Ready to build amazing desktop applications! ๐