Skip to content

reference configuration

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

Configuration

This page records the main configuration surfaces for CSV Anonymizer. It names CI variables and secrets where useful, but it does not contain secret values.

Active contributors: Douwe de Vries

Package scripts

Root scripts in package.json are the canonical local command surface:

  • Development: dev, tauri:dev
  • Build: frontend:build, build, tauri:build, build:stable, dist
  • Quality: fmt, lint, test, typecheck
  • Contracts and docs: contracts:check, docs:check
  • Dead code: frontend:deadcode, frontend:deadcode:production, deadcode:strict, deadcode:required
  • Audits: frontend:audit, cargo:audit, cargo:audit:required, cargo:machete, cargo:machete:required
  • Browser checks: frontend:e2e, frontend:a11y
  • Release and package checks: release:check, tauri:prebuilt:check, artifacts:rust:check, linux:package-manager:check
  • Packaging: dist:mac, dist:mac:app, dist:linux, linux:packages
  • Smoke: smoke:packaged, smoke:rust

Frontend scripts in frontend/package.json provide dev, build, lint, test, e2e, a11y, typecheck, deadcode, deadcode:production, and preview.

Tauri config

src-tauri/tauri.conf.json controls the active desktop build:

Field Current role
build.beforeDevCommand Runs cd frontend && npm run dev
build.beforeBuildCommand Runs scripts/build_frontend_for_tauri.sh
build.devUrl Uses http://localhost:5173
build.frontendDist Uses ../frontend/dist
app.security.csp Production content security policy
app.security.devCsp Development CSP for Vite and HMR
app.windows Main window label, title, size, minimum size, and layout
bundle.icon macOS icon plus required Linux PNG icon sizes
bundle.linux Linux .deb and .rpm extra metadata files
productName CSV Anonymizer
mainBinaryName csv-anonymizer
identifier io.github.ddv1982.csv-data-anonymizer
version Synchronized with root and frontend package versions

Linux-specific overrides live in src-tauri/tauri.linux.conf.json. It keeps the package product name as csv-anonymizer and points .deb and .rpm desktop templates at build/linux/csv-anonymizer.desktop.hbs.

Command permissions live in src-tauri/capabilities/default.json.

Frontend config

frontend/vite.config.ts configures:

  • React through @vitejs/plugin-react.
  • Dev server port 5173 with strict port behavior.
  • Optional TAURI_DEV_HOST host and HMR settings.
  • File-system allowlist including the repository root.
  • Tauri environment prefixes VITE_ and TAURI_ENV_*.
  • Build target es2020, or chrome105 for Windows.
  • Sourcemaps when TAURI_ENV_DEBUG is set.
  • Vitest with jsdom and frontend/src/test/setup.ts.

frontend/playwright.config.ts runs tests under frontend/e2e, starts Vite at http://127.0.0.1:5173, and uses Desktop Chrome.

knip.json configures Knip and ignores expected binaries such as gpg, gpg-connect-agent, gpgconf, and python3.

Settings schema

The persisted settings model is AppSettings in src-tauri/src/settings/model.rs; the frontend mirror is in frontend/src/types.ts, with defaults in frontend/src/defaults.ts.

Field Default Notes
schemaVersion 10 Forced to the current schema version on load/save
themeMode system system, light, or dark
overwriteOutput false Controls overwrite preference
sampleRowCount 100 Sanitized to 1..=10000
previewSampleCount 5 Sanitized to 1..=100
defaultOutputSuffix _private_output Empty values are reset to the default
rememberLastPaths true Controls remembered input and output directories
lastInputDirectory null Optional path string
lastOutputDirectory null Optional path string
localAiEnabled false Smart replacement is off by default
localAiModel gemma3:4b Trimmed and defaulted when empty

Settings are stored through src-tauri/src/settings/store.rs under the platform config directory from directories::ProjectDirs, falling back to .csv-anonymizer-settings.json.

CI and release environment names

Non-secret CI variables:

  • CARGO_TERM_COLOR
  • RUST_LINUX_ARTIFACT_NAME
  • TAURI_TARGET
  • TAURI_CLI_VERSION
  • CSV_ANONYMIZER_USE_PREBUILT_FRONTEND
  • CSV_ANONYMIZER_BINARY
  • CSV_ANONYMIZER_REQUIRE_CARGO_AUDIT
  • CSV_ANONYMIZER_REQUIRE_CARGO_MACHETE
  • TAURI_DEV_HOST
  • TAURI_ENV_PLATFORM
  • TAURI_ENV_DEBUG

Release secret or variable names used by .github/workflows/release.yml include:

  • CSC_LINK
  • CSC_KEY_PASSWORD
  • MACOS_DEVELOPER_ID
  • MACOS_TEAM_ID
  • APPLE_API_KEY
  • APPLE_API_KEY_ID
  • APPLE_API_ISSUER
  • DEB_SIGNING_PRIVATE_KEY
  • DEB_SIGNING_KEY_FINGERPRINT
  • DEB_SIGNING_KEY_PASSPHRASE
  • DEB_SIGNING_PUBLIC_KEY
  • GITHUB_TOKEN

These names may appear in workflow configuration, but their values must stay in GitHub Actions secrets or variables.

Related pages: Tooling, Deployment, and Security.

Clone this wiki locally