DLManDLMan

Architecture

DLMan is a monorepo with a shared Rust core library used by both the desktop app and CLI.

Project Structure

  • apps/desktop/ — Tauri + React desktop application
  • apps/cli/ — Command-line interface
  • apps/extension/ — Browser extension (Chrome, Firefox, Edge)
  • crates/dlman-core/ — Core download engine (Rust)
  • crates/dlman-types/ — Shared type definitions

Technology Stack

Frontend

React 18

UI Framework

TypeScript

Type Safety

Tailwind CSS

Styling

shadcn/ui

Components

Zustand

State Management

Framer Motion

Animations

Backend (Rust)

Tauri v2

Desktop Framework

tokio

Async Runtime

reqwest

HTTP Client

sqlx

Database (SQLite)

serde

Serialization

thiserror

Error Handling

Download Engine

The core download engine (dlman-core) handles all download operations:

  • Multi-segment downloads — Splits files into configurable parallel segments
  • SQLite persistence — All progress saved atomically, crash-safe
  • Token bucket rate limiting — Smooth per-download and per-queue speed control
  • Queue scheduler — Background scheduler with time-based start/stop
  • Event system — Real-time progress, status changes via broadcast channels

Desktop App Architecture

The desktop app uses Tauri v2 as the framework. The React frontend communicates with the Rust backend through Tauri's IPC system (commands and events). Zustand stores manage frontend state and sync with the backend.

Browser Extension Architecture

The extension runs a background script that intercepts browser downloads. It communicates with the desktop app through a local HTTP/WebSocket server on port 7899. Content scripts handle deep link navigation and page-level interactions.