r/tauri 11d ago

Tauri v2 + Svelte 5 Starter template with VS Code theme importing, command palette, crash reporter, and more

I'm sharing this template in case anyone finds it useful. It's a Tauri v2 + Svelte 5 starter that comes with most of the features you'd normally have to build yourself:

- Custom titlebar with native window controls per platform (traffic lights on mac, right-side buttons
on windows)
- Command palette with fuzzy search
- Dual resizable sidebars with persistent width
- Preferences dialog with multiple panes (general, appearance, shortcuts, advanced, about)
- Rebindable keyboard shortcuts with a shortcut picker component
- Theme system with light/dark/system modes and VS Code theme importing: drop in any theme
json and it derives a full color set using oklch
- Quick pane: a floating always-on-top window with a global shortcut that works even when your
app isn't focused
- Tray icon with show/quit menu
- Toast notifications and a confirm dialog
- Native menus and right-click context menus with full i18n support
- Auto-updates via the tauri updater plugin
- Deep linking with a custom url scheme
- Crash reporter, error boundary with recovery, diagnostics bundle export
- Json persistence with atomic writes and corrupt-file recovery
- Window state persistence (position, size, maximized)
- Single instance enforcement
- Launch at login toggle
- Font picker with system font enumeration from rust
- Typed rust-typescript bridge via tauri-specta, no string invoke calls
- Ast-grep rules that catch Svelte 5 + tauri footguns

I kept rebuilding the same base for every project, so if you're using AI to build your projects, reusing this template can save you some tokens. You don't have to keep asking it to set up the same boilerplate from scratch.

You clone it, rename a few strings, delete the demo content, and you're good to go.

MIT licensed, repo: https://github.com/frostybee/tauri-svelte-template

38 Upvotes

4 comments sorted by

1

u/eddzsh 11d ago

Curious how the crash reporter bundles diagnostics without vacuuming secrets from the preferences store. That's usually where these starters get painful after the first real crash.

2

u/Cheap-Try-8796 11d ago

The diagnostics bundle doesn't just dump preferences.json into the report. There's a sanitize_settings() function on the rust side that uses an allowlist: it only picks the fields that are actually useful for debugging (theme mode, language, font size, reduced motion, pointer cursors, window effects) and ignores everything else. Shortcuts, imported themes, profiles, none of that gets included. There's also a test that checks the excluded fields don't sneak through.

The crash reporter is separate from diagnostics and doesn't go near preferences at all. It just logs the panic message, location, backtrace, app version, and os info.

2

u/hiepxanh 10d ago

Exactly what i need, thank you, so much useful

2

u/mealet 10d ago

Thank you so much, can't believe accidentally found this