Prerequisites
Before you begin, ensure you have the following installed on your system:Node.js
Version 14 or laterDownload Node.js
pnpm
Version 6 or laterInstall pnpm
Rust
Latest stable versionInstall Rust
Tauri Prerequisites
Platform-specific dependenciesSetup Guide
Tauri Prerequisites by Platform
- Linux
- macOS
- Windows
Install the required system dependencies:
Installation
Install dependencies
- Svelte and related tooling
- TypeScript compiler
- Vite build tool
- Tauri CLI
- Tone.js audio library
- UI icon packages
Development Workflow
Running the Development Server
Start the app in development mode with hot reload:- Starts the Vite dev server on port 1420
- Launches the Tauri development window
- Enables hot module replacement (HMR)
- Shows detailed error messages
The first run will take longer as Rust dependencies are compiled. Subsequent runs are much faster.
Development Mode Features
Hot Reload
Changes to Svelte/TypeScript files reload instantly
Source Maps
Full debugging support with source maps
Dev Tools
Right-click → Inspect to open Chrome DevTools
Fast Refresh
Preserves component state during reload
Available Scripts
The project includes several npm scripts defined inpackage.json:
Script Reference
pnpm dev
pnpm dev
Runs the Vite development server without Tauri.Useful for:Visit http://localhost:1420 in your browser.
- Rapid UI development
- Testing in browser
- Debugging with browser DevTools
pnpm build
pnpm build
Builds the frontend assets without creating a Tauri app.Output:
dist/ directory with optimized HTML, CSS, JSpnpm preview
pnpm preview
Previews the production build locally.Useful for testing the production build before creating the desktop app.
pnpm check
pnpm check
Runs Svelte type checking with TypeScript.Use this to catch type errors before building.
pnpm tauri:d
pnpm tauri:d
Main development command - runs the full Tauri app with hot reload.
pnpm tauri:b
pnpm tauri:b
Builds the production desktop application.Output:
src-tauri/target/release/ directoryBuilding for Production
Create a production build of the desktop application:Frontend build
Vite compiles and optimizes the frontend:
- TypeScript → JavaScript
- Svelte components → optimized JS
- Assets bundled and minified
- Tree-shaking removes unused code
Rust compilation
Cargo compiles the Tauri backend:
- Release mode optimizations
- Platform-specific binary
- Minimal runtime dependencies
Build Output
The compiled application is located at:Project Configuration
Vite Configuration
Thevite.config.ts file contains build and dev server settings:
vite.config.ts
Key configuration options
Key configuration options
- base: ”./”: Use relative paths for assets
- port: 1420: Tauri’s default port
- strictPort: true: Fail if port is in use
- clearScreen: false: Keep Rust errors visible
- Dynamic target: Chrome 105 (Windows) or Safari 13 (macOS/Linux)
TypeScript Configuration
The project uses TypeScript with Svelte-specific settings. Seetsconfig.json for details.
Troubleshooting
Port 1420 already in use
Port 1420 already in use
Kill the process using the port:Or change the port in
vite.config.ts.Rust compilation errors
Rust compilation errors
Update Rust to the latest stable version:Clear the build cache:
pnpm install fails
pnpm install fails
Clear the pnpm cache and reinstall:
WebView2 error (Windows)
WebView2 error (Windows)
Install the WebView2 Runtime:Download WebView2
Audio not working
Audio not working
Ensure Tone.js samples are loaded:
- Check
public/assets/engine/directory - Verify sample paths in
src/lib/engine/*/Samples.ts - Check browser console for 404 errors
IDE Setup
VS Code (Recommended)
Install the following extensions:- Svelte for VS Code - Syntax highlighting and IntelliSense
- Tauri - Tauri-specific features
- rust-analyzer - Rust language support
- ESLint - JavaScript/TypeScript linting
WebStorm
Enable the Svelte plugin in Settings → Plugins.Next Steps
Contributing Guidelines
Learn how to contribute to the project
System Architecture
Understand the codebase structure