The Helmor backend is a Rust application built on Tauri 2. It owns persistence, workspace lifecycle, agent orchestration, and all Git operations. The frontend communicates with it exclusively through Tauri IPC commands.
Tech stack#
| Component | Technology |
|---|---|
| Framework | Tauri 2 |
| Async runtime | Tokio |
| Database | SQLite via rusqlite (WAL mode) |
| HTTP | reqwest with rustls |
| Encryption | AES, HMAC, PBKDF2 |
| Logging | tracing with JSON output |
Module structure#
src-tauri/src/
├── commands/ # Tauri IPC handlers by domain
│ ├── workspace/ # Workspace CRUD, lifecycle
│ ├── session/ # Session management, streaming
│ ├── editor/ # File read/write operations
│ ├── git/ # Branch, commit, diff, push
│ ├── forge/ # GitHub integration, PRs
│ ├── scripts/ # Setup script execution
│ └── terminal/ # PTY management
├── models/ # SQLite data models
├── workspace/ # Workspace lifecycle, file ops, PR sync
├── agents/ # Agent orchestration
├── pipeline/ # Message streaming pipeline
├── sidecar.rs # Sidecar process management
└── db/ # Connection pooling, migrations
Database architecture#
Helmor uses a dual-pool SQLite setup:
- Read pool — 8 connections for concurrent queries.
- Write pool — 1 connection to serialize mutations.
- All connections: WAL mode, 20 MiB cache, 256 MiB mmap.
Core tables: repos, workspaces, sessions, session_messages, settings.
Per-workspace locks serialize filesystem mutations with database updates to prevent corruption when multiple operations target the same workspace.
Data directory#
- Production:
~/.helmor/ - Development:
~/.helmor-dev/ - Contents:
helmor.db,workspaces/,chats/,logs/
Key responsibilities#
- Workspace lifecycle — two-phase creation (fast DB insert + async worktree materialization), state transitions, archiving.
- Session orchestration — message persistence, stream locking, heartbeat timeout (45s), provider session resumption.
- Git operations — worktree management, branching, diffing, commit, push.
- Sidecar supervision — spawn on first request, health monitoring, three-step shutdown ladder.
Related#
- Sidecar Overview — the process this backend supervises.
- Frontend Overview — what calls into this backend.