A modern, cross-platform desktop application starter kit built with Tauri, Next.js 15+, TypeScript, and Tailwind CSS. Features native desktop integration including system tray and native menus.
- π₯οΈ Cross-platform Desktop App - Windows, macOS, and Linux support
- π¦ Rust Backend - High-performance Tauri backend
- βοΈ Next.js 15+ - Latest Next.js with React 19 and App Router
- π¨ Tailwind CSS - Modern utility-first styling framework
- π· TypeScript - Full type safety across frontend and backend
- π Hot Reload - Fast development experience
- π¦ Static Export - Optimized for desktop distribution
- π Notifications - Native system notifications with permission handling
- π Deep Links - Custom protocol handling for deep linking
- π Clipboard Manager - Advanced clipboard with history and image support
- π₯οΈ System Tray - Minimize to system tray with context menu
π‘ All features are modular! Enable only what you need to keep your app lightweight. See Feature Configuration Guide for details.
cdc-tauri-starterkit/
βββ public/ # Static assets
β βββ screenshot.png # Application screenshot
βββ scripts/ # Build and utility scripts
βββ src/ # Next.js 15+ frontend
β βββ app/ # App Router
β β βββ layout.tsx # Root layout
β β βββ page.tsx # Home page
β β βββ globals.css # Global styles
β βββ components/ # React components
β β βββ TauriDemo.tsx # Tauri integration demo
β βββ lib/ # Utilities and helpers
β βββ tauri.ts # Tauri API helpers
βββ src-tauri/ # Rust backend
β βββ src/
β β βββ main.rs # Main application
β β βββ commands.rs # Tauri commands
β β βββ menu.rs # Native menus
β β βββ tray.rs # System tray
β β βββ lib.rs # Library exports
β βββ gen/ # Generated schemas
β βββ icons/ # App and tray icons
β βββ build.rs # Build script
β βββ Cargo.toml # Rust dependencies
β βββ Cargo.lock # Rust dependency lock
β βββ tauri.conf.json # Tauri configuration
βββ IMPLEMENTATION_PLAN.md # Development roadmap
βββ SETUP_STATUS.md # Setup progress tracking
βββ TAURI_BUILD_SETUP.md # Build configuration guide
βββ next-env.d.ts # Next.js TypeScript definitions
βββ next.config.js # Next.js configuration
βββ package.json # Node.js dependencies
βββ package-lock.json # Node.js dependency lock
βββ postcss.config.js # PostCSS configuration
βββ tailwind.config.js # Tailwind configuration
βββ tsconfig.json # TypeScript configuration
- Node.js (v18 or higher)
- Rust (latest stable)
- System dependencies for Tauri development
Windows:
- Download and run the installer from rustup.rs
- Or use PowerShell:
Invoke-WebRequest -Uri https://win.rustup.rs/x86_64 -OutFile rustup-init.exe .\rustup-init.exe
- Restart your terminal after installation
macOS/Linux:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
npm install -g @tauri-apps/cli@next
-
Clone the repository
git clone <your-repo-url> cd cdc-tauri-starterkit
-
Install dependencies
npm install
-
Start development server
npm run tauri:dev
-
Choose features (optional)
# Run with specific features npm run tauri:dev -- --features clipboard,notifications # Or build with features npm run tauri:build -- --features deep-links
Windows Notes:
- Use PowerShell or Command Prompt as Administrator for best results
- If using Git Bash, some commands may need to be run in PowerShell
- Ensure Windows Defender or antivirus software isn't blocking Rust compilation
- The first build may take longer as Rust compiles dependencies
npm run tauri:dev
- Start Tauri development mode with no optional featuresnpm run tauri:dev:feat
- Start Tauri development mode with all features enablednpm run tauri:build
- Build Tauri application (append-- --features feature1,feature2
to enable features)npm run tauri:info
- Show Tauri environment informationnpm run dev
- Start Next.js development servernpm run build
- Build Next.js for production
npm run tauri:dev -- --features clipboard
- Run with clipboard feature onlynpm run tauri:dev -- --features clipboard,notifications
- Run with clipboard and notificationsnpm run tauri:build -- --features deep-links
- Build with deep-links feature only
- Left Click: Toggle window visibility
- Double Click: Show and focus window
- Right Click: Open context menu with options:
- Show Window
- Hide Window
- About
- Settings
- Quit
- File: New, Open, Save, Save As, Quit
- Edit: Undo, Redo, Cut, Copy, Paste, Select All
- View: Reload, Toggle DevTools, Zoom controls
- Window: Minimize, Hide, Close
- Help: About, Documentation
- Close Button: Hides window instead of closing (stays in tray)
- Minimize: Can minimize to tray or taskbar
- Focus: Proper window focusing and activation
This starter kit is feature-neutral by design. All optional features are disabled by default, and you choose which features to enable when running or building your application.
Development with Features:
# Run with specific features
npm run tauri:dev -- --features clipboard,notifications
# Run with all features (equivalent to the old "full" preset)
npm run tauri:dev:feat
# Run with no features (minimal build)
npm run tauri:dev
Building with Features:
# Build with specific features
npm run tauri:build -- --features clipboard,notifications
# Build with no features (minimal build)
npm run tauri:build
Advanced Cargo Usage:
# Use cargo directly for more control
cargo tauri dev --features clipboard,deep-links
cargo tauri build --features notifications
Feature | Description | Bundle Impact | Dependencies |
---|---|---|---|
notifications |
Native system notifications | ~200KB | tauri-plugin-notification |
deep-links |
Custom protocol handling | ~150KB | tauri-plugin-deep-link |
clipboard |
Advanced clipboard manager | ~800KB | tauri-plugin-clipboard-manager + image processing |
system-tray |
System tray integration | ~50KB | Built into Tauri |
# Full build - All features (equivalent to old "full" preset)
npm run tauri:dev -- --features notifications,deep-links,clipboard,system-tray
# Productivity app - Clipboard + notifications
npm run tauri:dev -- --features clipboard,notifications,system-tray
# Web integration app - Deep links + notifications
npm run tauri:dev -- --features deep-links,notifications
# Minimal app - No optional features (default)
npm run tauri:dev
Build Examples:
# Production builds with specific features
npm run tauri:build -- --features clipboard,notifications
npm run tauri:build -- --features deep-links
npm run tauri:build # minimal build
π For detailed configuration guide, see FEATURES.md
Edit src-tauri/tauri.conf.json
to customize:
- Window properties (size, position, decorations)
- System tray settings
- Security policies
- Bundle configuration
Edit next.config.js
to customize:
- Static export settings
- Asset handling
- Build optimization
- Global styles:
src/app/globals.css
- Tailwind config:
tailwind.config.js
- Component styles: Use Tailwind utility classes
- Add command function in
src-tauri/src/commands.rs
- Register command in
src-tauri/src/main.rs
- Add TypeScript types in
src/lib/tauri.ts
- Use command in React components
- Update menu structure in
src-tauri/src/menu.rs
- Handle menu events in the same file
- Register menu in
src-tauri/src/main.rs
- Update tray menu in
src-tauri/src/tray.rs
- Handle tray events in the same file
- Configure tray in
src-tauri/tauri.conf.json
npm run tauri:dev
npm run tauri:build
The built application will be available in src-tauri/target/release/bundle/
.
- Windows:
.msi
installer and.exe
executable - macOS:
.dmg
disk image and.app
bundle - Linux:
.deb
,.rpm
, and.AppImage
packages
-
Tauri CLI not found
npm install -g @tauri-apps/cli@next
-
Rust compilation errors
rustup update
-
Node.js version issues
- Ensure Node.js v18+ is installed
- Use
nvm
to manage Node.js versions
-
TypeScript errors
- Install dependencies:
npm install
- Restart TypeScript server in your editor
- Install dependencies:
-
Windows-specific issues
"Microsoft Visual C++ 14.0 is required" error:
# Install Visual Studio Build Tools winget install Microsoft.VisualStudio.2022.BuildTools
"link.exe not found" error:
- Ensure Visual Studio Build Tools are installed with C++ workload
- Restart your terminal after installation
- Verify installation:
where link.exe
PowerShell execution policy errors:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Path issues with Rust/Cargo:
- Restart your terminal or IDE after Rust installation
- Manually add to PATH if needed:
%USERPROFILE%\.cargo\bin
WebView2 runtime missing:
- Download and install Microsoft Edge WebView2
- Or install via command:
winget install Microsoft.EdgeWebView2Runtime
Prerequisites:
- Visual Studio Build Tools or Visual Studio Community with C++ development tools
- Windows 10 SDK (usually included with Visual Studio)
Option 1: Visual Studio Installer
- Download Visual Studio Community (free)
- During installation, select "Desktop development with C++"
- Ensure "Windows 10/11 SDK" is included
Option 2: Build Tools Only
- Download Visual Studio Build Tools
- Install with C++ build tools and Windows SDK
- β
Desktop development with C++
- This provides MSVC, Clang, CMake, and MSBuild tools
- This is the main one you need for Tauri!
After selecting the C++ workload, also ensure these are selected:
- β Windows 11 SDK (latest version available)
- β MSVC v143 - VS 2022 C++ x64/x86 build tools
- β CMake tools for Visual Studio
Option 3: Using Chocolatey
# Install Chocolatey first if not installed
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
# Install build tools
choco install visualstudio2022buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools"
sudo apt update
sudo apt install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
sudo dnf groupinstall "C Development Tools and Libraries"
sudo dnf install webkit2gtk3-devel openssl-devel curl wget libappindicator-gtk3-devel librsvg2-devel
xcode-select --install
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Tauri - Desktop app framework
- Next.js - React framework
- Tailwind CSS - CSS framework
- TypeScript - Type safety
Happy coding! π
For more information, visit the Tauri documentation and Next.js documentation.