Skip to main content

SolidJS + Tauri Desktop Development

SolidJS is a truly reactive UI framework — no virtual DOM, no diffing. Tauri v2 wraps your web frontend in a Rust shell for native desktop packaging. Together they create fast, lightweight desktop apps.

OnlyWrite

A local-first writing app built with SolidJS + Tauri 2 + TypeScript.

Why SolidJS + Tauri?

Project Structure

Tech Stack

SolidJS Reactivity Patterns

SolidJS uses signals and derived computations — no hooks, no re-renders:
In SolidJS, signals update exactly the DOM nodes that read them — no component re-render, no VDOM diff. This makes real-time editors feel instant.

File-Based Workspace

For a local-first writing app, files live on disk, not in a database:
Using Tauri’s fs API gives direct file system access from JavaScript — no server needed. The Rust side handles permission gating through the capabilities/ config.

Bilingual UI (i18n)

Simple signal-based i18n without heavy libraries:

S3 Image Upload

Optional S3 integration for image uploads — configured via dialog, not hardcoded:

Tauri Configuration

Capabilities (Permission Gating)

Tauri v2 uses a capability-based permission system. Each capability file explicitly lists which APIs the frontend can call. This prevents unauthorized file access or system calls.

Autosave Pattern

Combine SolidJS reactivity with debounced saves:

Best Practices

  1. Signals over state — SolidJS signals are fine-grained; avoid “lifting” state like React
  2. Local-first — Read/write files directly via Tauri fs API, no backend server needed
  3. Capability gating — Restrict Tauri API access through capabilities/ config files
  4. Simple i18n — Signal-based dictionary lookup is enough for bilingual apps
  5. Autosave with debounce — Write to disk after a short idle period, not on every keystroke
  6. DOMPurify for HTML — Always sanitize rendered markdown HTML

References

Last modified on April 17, 2026