V2 System Architecture
Architecture• 1 min read• Updated 2026-11-30
Pure Rust microservices, FoundationDB 7.3 transactional outbox, Protobuf over NATS JetStream, and Zitadel + OpenBao.
dewDrive V2 is a clean Rust + TypeScript platform built around strict isolation and zero polling.
Core Principles
- Protobuf Everywhere: Every NATS message, JetStream payload, FoundationDB record, desktop SQLite record, and IPC call uses Protobuf (
prost+@bufbuild/protobuf). - Transactional Outbox: State mutations and their Protobuf events commit in the same FoundationDB 7.3 transaction (
TenantScope,PartnerScope, or auditedAdminScope), then relay to NATS JetStream with deterministicNats-Msg-Idheaders. - No Polling in UI: Console screens subscribe to snapshot-plus-delta JetStream feeds anchored by FoundationDB versionstamps, targeting
p99 <= 2 srealtime updates. - Identity & Secrets: Zitadel handles authentication with
httpOnlysession cookies and NATS auth callout (browser JS never sees tokens). OpenBao manages vault keys and mTLS PKI.
Desktop Privilege Separation
The Tauri v2 desktop app never connects to NATS or opens service databases directly. It talks over OS-verified Unix sockets / named pipes to five no-login system services (dd-service-backup, dd-service-helper, dd-service-rmm, dd-service-uplink, dd-service-updater).
Tags:#architecture#rust#foundationdb#nats#protobuf