-
Notifications
You must be signed in to change notification settings - Fork 0
apps
Active contributors: Douwe de Vries
The app layer covers deployable and runtime units that use the shared anonymization core. CSV Anonymizer currently has two units:
- Desktop app, the React and Tauri product used by end users.
- CLI smoke harness, the lightweight Rust binary path used for command-line inspection and release smoke checks.
Both units keep sensitive-data behavior in crates/csv-anonymizer-core and avoid duplicating detection, selection, transformation, or report logic.
| Path | Role |
|---|---|
frontend/src |
React renderer, workflow components, hooks, Tauri command wrappers, settings UI, and theme handling |
src-tauri/src |
Tauri shell, command registration, settings store, file grants, background jobs, and Local AI integration |
src-tauri/tauri.conf.json |
Desktop runtime, CSP, window, and bundle configuration |
crates/csv-anonymizer-app/src |
CLI entry point and argument handling for the smoke harness |
crates/csv-anonymizer-core/src |
Shared Rust detection, preview, transformation, direct-input, Smart replacement, and reporting services |
scripts/rust-smoke.mjs |
Node smoke script that builds or reuses the CLI binary and verifies fixture anonymization |
| Abstraction | Used by | Notes |
|---|---|---|
| Runtime unit | Desktop app and CLI smoke harness | A process that users or automation can run. |
| Tauri command boundary | Desktop app | Typed frontend wrappers call Rust command handlers through invoke. |
AnonymizerService |
Desktop app and CLI smoke harness | Owns CSV analysis, preflight, preview, streaming anonymization, and reports. |
| Direct-input module | Desktop app | Powers paste and quick workflows through Tauri commands. |
| Smoke command | CLI smoke harness | Runs a representative analyze, preview, and anonymize path against the shared core. |
graph TD
Desktop[Desktop app] --> Tauri[Tauri command shell]
Tauri --> Core[Shared Rust core]
Cli[CLI smoke harness] --> Core
Core --> Csv[CSV IO and direct-input parsing]
Core --> Detect[Detection and metadata]
Core --> Transform[Strategies and Smart replacement]
Core --> Report[Privacy report]
The desktop app is the primary runtime. It renders CSV file, paste sample, and quick generation workflows, then calls Tauri commands from frontend/src/tauri.ts. The Tauri shell validates desktop access, runs blocking Rust work away from the renderer, and delegates anonymization behavior to the core crate.
The CLI smoke harness is intentionally smaller. It exercises the same AnonymizerService from a terminal process for analyze, anonymize, and --smoke-anonymize checks. Release and CI scripts use this route to verify that the Rust binary can transform a fixture without leaking known source emails.
- User workflows are documented in Features.
- CSV file behavior is owned by CSV file workflow.
- Paste and quick behavior is owned by Paste and quick workflows.
- Smart replacement setup is shared with Local AI Smart replacement.
- Privacy report output is described in Privacy reporting.
- Add or change user-facing app workflow routing in
frontend/src/App.tsx. - Add or change command wrappers in
frontend/src/tauri.tsand matching Tauri handlers undersrc-tauri/src/commands/. - Keep reusable privacy behavior in
crates/csv-anonymizer-core/srcso the desktop app and CLI smoke harness stay aligned. - Update CLI behavior in
crates/csv-anonymizer-app/src/cli.rsonly when command-line smoke needs change. - Update
scripts/rust-smoke.mjswhen the smoke fixture contract changes.
| File | Why it matters |
|---|---|
frontend/src/App.tsx |
Selects the runtime UI mode and mounts settings, theme, and workflow components. |
frontend/src/tauri.ts |
Single typed frontend surface for Tauri command calls. |
src-tauri/src/main.rs |
Builds the Tauri runtime and registers managed state plus command handlers. |
src-tauri/tauri.conf.json |
Defines desktop window, security policy, build commands, and bundle metadata. |
crates/csv-anonymizer-app/src/cli.rs |
Parses and runs CLI smoke harness commands. |
scripts/rust-smoke.mjs |
Runs the packaged Rust smoke path used by local and release checks. |