SvelteStarter

tauri-sveltekit — Svelte Starter Template

By Stijn-B

A desktop application starter template based on Tauri 2 and SvelteKit, using a static adapter to bundle the SvelteKit frontend into Tauri's WebView, with configuration, CSP, and CI notes.

Explore the design

Compare the page layouts and mobile experience. Open any screenshot for a closer look.

1 previews
Author preview
Author-provided preview

Preview provided in the project README.

One original preview is available. Open the full image to inspect the design.

Screenshots show visual appearance; interactive behavior may differ.

Recorded 2026-10-10View source

What stands out

A quick read of the recorded project description.

01

Builds a single-page frontend using the SvelteKit static adapter, loaded by the Tauri WebView

02

Separate CSP policies for development and packaging; the development environment additionally allows the local Vite WebSocket

03

Centralizes application identifier, product name, version, and window title in tauri.conf.json

04

Provides check commands such as npm run check, lint, sveltekit:build, and cargo fmt/clippy/test

05

CI audits dependencies and runs frontend checks and native packaging verification on Linux, macOS, and Windows

06

Includes TUTORIAL.md explaining how to manually set up the same Tauri 2 and SvelteKit combination

Template Details

This is a minimal starter template that combines a SvelteKit frontend with a Tauri desktop shell. SvelteKit is built as a static single-page application via @sveltejs/adapter-static, and Tauri's WebView directly loads the prebuilt files, so the runtime does not include a SvelteKit server; SSR and server endpoints are unavailable. The repository provides development and build scripts, placeholder configuration for the application identifier and product information that must be replaced, and an icon replacement command. The README also explains the CSP policies for packaged applications and the development environment, the minimum compatibility requirements for WebView on each platform, and the scope of checks and packaging covered by CI.

SvelteStarter

Is it right for your project?

Use Cases

  • Starting a new project with SvelteKit as the frontend and Tauri as the desktop shell
  • Converting an existing SvelteKit project into a desktop application
  • Adding a SvelteKit frontend to an existing Tauri project
  • Desktop projects that need to reference the differences in CSP configuration between packaged applications and the development environment

Suitable For

  • Developers familiar with SvelteKit and frontend build processes
  • Developers who can install Rust and a supported Node.js version according to Tauri prerequisites
  • Projects that need a static desktop frontend and do not rely on a runtime server
  • Individuals or teams who wish to use and modify the template code under the MIT license

Getting started & customization

Use these recorded setup notes alongside the repository instructions for your chosen version.

  1. 1

    Create a repository using GitHub's Use this template, clone it, and install Tauri prerequisites, including Rust and a supported Node.js version

  2. 2

    Run npm ci to install dependencies; the repository's Node and Rust toolchain versions are recorded in .nvmrc and rust-toolchain.toml

  3. 3

    Before distribution, replace the identifier, productName, version, and window title in src-tauri/tauri.conf.json, and synchronize the metadata in package.json and src-tauri/Cargo.toml

  4. 4

    Replace the launcher icon with npm run tauri -- icon path/to/your-icon.png

  5. 5

    The desktop development server uses port 5173 and will fail to start if the port is occupied; frontend-only development can use npm run sveltekit:dev, but that mode does not provide Tauri native APIs

Read repository instructions

License & source material

Usage conditions & limitations

Free to use · keep license notice

This entry covers the free version under the MIT license in the public repository; the free scope is the code of this version and does not mean that external services or third-party assets are free.

Must comply with when using

  • Free use, modification, commercial use, and distribution of this version's code are permitted.
  • When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
  • The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.

Additional costs & items to verify

  • Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses and cannot be judged solely by the code's MIT license.
  • External services such as domains, hosting, databases, payments, or AI may incur additional charges.
  • In SPA mode, server-dependent features such as server-side rendering (SSR) and server endpoints are unavailable at runtime because Tauri directly loads prebuilt static files.
  • Frontend-only development mode (npm run sveltekit:dev and npm run preview) does not provide Tauri native APIs and cannot call desktop capabilities.
  • The desktop development server uses a fixed port 5173 and will fail to start if that port is already occupied.
  • The default CSP of the packaged application blocks remote scripts and frontend network requests; when adding remote APIs or resources, the corresponding sources must be manually added to the CSP directives.
  • CI only verifies compilation and packaging; it does not launch the application and does not cover signing, notarization, Windows MSI installers, or macOS DMG images.
  • CI does not cover Intel macOS, Windows ARM, Linux ARM, or mobile target platforms.
  • macOS requires version 13.3 or later to provide system WebKit equivalent to Safari 16.4.
  • Windows requires Windows 10/11 with WebView2 version 111 or later and must keep the Evergreen runtime updated.
  • Linux requires WebKitGTK with Web platform support equivalent to or newer than Safari 16.4 and must keep the distribution's WebKitGTK package updated.
  • Before distributing your own application, the placeholder identifier must be replaced with a unique reverse-domain identifier.
View Original Text Basis

Permission is hereby granted, free of charge

Original License Text

In SPA mode, SvelteKit features that require a server, such as server-side rendering (SSR) and server endpoints, are not available at runtime.

Original README

These browser modes do not provide Tauri native APIs.

Original README

The desktop development server uses port 5173 and fails if it is already occupied.

Original README

remote scripts and frontend network requests are blocked by default

Original README

These checks validate compilation and packaging; they do not launch the app or cover signing, notarization, Windows MSI installers, or macOS DMG images.

Original README

CI does not cover Intel macOS, Windows ARM, Linux ARM, or mobile targets.

Original README

macOS 13.3 or newer, which provides Safari 16.4-equivalent system WebKit

Original README

Windows 10/11 with WebView2 111 or newer; keep the Evergreen runtime updated

Original README

WebKitGTK with Safari 16.4-equivalent or newer web-platform support; keep the distribution's WebKitGTK packages updated

Original README

replace its identifier with a unique reverse-domain name

Original README
https://github.com/Stijn-B/tauri-sveltekit/blob/main/LICENSEhttps://github.com/Stijn-B/tauri-sveltekit/blob/main/README.md

Compiled by DeepSeek based on repository license and README ·2026-10-10. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.

Project checks & description sources

Template Information

Source platforms
GitHub
Documentation and maintenance reference score
More documented · 79 / 100
Technologies
Svelte
Website type
Starter
How this score is calculated

Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.

What to verify for this project

Repository update recorded
2026-10-10
Screenshot last checked
2026-10-10

No demo link is recorded. Use the repository instructions to evaluate the project locally; the screenshot alone cannot establish interactive behavior.

The catalog identifies Svelte as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.

Use a selection guide →

How this description was prepared

AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.

Review declaration: [email protected] · 2026-10-11

Inspect the recorded source material

SHA-256: 05dfc5462af0b2607500c650b00190586ad7cfd2503d663f9caf2ae6821313d8

2026-10-10T15:57:52.480Z

Source file / repository
![Tauri x SvelteKit Banner](/readme_assets/banner.png)

# Tauri x SvelteKit

1. [Getting Started](#getting-started)
2. [How it Works](#how-it-works)
3. [About the Frameworks](#about-the-frameworks)
4. [Desktop Apps with SvelteKit and Tauri - Step-by-Step Tutorial](#desktop-apps-with-sveltekit-and-tauri---step-by-step-tutorial)

## Getting Started

Use GitHub's **Use this template** button to create your own repository, then clone it
and open a terminal in the project directory.

Install the current [Tauri prerequisites](https://v2.tauri.app/start/prerequisites/), including
Rust and a supported Node.js release (22.17 or newer within Node 22, or Node 24+). The
repository's recommended Node and Rust toolchains are recorded in `.nvmrc` and
`rust-toolchain.toml`.

**Install the packages**

```shell
npm ci
```

**Customize your application**

The starter runs with its placeholder settings. Before distributing your own app,
replace its identifier with a unique reverse-domain name (e.g. `com.example.my-tauri-app`).
It may contain alphanumeric characters (A–Z, a–z, and 0–9), hyphens (-), and periods (.).

Set your application identifier in `src-tauri/tauri.conf.json`:

```json
{
	"identifier": "com.example.my-tauri-app"
}
```

Also customize `productName`, `version`, and the window title in that file, the name
and version in `package.json`, and the package metadata in `src-tauri/Cargo.toml`.
Replace the starter icons with `npm run tauri -- icon path/to/your-icon.png`.

**Run the Tauri app**

For development, run the following command:

```shell
npm run dev
```

**Build the Tauri app**

For building the app into a distributable package, run the following command:

```shell
npm run build
```

**The initial app should look like this:**

![Screenshot of the Tauri app](/readme_assets/application-screenshot.png)

For frontend-only development, use `npm run sveltekit:dev`; `npm run preview` serves
the built frontend in a browser. These browser modes do not provide Tauri native APIs.
The desktop development server uses port 5173 and fails if it is already occupied.

Before submitting changes, run:

```shell
npm run check
npm run lint
npm run sveltekit:build
cd src-tauri
cargo fmt --check
cargo clippy --locked --all-targets --all-features -- -D warnings
cargo test --locked --all-targets --all-features
```

CI audits dependencies and runs frontend checks on Linux, macOS, and Windows. Native
release builds verify Linux DEB/AppImage/RPM packages, a macOS app bundle, and a Windows
NSIS installer. These checks validate compilation and packaging; they do not launch
the app or cover signing, notarization, Windows MSI installers, or macOS DMG images.

## How it works

Tauri can integrate any frontend framework that compiles to HTML, JS and CSS. SvelteKit can be configured to build a static single-page app using the [@sveltejs/adapter-static adapter](https://svelte.dev/docs/kit/adapter-static). This enables us to use Tauri with SvelteKit.

> [!IMPORTANT]  
> In SPA mode, SvelteKit features that require a server, such as server-side rendering (SSR) and server endpoints, are not available at runtime. Tauri loads the pre-built static files directly in its webview instead of running a SvelteKit server.

## Runtime requirements

Tauri uses the operating system's WebView rather than bundling a browser. This
starter's frontend targets Chromium 111 and Safari/WebKit 16.4, matching the
[Tailwind CSS compatibility requirements](https://tailwindcss.com/docs/compatibility).

| Platform | Frontend runtime requirement                                                                                            |
| -------- | ----------------------------------------------------------------------------------------------------------------------- |
| macOS    | macOS 13.3 or newer, which provides Safari 16.4-equivalent system WebKit                                                |
| Windows  | Windows 10/11 with WebView2 111 or newer; keep the Evergreen runtime updated                                            |
| Linux    | WebKitGTK with Safari 16.4-equivalent or newer web-platform support; keep the distribution's WebKitGTK packages updated |

The macOS bundle declares 13.3 as its minimum system version. Windows installers
check `minimumWebview2Version` against `111.0.0.0`. Vite's JavaScript targets are
explicit so future Vite upgrades cannot silently change this frontend baseline.

On Linux, `webkit2gtk-4.1` is the API/ABI package name, not a browser-engine version;
installing a package with that name alone does not establish frontend compatibility.
See [Tauri's WebView version guide](https://v2.tauri.app/reference/webview-versions/).

These are the starter's compatibility requirements, not a claim that every older
platform or minimum-version runtime is tested. CI builds on the current hosted
runners; test your packaged app on the oldest systems you intend to support, especially
when adding browser APIs or changing dependencies. CI does not cover Intel macOS,
Windows ARM, Linux ARM, or mobile targets.

## Content Security Policy

The packaged app uses a [Content Security Policy](https://v2.tauri.app/security/csp/)
in `src-tauri/tauri.conf.json`. It permits local frontend assets and Tauri IPC; remote
scripts and frontend network requests are blocked by default. Tauri adds hashes and
nonces for its bundled scripts and styles. Inline style attributes remain allowed for
Svelte's DOM styling and this starter's gradient.

A separate `devCsp` permits inline script/style elements and the local Vite WebSocket
on port 5173 for development and hot reload. These allowances are not part of the
packaged app's policy. Update the WebSocket sources if you change the development port.

When adding an API or remote asset, add only the required origin to the appropriate
CSP directive. Native plugin permissions are configured separately through Tauri
capabilities. Test both `npm run dev` and a packaged build after changing the policy.

## About the frameworks

[**Tauri**](https://v2.tauri.app/) is a framework for building desktop applications with a Rust backend and a web frontend. See its [security documentation](https://v2.tauri.app/security/) and [architecture guide](https://v2.tauri.app/concept/architecture/) to understand how the webview and native backend interact.

[**SvelteKit**](https://svelte.dev/docs/kit/introduction) provides routing, build tooling, and application structure for [Svelte](https://svelte.dev/docs/svelte/overview). This template uses its static adapter and client-side routing to run inside Tauri's webview.

## Desktop Apps with SvelteKit and Tauri - Step-by-Step Tutorial

The [TUTORIAL.md](/TUTORIAL.md) file contains a current Tauri 2 and SvelteKit 3 guide for manually creating the same setup. It is useful when you want to turn an existing SvelteKit project into a desktop app, or add SvelteKit to an existing Tauri project.

> [!NOTE]  
> Clone this repository to get the final result of the tutorial.

## License

This template is licensed under the [MIT License](LICENSE). You may use it for personal
and commercial projects; retain the copyright and license notice in copies or
substantial portions of the template. Your own application may use a different license.
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.

CMSaasStarter

CMSaasStarter

CMSaasStarter is an MIT-licensed SaaS starter template built with SvelteKit, TailwindCSS, DaisyUI, and Supabase, with Stripe Checkout and Stripe Portal for payments.

Svelte · Admin dashboard

sveltekit-electron

sveltekit-electron

A minimal SvelteKit + Electron starter template for cross-platform desktop applications. It provides clone, install, development, and build commands, with build targets adjustable in package.json and defaulting to Mac, Windows, and Linux.

Svelte · Starter

modernstack-saas

modernstack-saas

A SaaS starter template built with SvelteKit, Convex, Better Auth, and shadcn-svelte. It includes subscription billing via Autumn/Stripe, user and admin dashboards, user settings, organization multi-tenancy with roles and invitations, and a waitlist mode that can disable public registration.

Svelte · Admin dashboard

sveltekit-mdsvex-blog-template

sveltekit-mdsvex-blog-template

A SvelteKit and MDsveX blog starter for Markdown writing with embedded Svelte components, Tailwind CSS typography, tags, dark mode, SEO metadata, and Cloudflare Workers deployment configuration. Requires Node.js 22.12+ and pnpm 11.17.0; third-party demo assets need separate license verification.

Svelte · Portfolio

sveltekit-shadcn-blog-starter

sveltekit-shadcn-blog-starter

A SvelteKit blog starter that combines shadcn-svelte, Tailwind CSS, MDsveX, and TypeScript, offering multi-author support, tag archives, built-in search, light/dark themes, and automatic sitemap and RSS generation.

Svelte · Blog

monorepo-template

monorepo-template

A FastAPI + Svelte 5 full-stack monorepo starter with Docker, CI/CD, and OpenAPI type synchronization.

Svelte · Starter