A modern desktop application template built with:
⨠Modern Stack
š ļø Developer Experience
š CI/CD Ready
Linux:
sudo apt update
sudo apt install libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
file \
libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev
macOS:
Windows:
Clone the repository:
git clone https://github.com/HONGJICAI/tauri-svelte-template.git
cd tauri-svelte-template
Install dependencies:
pnpm install
Run the development server:
pnpm tauri:dev
pnpm dev - Start Vite dev serverpnpm build - Build the frontendpnpm preview - Preview the built frontendpnpm tauri:dev - Run Tauri in development modepnpm tauri:build - Build the Tauri applicationpnpm check - Run Svelte type checkingpnpm lint - Run Biome linterpnpm lint:fix - Run Biome linter and fix issuespnpm format - Format code with Biometauri-svelte-template/
āāā .github/
ā āāā workflows/ # GitHub Actions workflows
āāā .husky/ # Husky git hooks
āāā src/ # SvelteKit source files
ā āāā routes/ # SvelteKit file-based routes
ā ā āāā +layout.svelte # Root layout
ā ā āāā +layout.ts # Layout config (prerender, ssr)
ā ā āāā +page.svelte # Home page
ā āāā lib/ # Reusable components and utilities
ā āāā app.html # HTML template
ā āāā app.css # Global styles with Tailwind
āāā src-tauri/ # Tauri (Rust) source files
ā āāā src/
ā ā āāā main.rs # Tauri entry point
ā ā āāā lib.rs # Library code
ā āāā icons/ # Application icons
ā āāā Cargo.toml # Rust dependencies
ā āāā tauri.conf.json # Tauri configuration
āāā static/ # Static assets
āāā package.json # Node dependencies and scripts
āāā pnpm-workspace.yaml # pnpm workspace configuration
āāā biome.json # Biome configuration
āāā svelte.config.js # SvelteKit configuration
āāā tsconfig.json # TypeScript configuration
āāā vite.config.ts # Vite configuration
Build the application for your current platform:
pnpm tauri:build
The built application will be in src-tauri/target/release/bundle/.
Tailwind CSS 4 is integrated via the Vite plugin. Customize styles in src/app.css using the @import "tailwindcss" syntax.
Modify linting and formatting rules in biome.json.
Configure the application in src-tauri/tauri.conf.json:
Two GitHub Actions workflows are included:
CI (.github/workflows/ci.yml):
Release (.github/workflows/release.yml):
v1.0.0)This template is open source and available under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.