How amad3v/arsu works
Arsu is an offline authenticator for Linux and Android. The user creates or unlocks an encrypted vault, adds accounts, and uses generated TOTP/HOTP codes; the frontend reaches Rust through typed Tauri commands. Optional branches cover import/export, diagnostics, and direct Bluetooth or encrypted-file device sync. The graph preserves documented capabilities, but several backend implementations are unsampled, so their internal call paths are not inferred.
Main entry points: commands.rs Command handlers · App.tsx App flow · bluetooth.rs Bluetooth links · mod.rs Diagnostic reports
Components 26
User interface
- App flow
src/App.tsx - Account entry
src/components/add-entry-dialog - Code dashboard
src/components/dashboard - Sync screens
src/components/sync-dialog/index.tsx - Typed IPC
src/api/index.ts
Command backend
- Tauri shell
src-tauri/src/lib.rs - Command handlers
crates/cmd/src/commands.rs - App state
crates/cmd/src/state
Vault and codes
- Encrypted vault
crates/storage/src/vault.rs - Vault payload
crates/vault-core/src/payload.rs - Vault crypto
crates/crypto/src/lib.rs - OTP codes
crates/otp/src/lib.rs - QR and URI
crates/qr/src - Backup formats
crates/interop/src
Device sync
- Sync protocol
crates/vault-sync/src/session.rs - Encrypted sync file
crates/vault-sync/src/file.rs - Bluetooth links
crates/cmd/src/bluetooth.rs - Linux BLE
crates/ble-linux/src - Android BLE
crates/ble-android/src/lib.rs
Platform and diagnostics
- Diagnostic reports
crates/cmd/src/diagnostics/mod.rs - Diagnostic events
crates/cmd/src/diagnostics/event.rs - Sensitive-data redaction
crates/cmd/src/diagnostics/redact.rs - Rotated log files
crates/cmd/src/diagnostics/files.rs - Biometric access
crates/biometric/src/lib.rs - Secure clipboard
crates/cmd/src/clipboard.rs
Other components
- User
Connections 27
- User → App flow: uses
README.md - App flow → Typed IPC: requests backend
- App flow → Code dashboard: shows unlocked view
src/App.tsx - App flow → Account entry: opens account flow
- User → Account entry: adds accounts
README.md - User → Sync screens: starts pairing or sync
README.md - Typed IPC → Command handlers: invokes
src/api/index.ts - Tauri shell → Command handlers: registers handlers
src-tauri/src/lib.rs - Command handlers → App state: delegates state work
crates/cmd/src/commands.rs - App state → Encrypted vault: reads and saves
- Encrypted vault → Vault payload: stores payload
- Vault payload → Vault crypto: encrypted by
- Code dashboard → OTP codes: shows generated codes
README.md - Account entry → QR and URI: parses account QR
- Command handlers → Backup formats: imports and exports backups
README.md - Sync screens → Typed IPC: requests sync actions
- Command handlers → Sync protocol: runs sync sessions
- Command handlers → Encrypted sync file: handles sync files
- Command handlers → Bluetooth links: starts Bluetooth sync
crates/cmd/src/commands.rs - Bluetooth links → Linux BLE: uses platform transport
- Bluetooth links → Android BLE: uses platform transport
- Command handlers → Diagnostic reports: prepares reports
crates/cmd/src/commands.rs - Diagnostic reports → Diagnostic events: records events
crates/cmd/src/diagnostics/mod.rs - Diagnostic events → Sensitive-data redaction: redacts sensitive data
crates/cmd/src/diagnostics/event.rs - Diagnostic reports → Rotated log files: writes and reads logs
crates/cmd/src/diagnostics/mod.rs - Command handlers → Biometric access: supports biometric export
crates/cmd/src/commands.rs - Command handlers → Secure clipboard: handles copied codes