Skip to content

systems

Douwe de Vries edited this page Jul 1, 2026 · 1 revision

Systems

Active contributors: Douwe de Vries

Purpose

This section maps the internal systems that connect the React renderer, Tauri desktop boundary, Rust core crates, Local AI integration, and release tooling. Start with Architecture for the layer overview, then use these pages when changing one system boundary.

Directory layout

Area Page Primary paths
Frontend state Frontend workflow state frontend/src/hooks, frontend/src/tauri.ts
Tauri command boundary Tauri command shell src-tauri/src/main.rs, src-tauri/src/commands
Retained work Background jobs src-tauri/src/job_registry.rs, src-tauri/src/jobs.rs, src-tauri/src/local_ai/download.rs
Settings and path grants Settings and path access src-tauri/src/settings, src-tauri/src/path_access.rs
Release automation Release tooling scripts, .github/workflows/release.yml, docs/releasing.md

Key abstractions

  • Frontend workflow state owns the CSV file workflow state machine in React hooks.
  • Tauri command shell exposes typed commands to the renderer and adapts desktop concerns to Rust core calls.
  • Background jobs retains long-running anonymization and model-download work across polling calls.
  • Settings and path access keeps user preferences durable and limits filesystem access to granted files.
  • Release tooling validates metadata, builds desktop artifacts, signs Linux assets, and publishes releases.

How it works

graph LR
    UI[React workflow state] -->|typed invoke wrappers| Shell[Tauri command shell]
    Shell -->|path grants| Access[Settings and path access]
    Shell -->|long work| Jobs[Background jobs]
    Shell -->|service calls| Core[Core crate]
    Jobs -->|progress and cancel| UI
    Jobs -->|streaming transform| Core
    Core -->|metadata and reports| UI
    Release[Release tooling] -->|validates and packages| Shell
    Release -->|validates contracts| UI
    Release -->|builds workspace| Core
Loading

The systems are split by ownership, not by runtime process. React coordinates user intent, Tauri validates desktop access and command inputs, the Rust core performs detection and transformation, and the release tooling verifies that the shipped artifacts match the repository metadata.

Integration points

  • Data contracts are declared in crates/csv-anonymizer-core/src/types.rs and mirrored by frontend/src/types.ts.
  • Frontend commands call frontend/src/tauri.ts, which maps to the names registered in src-tauri/src/tauri_command_list.rs.
  • Long-running CSV output and Local AI model downloads use retained job IDs that the frontend polls.
  • Settings and path access are managed Tauri state created in src-tauri/src/main.rs.
  • Release checks call the same root scripts listed in README.md and docs/releasing.md.

Entry points for modification

Change Start here
Change CSV workflow state or controls Frontend workflow state
Add or rename a Tauri command Tauri command shell
Change progress, cancellation, or job retention Background jobs
Add settings or file authorization behavior Settings and path access
Change release packaging or artifact validation Release tooling

Key source files

  • frontend/src/hooks/useAnonymizerWorkflow.ts
  • frontend/src/tauri.ts
  • src-tauri/src/main.rs
  • src-tauri/src/commands.rs
  • src-tauri/src/job_registry.rs
  • src-tauri/src/settings/model.rs
  • scripts/check-release-metadata.mjs

Clone this wiki locally