tauri-svelte-boilerplate Svelte Themes

Tauri Svelte Boilerplate

Opiniated boilderplate for spinning up a Tauri desktop app with Svelte

Tauri + SvelteKit + TypeScript

Desktop app boilerplate using Tauri v2, SvelteKit, Svelte 5, TypeScript, and Vite. Use it as a starting point, then run the setup scripts to turn it into your own project.

Prerequisites

  • Node.js (LTS recommended) and npm
  • Rust and a working Cargo toolchain (install Rust)
  • Git
  • Platform packages for Tauri as needed (prerequisites)

Bootstrap a new project from this repo

  1. Clone this repository (or use it as a GitHub template), then open a terminal at the repository root (where package.json lives).

  2. Run one of the setup scripts (pick your shell):

    Windows (PowerShell)

    .\setup.ps1
    

    macOS / Linux / Git Bash

    chmod +x setup   # first time only
    ./setup
    
  3. The script will:

    • Ask for a project name and set the name field in package.json.
    • Optionally rename the project folder on disk to match that name (only if the name is valid as a single directory name).
    • Remove the existing .git directory (typical after cloning).
    • Run npm install (updates package-lock.json when needed).
    • git init, stage all files, and create an initial commit.
    • Your first commit needs Git user.name and user.email configured; configure them if Git reports an error.
  4. Start developing:

    npm run tauri dev
    

Useful commands

Command Purpose
npm run dev SvelteKit dev server (web only)
npm run tauri dev Run the desktop app with hot reload
npm run tauri build Build the desktop app
npm run check Type-check the frontend
npm run build Production web build into build/

Rust checks: from src-tauri/, cargo check (or rely on tauri dev / tauri build).

Cursor with extensions that match this stack: Svelte, Tauri, and rust-analyzer.

Agent / contributor note

For architecture and conventions (core layout, Tauri config, UI wiring), see docs/references/desktop-tauri-svelte-boilerplate-agent-prompt.md.

Top categories

Loading Svelte Themes