How adjutorium/diurnum works
Diurnum is a local-first desktop accounting app: users open a workspace, import statement data, review suggested entries, and approve changes into Beancount files they own. The React app calls the Rust workspace commands through its API bridge; Rust modules implement accounting and workspace operations. The product also includes AI-assisted review, reports, a ledger editor, documents, categorization rules, and Git features. The excerpts establish the command boundary and selected calls; some feature wiring is documented or visible only in the tree, so uncertain internal links are omitted.
Main entry points: workspace.rs Tauri commands · workspace Workspace SQLite · App.tsx App coordinator · approval.rs Entry approval
Components 22
Desktop app
- App coordinator
src/App.tsx - Workspace screens
src/features/workspace - Workspace session
src/lib/workspace/session.ts - Workspace API
src/lib/workspace/api.ts - Tauri commands
src-tauri/src/commands/workspace.rs
Accounting workflow
- CSV imports
src-tauri/src/workspace/imports.rs - Source accounts
src-tauri/src/workspace/source_accounts.rs - Entry approval
src-tauri/src/workspace/approval.rs - Categorization rules
src-tauri/src/workspace/categorization_rules.rs - AI assist
src-tauri/src/workspace/ai_assist.rs
Ledger and insights
- Ledger editing
src-tauri/src/workspace/ledger_editor.rs - Ledger validation
src-tauri/src/workspace/validation.rs - Accounting reports
src-tauri/src/workspace/reports.rs
Workspace features
- Workspace lifecycle
src-tauri/src/workspace/create.rs - Documents
src-tauri/src/workspace/documents.rs - Git integration
src-tauri/src/workspace/git.rs - Workspace view
src-tauri/src/workspace/view.rs
Local data and integrations
- AI adapter
src-tauri/src/workspace/ai_adapter.rs - Workspace SQLite
src-tauri/src/workspace - Beancount files
Other components
- User
- Adapter process
Connections 28
- User → App coordinator: uses
- App coordinator → Workspace screens: renders
- App coordinator → Workspace session: manages state
- Workspace session → Workspace API: calls
- Workspace API → Tauri commands: invokes
- Tauri commands → Workspace lifecycle: dispatches
- Tauri commands → CSV imports: dispatches
- Tauri commands → Source accounts: dispatches
- Tauri commands → Entry approval: dispatches
- Tauri commands → Categorization rules: dispatches
- Tauri commands → AI assist: dispatches
- Tauri commands → Ledger editing: dispatches
- Tauri commands → Ledger validation: dispatches
- Tauri commands → Accounting reports: dispatches
- Tauri commands → Documents: dispatches
- Tauri commands → Git integration: dispatches
- Tauri commands → Workspace view: dispatches
- AI assist → AI adapter: uses
- AI adapter → Adapter process: invokes
- Workspace lifecycle → Workspace SQLite: reads/writes
- CSV imports → Workspace SQLite: stages rows
- Entry approval → Beancount files: writes entries
- Entry approval → Workspace SQLite: updates state
- Ledger editing → Beancount files: reads/writes
- Ledger validation → Beancount files: validates
- Accounting reports → Beancount files: reads
- Documents → Workspace SQLite: uses metadata
- Git integration → Beancount files: tracks changes