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

API

The app API is the Tauri invoke boundary between frontend/src/tauri.ts and Rust commands registered through src-tauri/src/tauri_command_list.rs. The boundary is local to the desktop app, not a network API.

Active contributors: Douwe de Vries

Command groups

Group Commands Main types
Settings load_settings, save_settings AppSettings in src-tauri/src/settings/model.rs and frontend/src/types.ts
Files pick_input_csv, pick_output_csv, open_output_location Path strings crossing the frontend boundary, authorized by src-tauri/src/path_access.rs
CSV file workflow analyze_csv, count_csv_rows, preflight_anonymization, preview_anonymization AnalyzeResponse, HeadersData, PreflightData, PreviewData
Direct paste workflow analyze_pasted_data, preview_pasted_data, anonymize_pasted_data PasteAnalyzeParams, PasteAnalyzeData, PastePreviewParams, PasteTransformData
Quick values generate_quick_values QuickGenerateParams, QuickTransformData
Anonymization jobs start_anonymize_job, get_anonymize_job_status, cancel_anonymize_job StartAnonymizeJobRequest, AnonymizeJobStatus, AnonymizeData
Local AI get_local_ai_status, start_local_ai_model_download, get_local_ai_model_download_status, cancel_local_ai_model_download, open_local_ai_setup_url LocalAiRequest, LocalAiStatus, LocalAiDownloadStatus

See Tauri commands for command-by-command request and response details.

Contract sources

Source Role
src-tauri/src/tauri_command_list.rs Single macro list of command names used by the Tauri handler and command-list tests
src-tauri/src/main.rs Registers managed stores and invokes the generated handler
src-tauri/capabilities/default.json Allows each command permission for the main window
frontend/src/tauri.ts Typed frontend wrapper surface and browser-preview fallbacks
crates/csv-anonymizer-core/src/types.rs Rust DTOs for core workflows, reports, and contract-checked types
frontend/src/types.ts TypeScript mirrors of core DTOs and frontend-facing status types
scripts/check-contracts.mjs Manual contract drift check for selected enums and structs

Boundary rules

  • The frontend should invoke commands only through frontend/src/tauri.ts.
  • Commands that touch files must use PathAccess grants or explicit Tauri confirmation.
  • Long-running file anonymization is started through the job commands instead of blocking the UI.
  • Smart replacement should use the Local AI request and validation path, not a separate frontend HTTP call.
  • DTO changes must keep crates/csv-anonymizer-core/src/types.rs, frontend/src/types.ts, and scripts/check-contracts.mjs aligned.

Related pages: Data models, Configuration, Security, and Testing.

Clone this wiki locally