Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.markup.freddiephilpot.dev/llms.txt

Use this file to discover all available pages before exploring further.

Tauri Desktop

Markup includes an optional desktop client built with Tauri v2, allowing you to run the app as a native application with local filesystem integration and improved performance.

Requirements

Before using Tauri, install:
  • Node.js 18+
  • Rust (latest stable)
  • Cargo (included with Rust)
  • Tauri CLI v2
Install Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Install Tauri CLI:
cargo install tauri-cli
Verify installation:
cargo tauri --version

Project Setup

Install dependencies:
npm install
Ensure your web app builds correctly first:
npm run build

Development Mode

Run the Tauri desktop app in development mode:
npm run tauri:dev
This will:
  • Start the Next.js dev server
  • Launch the Tauri desktop shell
  • Enable hot reload for UI changes

Production Build

Build the desktop application:
npm run tauri:build
Output binaries will be located in:
src-tauri/target/release/

Tauri Project Structure

src-tauri/
├── icons/              # App icons
├── src/                # Rust backend logic
├── tauri.conf.json     # Tauri configuration
└── Cargo.toml          # Rust dependencies

Configuration

App Settings

Edit:
src-tauri/tauri.conf.json
Key settings include:
  • App name
  • Window size
  • Security policies
  • Build targets

Allowlist / Permissions

Tauri v2 uses capability-based security. You may need to enable:
  • File system access
  • Network access
  • Clipboard access
Example (conceptual):
{
  "permissions": [
    "fs:read",
    "fs:write",
    "shell:allow-open"
  ]
}

Local File Sync

Markup desktop supports optional local syncing:
  • .md → Markdown notes
  • .canvas → Whiteboard data
  • .mindmap → Mind map structures
Files are stored locally and can optionally sync to the cloud when authenticated.

Common Commands

Start Desktop App

npm run tauri:dev

Build Desktop App

npm run tauri:build

Clean Build

cargo clean

Troubleshooting

Rust not found

Ensure Rust is installed:
rustc --version
If missing, reinstall via rustup.

Tauri build fails

Try cleaning and rebuilding:
cargo clean
npm install
npm run tauri:build

Blank window on launch

Check:
  • Next.js build completes successfully
  • No runtime errors in terminal
  • Correct dev server URL in tauri.conf.json

File system access issues

Ensure permissions are enabled in Tauri capabilities configuration.

Performance Notes

  • Desktop mode uses native WebView rendering
  • Local file access reduces latency compared to cloud-only mode
  • Recommended for heavy note-taking and offline usage

Recommended Workflow

  1. Develop using npm run dev
  2. Test desktop mode with npm run tauri:dev
  3. Build production web app
  4. Build desktop binaries with npm run tauri:build

Security Notes

  • Do not expose sensitive environment variables to frontend
  • Restrict filesystem permissions where possible
  • Use Tauri capabilities instead of full access when possible
  • Keep Rust and Tauri dependencies updated

Optional Enhancements

You can extend the desktop app with:
  • Auto-updater (check Github Repository for an example)
  • System tray integration
  • Global shortcuts
  • Deep OS file integration
  • Offline-first sync mode improvements