Skip to content

Architecture overview

Fuzja edited this page Nov 12, 2026 · 1 revision

Architecture overview

Pulsar is a desktop application built with Tauri 2. The UI is a React and TypeScript app built with Vite. Rust hosts the native side of the application and exposes commands that the frontend calls through Tauri.

React UI (src/)
    │ invoke commands / listen for events
    ▼
Tauri command layer (src-tauri/src/lib.rs)
    -> application state and persistence (app/)
    -> media features (features/)
    -> system integration (system/)
    -> helper processes and platform paths (infrastructure/)
       -> Pulsar Bridge for download work
       -> FFmpeg for media processing

Frontend

The React entry point is src/main.tsx. src/App.tsx loads configuration, sets up shared UI state, and mounts the app shell and startup splash. Feature screens and shared services are under src/; see the frontend map.

The frontend owns screen state and the visible queue model. It invokes Rust commands for native work and subscribes to Tauri events for asynchronous progress.

Native side

src-tauri/src/lib.rs creates the Tauri application, registers plugins and shared state, handles window lifecycle events, and lists the commands available to the frontend.

Rust modules are grouped by responsibility:

  • app/ contains app-level state and services, including configuration, presets, queue persistence, and the tray icon.
  • features/ contains download, conversion, and compression commands and their media-specific logic.
  • system/ contains OS-facing operations such as metadata, file access, format catalogs, and hardware acceleration.
  • infrastructure/ contains integrations and shared platform support, including the Pulsar Bridge process and FFmpeg helpers.
  • startup/ checks and prepares runtime requirements such as Pulsar Bridge and FFmpeg.

Runtime processes

Downloads are submitted to the long-running Pulsar Bridge process. The Rust bridge integration exchanges line-delimited JSON with that process and forwards task events to the frontend. Conversion and compression use FFmpeg through native commands. The frontend receives progress through the download-event Tauri event; this event is also used for FFmpeg work.

The detailed flow is in Task and event flow. The relevant code is in infrastructure/bridge, features/downloads, features/conversion, and features/compression.

Clone this wiki locally