Architecture
The verified request chain, reconstructed from actual imports and route definitions — not a design document.
Verified chain
- React user interface (apps/desktop/src)
- Typed API client (@ovr/api-client, packages/api-client)
- Tauri/Rust security bridge (apps/desktop/src-tauri/src/main.rs)
- FastAPI service (services/ml-api/app.py)
- Research-domain modules (src/*)
- Binance public-market adapter (src/market_data)
- Feature calculation (src/market_analysis)
- Strategy and source governance (src/paper_execution/governance_gate.py, src/validation)
- Semantic validation (src/extraction, src/validation)
- Candidate/rejection decision (src/paper_execution/governance_gate.py)
- Paper-observation engine (src/paper_execution/observation_engine.py)
- Capital analytics (src/capital)
- Reporting and presentation (src/research_terminal/presentation.py, packages/presentation)
- Persistence and indexes (data/, vector_store/)
Backend binds to 127.0.0.1 (loopback only) on port 8766 — verified via apps/desktop/src-tauri/src/main.rs's BACKEND_PORT constant and a live loopback check.
System architecture
CODE-DERIVED VISUALISATION
High-level system architecture generated from verified module/route relationships in this repository.
Frontend-to-backend request flow
CODE-DERIVED VISUALISATION
Frontend-to-backend request flow generated from verified module/route relationships in this repository.
Authentication and Keychain boundary
CODE-DERIVED VISUALISATION
- 1User enters credentials in the native login screen (never in a web view field the backend can log)
- 2Rust desktop_login calls /api/desktop/login, receives session_id + csrf_token in the JSON body
- 3Rust stores the bundle in the macOS Keychain (keyring crate)
- 4Every subsequent desktop_request attaches x-desktop-session + x-csrf-token headers
- 5redact_sensitive() strips those values from any response before it reaches React
Tauri commands (verified from source)
bootstrap_app desktop_backend_diagnostics desktop_request desktop_login desktop_logout desktop_setup_start desktop_setup_verify desktop_recovery_start desktop_recovery_confirm subscribe_desktop_events
Native desktop build architecture
CODE-DERIVED VISUALISATION
- 1React + Vite build (apps/desktop) produces dist/
- 2Tauri bundles dist/ with the compiled Rust binary
- 3cargo build --release produces the native ovr_desktop executable
- 4tauri build packages the .app and .dmg
- 5Installed .app hash is compared against the freshly built hash before being trusted