tauri-app-template Svelte Themes

Tauri App Template

Minimal Tauri 2 + Svelte 5 app template with theming, i18n, and CI/CD

▲ Tauri App Template

A minimal, production-ready template for cross-platform desktop apps


✨ Features

  • ⚡ Fast by default — Svelte 5 compiles to vanilla JS (no virtual DOM), Rust backend, UnoCSS generates only used styles
  • 🎨 Theming — Light / Dark / System modes with CSS variables, zero flicker on load
  • 🌍 i18n — Built-in EN/RU localization, trivial to add more languages
  • 🗂 Routing — Lightweight client-side router, no SvelteKit overhead
  • 🖥 Custom titlebar — Frameless window with native-feeling controls
  • 📌 System tray — Show/hide window, quit — works on all desktop platforms
  • 💾 Persistent settings — Theme and language saved via plugin-store
  • 🔧 CI/CD ready — GitHub Actions: lint on PR, release builds on tag push

📦 Stack

Layer Technology
Runtime Tauri 2
Backend Rust
Frontend Svelte 5 + TypeScript
Styles UnoCSS
State Svelte stores
Persistence @tauri-apps/plugin-store
Build Vite

🖥 Platform Support

Platform Status
Windows ✅ Full
macOS ✅ Full (Intel + Apple Silicon)
Linux ✅ Full
Android 🔜 Planned
iOS 🔜 Planned

🚀 Getting Started

Prerequisites

Setup

# 1. Clone the template
git clone https://github.com/arelove/tauri-app-template
cd tauri-app-template

# 2. Install JS dependencies
npm install

# 3. Start dev server
npm run tauri dev

Build for production

npm run tauri build

Binaries will be in src-tauri/target/release/bundle/.

📁 Project Structure

tauri-app-template/
├── src/                        # Svelte frontend
│   ├── lib/
│   │   ├── components/         # Reusable UI components
│   │   └── stores/             # theme, locale, router
│   ├── routes/                 # Pages: Home, Settings, About
│   ├── App.svelte              # Root component
│   ├── app.css                 # Design tokens + global styles
│   └── main.ts                 # Entry point
├── src-tauri/
│   ├── src/
│   │   ├── lib.rs              # App setup, plugin registration
│   │   ├── commands.rs         # Custom Rust commands
│   │   └── tray.rs             # System tray
│   ├── capabilities/           # Tauri permission scopes
│   └── tauri.conf.json         # App config
├── .github/
│   ├── workflows/
│   │   ├── ci.yml              # Lint + type check on every PR
│   │   └── release.yml         # Build binaries on tag push
│   └── ISSUE_TEMPLATE/
└── uno.config.ts               # UnoCSS design system

🎨 Customization

Add a new page

  1. Create src/routes/MyPage.svelte
  2. Add the route to src/lib/stores/router.ts
  3. Add a nav item to src/lib/components/Sidebar.svelte
  4. Add translation keys to src/lib/stores/locale.ts

Add a Rust command

  1. Add your function to src-tauri/src/commands.rs:
    #[tauri::command]
    pub async fn my_command(input: String) -> Result<String, String> {
     Ok(format!("Hello, {input}!"))
    }
    
  2. Register it in src-tauri/src/lib.rs:
    .invoke_handler(tauri::generate_handler![commands::my_command])
    
  3. Call it from Svelte:
    import { invoke } from "@tauri-apps/api/core";
    const result = await invoke<string>("my_command", { input: "world" });
    

Add a language

Add your locale to src/lib/stores/locale.ts:

export type Locale = "en" | "ru" | "de"; // add your locale
const translations = {
  de: { "nav.home": "Startseite", ... }
}

🔖 Releases

Releases are fully automated. Push a version tag:

git tag v1.0.0
git push origin v1.0.0

GitHub Actions will build installers for Windows, macOS (Intel + ARM), and Linux, then create a draft release.

🤝 Contributing

See CONTRIBUTING.md.

📄 License

MIT © arelove

Top categories

Loading Svelte Themes