Skip to content

features

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

Features

Active contributors: Douwe de Vries

Purpose

The feature layer maps user-visible workflows to the frontend views, Tauri commands, and Rust core services that implement them. Start here when changing what users can do in the Desktop app.

Directory layout

Page Workflow Primary paths
CSV file workflow Select a CSV file, review columns, preview, run background anonymization, and inspect the report. frontend/src/components/workflow/AnonymizerWorkflowView.tsx, crates/csv-anonymizer-core/src/service.rs
Paste and quick workflows Transform pasted samples or generate protected values by data type. frontend/src/components/PasteDataWorkflowView.tsx, frontend/src/components/QuickDataTypeWorkflowView.tsx, crates/csv-anonymizer-core/src/direct_input/
Local AI Smart replacement Use optional Ollama-backed realistic replacements for selected fields. src-tauri/src/local_ai/, crates/csv-anonymizer-core/src/smart.rs
Privacy reporting Summarize transformation decisions, readiness, evidence, utility, and notes. crates/csv-anonymizer-core/src/release_report.rs, frontend/src/components/privacy-report/

Key abstractions

Abstraction Notes
Workflow view React component that presents a user task as ordered steps.
Workflow hook React hook that owns state transitions, command calls, and polling for a workflow.
Tauri command Desktop boundary that validates local access and delegates to Rust core services.
Core service Rust API that owns detection, preview, transformation, and report creation.
Strategy User-selected transform behavior: auto, pseudonymize, tokenize, Smart replacement, mask, redact, or pass through.
Privacy report Result summary that makes release readiness and residual review items visible.

How it works

graph LR
    Mode[Input mode tabs] --> Csv[CSV file workflow]
    Mode --> Paste[Paste sample workflow]
    Mode --> Quick[Quick by data type workflow]
    Csv --> Report[Privacy reporting]
    Paste --> Report
    Quick --> Report
    Csv --> Smart[Local AI Smart replacement]
    Paste --> Smart
    Quick --> Smart
Loading

Users choose one of three input modes in frontend/src/App.tsx. CSV file mode handles large local files with streaming output. Paste sample mode handles small structured or text snippets. Quick by data type mode generates protected values without user-provided source data.

All workflows call the Rust core through Tauri wrappers. Feature-specific React state stays in components and hooks, while detection, transformation, Smart replacement validation, and report assembly stay in Rust.

Integration points

  • Apps describes the deployable runtimes that expose these features.
  • Desktop app explains how the React and Tauri shell host the workflows.
  • CLI smoke harness exercises the shared CSV core without the React UI.

Entry points for modification

  • Add a new visible workflow by updating frontend/src/App.tsx, adding a workflow component, adding command wrappers in frontend/src/tauri.ts, and implementing core behavior in Rust.
  • Change CSV workflow behavior through frontend/src/components/workflow/AnonymizerWorkflowView.tsx and its hooks before changing top-level app routing.
  • Change direct-input behavior through frontend/src/components/PasteDataWorkflowView.tsx, frontend/src/components/QuickDataTypeWorkflowView.tsx, and crates/csv-anonymizer-core/src/direct_input/.
  • Change report contents in crates/csv-anonymizer-core/src/release_report.rs and render new fields under frontend/src/components/privacy-report/.

Key source files

File Why it matters
frontend/src/App.tsx Hosts the input mode tabs and mounts each feature workflow.
frontend/src/tauri.ts Frontend entry point for feature commands.
src-tauri/src/commands/csv.rs Tauri command handlers for CSV, paste, and quick workflows.
crates/csv-anonymizer-core/src/service.rs Core CSV workflow behavior and report assembly.
crates/csv-anonymizer-core/src/direct_input/mod.rs Core paste and quick workflow dispatcher.

Clone this wiki locally