Skip to content

A modern cross-platform desktop application starter template built with Tauri 2, Nuxt 4, shadcn-vue, and Tailwind CSS 4.

License

Notifications You must be signed in to change notification settings

sheldonix/tauri-nuxt-template

Repository files navigation

Tauri Nuxt Template

A modern cross-platform desktop application starter template

Tauri Nuxt Vue shadcn-vue Tailwind CSS License

Overview

This template provides a solid foundation for building modern cross-platform desktop applications with Tauri 2, Nuxt 4, shadcn-vue, and Tailwind CSS 4.

Features

  • Rust - Fast, memory-safe, and type-safe systems programming language
  • Tauri 2 - Build tiny, fast binaries for all major desktop platforms
  • Nuxt 4 - The latest Vue 3 framework with auto-imports and file-based routing
  • shadcn-vue - Beautifully designed components built on Reka UI primitives
  • Tailwind CSS 4 - Utility-first CSS with the latest v4 features
  • Theme Switcher - Dark/light theme toggle with localStorage persistence

Getting Started

Prerequisites

  • Node.js >= 20.19.0
  • Rust (latest stable)

Create Project

Use npx with tpull to scaffold a new project:

npx -y tpull@latest sheldonix/tauri-nuxt-template@latest my-tauri-app

Other ways to use this template:

  • Click the "Use this template" button on GitHub to create your own repository.
  • Alternatively, clone manually:
git clone https://github.com/sheldonix/tauri-nuxt-template.git my-tauri-app
cd my-tauri-app

# Install dependencies
pnpm install

# Start development
pnpm tauri dev

Building

pnpm generate     # Build static site to ./dist
pnpm tauri build  # Build desktop app for current platform

The built application will be in src-tauri/target/release/bundle/.

Adding UI Components

This template includes Button, Card, Input, Dialog, and Label components by default. Add more shadcn-vue components:

pnpm dlx shadcn-vue@latest add [component-name]

Available components: shadcn-vue.com/docs/components

Tauri Commands

Tauri commands are defined in src-tauri/src/lib.rs and can be called from the frontend:

// Rust backend (src-tauri/src/lib.rs)
#[tauri::command]
fn greet(name: &str) -> String {
    format!("Hello, {}!", name)
}
// Vue frontend
import { invoke } from '@tauri-apps/api/core'

const result = await invoke<string>('greet', { name: 'World' })

Learn more: Calling Rust from the Frontend

Folder Structure

.
├── app/                 # Nuxt application directory
│   ├── assets/          # Global styles and Tailwind CSS config
│   ├── components/      # Vue components
│   ├── lib/             # Utility functions
│   ├── layouts/         # Nuxt layouts
│   └── pages/           # Route pages
├── src-tauri/           # Tauri Rust backend
├── icons/               # Application icons
└── public/              # Static assets

Links

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

See CONTRIBUTING.md for guidelines.

GitHub

License

MIT - feel free to use this template for your own projects.

About

A modern cross-platform desktop application starter template built with Tauri 2, Nuxt 4, shadcn-vue, and Tailwind CSS 4.

Topics

Resources

License

Contributing

Stars

Watchers

Forks