How ikarosgit/ikrs-workspace works
1. Product boundary
- IKAROS Workspace is a cross-platform desktop app built with Tauri 2 + React 19 + TypeScript on the outside, and Rust on the inside.
- The app is primarily a local operator console for consultants: chat with Claude, manage client context, sync workspace data, and surface productivity/manager visibility.
2. Frontend shell and user surfaces
- The React app is organized around a small set of major views: Chat, Calendar, Inbox, Notes, Tasks, Files, Settings.
- The layout layer (SideRail, Toolbar, StatusBar, EngagementSwitcher) frames those views, while feature components handle task drawers, email compose, meeting prep, heartbeat status, and session details.
3. Client state and orchestration in the UI
- Application state is concentrated in Zustand stores such as claudeStore, taskStore, engagementStore, mcpStore, uiStore, and costLedgerStore.
- Hooks like useClaudeStream, useWorkspaceSession, useCalendar, useGmail, and useDrive bridge the UI to backend commands and long-lived session state.
- This makes the frontend mostly a coordinator and renderer, not the source of truth for integrations.
4. Tauri backend as the integration boundary
- The Rust side is the real control plane: it exposes Tauri commands for calendar sync, Gmail sync, Drive sync, notes sync, task watching, vault access, OAuth, credentials, heartbeat, and memory operations.
- The command layer is what the React app actually invokes; it encapsulates OS access, process spawning, file operations, and networked auth flows.
- This is the main boundary between the user-facing UI and all external systems.
5. Embedded Claude subsystem
- Claude Code is not embedded as a library; it is spawned as a subprocess per engagement.
- The Rust claude module family handles binary resolution, auth, session management, MCP config generation, registry tracking, stream parsing, and command execution.
- The frontend talks to this subsystem through streaming hooks and stores, while the backend manages the lifecycle and wiring.
6. MCP and engagement-specific tools
- Each engagement gets its own generated MCP configuration so Claude can reach the right toolset for that client.
- The tool boundary includes Gmail, Google Calendar, Google Drive, and Obsidian, with per-engagement isolation rather than a single global integration context.
- This is the key architectural choice that lets one desktop app serve multiple client workspaces safely.
7. Authentication and token handling
- There are two distinct identity layers:
- IKAROS identity via Firebase for app/workspace identity and cross-device metadata.
- Per-engagement Google OAuth using PKCE, designed as a public desktop client flow.
- Tokens are protected by the OS keychain on the desktop side, with a Firestore-based token cache/sync path used for multi-device or migration scenarios.
- The auth code is split across oauth, token_cache, token_refresh, redirect_server, identity_server, and related modules.
8. Storage and sync boundaries
- Firestore is the remote metadata plane: app state, cross-device sync, and schema-backed records.
- The local filesystem holds Obsidian vaults and other workspace files.
- The repo also includes operations/ content, which acts like local working memory for prompts, identity, recent context, and right-hand automation.
9. Heartbeat and background automation
- There is a second subsystem named heartbeat in heartbeat/, implemented as a separate Python package with scripts, tests, and systemd units for VM deployment.
- That service collects signals from sources like Gmail, Calendar, Vault, Firestore tokens, and state, then dispatches outputs to destinations such as Firestore, Telegram, audit logs, and secrets.
- This is the autonomous/background side of the system, distinct from the interactive desktop app, and it feeds the “right-hand” style workflows.
10. Desktop automation and assistant workflows
- The app includes a memory/skills layer on the Rust and React sides (skills, memory_cmd, briefing, task-parser, mcp-utils) that supports structured assistant actions, not just freeform chat.
- The UI exposes this through task boards, skill status panels, and chat session controls, making the assistant feel like an operational workspace rather than a plain chat client.
11. Operational and release infrastructure
- The repository is built for macOS first, with Windows/Linux supported, and includes ad-hoc signing for local use plus Tauri updater signing for release readiness.
- CI enforces architectural governance through documentation checks, tests, and release/security workflows.
- The repo is heavily doc-driven: docs/ECOSYSTEM.md is the canonical architecture reference, and phase/spec docs track the evolution of each subsystem.
12. How to draw the architecture
- A good diagram should show:
- React UI on the left,
- Tauri/Rust command layer in the middle,
- Claude subprocess + MCP tool layer as one branch,
- OAuth/keychain/Firestore/OS filesystem as external dependencies,
- and a separate heartbeat VM service as an asynchronous background system.
- The central theme is: desktop orchestration + embedded agent runtime + per-engagement integrations + remote metadata sync.
Main entry points: commands Command API · App.tsx UI shell · vault.rs Sync + storage · outputs Signal outputs
Components 20
Desktop app
Tauri + React workspace for interactive consultant operations.
- UI shell · App routing, layout, and major views for chat, calendar, inbox, notes, tasks, files, and settings.
src/App.tsx - Layout frame · Side rail, toolbar, status bar, engagement switcher, and related framing components.
src/components/layout - Work views · Primary user surfaces for chat, calendar, inbox, notes, tasks, and files.
src/views - UI stores · Client-side orchestration stores for Claude, tasks, engagements, MCP, UI, and cost ledger state.
src/stores - Bridge hooks · Hooks that connect the UI to backend commands and session streams.
src/hooks - Assistant panels · Session details, tool activity, task drawers, compose flows, skill status, and heartbeat status panels.
src/components - Bridge libs · Frontend command wrappers, Firebase client, Firestore token helpers, MCP utilities, schemas, and briefing helpers.
src/lib
Rust backend
Command layer, Claude runtime, auth, storage, and sync boundaries.
- Command API · Desktop command boundary for sync, vault, OAuth, heartbeat, memory, and task watching operations.
src-tauri/src/commands - Claude runtime · Spawns and manages Claude Code per engagement, including auth, sessions, registry, parsing, and execution.
src-tauri/src/claude - MCP wiring · Generates per-engagement MCP configuration and tool access for external integrations.
src-tauri/src/claude/mcp_config.rs - Auth layer · PKCE OAuth, redirect handling, identity server, token cache, refresh, and keychain-adjacent token flow.
src-tauri/src/oauth - Sync + storage · Workspace data boundaries for notes, files, vault access, Firestore metadata, and credential handling.
src-tauri/src/commands/vault.rs - Skills + memory · Structured assistant actions, memory commands, briefing, task parsing, and skill scaffolding/sync.
src-tauri/src/skills
Heartbeat service
Separate Python background system for autonomous signal collection and dispatch.
- Heartbeat app · Separate autonomous background package with collector, tick loop, outputs, and deployment scripts.
heartbeat/src/heartbeat - Signal collectors · Collects signals from Gmail, Calendar, Vault, Firestore tokens, Google auth, and state.
heartbeat/src/heartbeat/signals - Signal outputs · Dispatches actions to Firestore, Telegram, audit logs, and secrets destinations.
heartbeat/src/heartbeat/outputs
Operations memory
Local working memory, prompts, and right-hand automation content.
- Workspace files · Operations memory, prompts, drafts, and right-hand material used as local working context.
operations
External systems
Remote services and local OS boundaries used by the workspace.
- Firebase/Firestore · IKAROS identity, workspace metadata, schema-backed records, and cross-device sync plane.
- Google APIs · Calendar, Gmail, Drive, and OAuth-backed per-engagement Google services.
- OS boundaries · Keychain, filesystem, subprocesses, systemd, and desktop OS capabilities used by the app.
Connections 27
- UI shell → Layout frame: frames · The shell composes the shared layout chrome around all major views.
- UI shell → Work views: routes to · Routes user interaction into the main workspace views.
- UI shell → UI stores: reads state · Views are driven by client stores for engagement, tasks, Claude, and UI state.
- UI shell → Bridge hooks: uses hooks · The shell and views use hooks to connect to backend commands and streaming session state.
- Work views → Assistant panels: shows panels · Views expose task drawers, session details, compose flows, skill status, and heartbeat status.
- Bridge hooks → Bridge libs: calls · Hooks delegate to frontend wrappers around Tauri commands and shared helpers.
- Bridge libs → Command API: invokes · Frontend integration ultimately calls into the Rust command boundary.
- UI stores → Claude runtime: streams · Claude-related stores track session state, streaming output, and engagement context.
- Command API → Claude runtime: controls · The command layer launches and manages the embedded Claude subprocesses.
- Claude runtime → MCP wiring: loads tools · Claude sessions receive generated per-engagement MCP configuration.
- MCP wiring → Google APIs: binds to · MCP toolsets expose Gmail, Calendar, Drive, and other client integrations.
- Command API → Auth layer: authenticates · Commands expose OAuth and identity flows to the desktop app.
- Auth layer → Firebase/Firestore: syncs identity · IKAROS identity and token cache paths rely on Firebase and Firestore.
- Auth layer → OS boundaries: uses keychain · Tokens are protected through OS-specific secure storage and local redirect servers.
- Command API → Sync + storage: syncs data · The Rust backend handles calendar, Gmail, Drive, notes, vault, credentials, and task watching.
- Sync + storage → Firebase/Firestore: writes metadata · Remote metadata and cross-device records are stored in Firestore.
- Sync + storage → Google APIs: syncs services · Workspace sync flows reach Google Calendar, Gmail, and Drive.
- Sync + storage → OS boundaries: accesses files · Vault and local workspace file operations use the desktop filesystem.
- Command API → Skills + memory: executes · The backend exposes memory and skill-oriented commands for assistant workflows.
- Skills + memory → Workspace files: reads/writes · Structured memory and right-hand content live in the operations workspace.
- Heartbeat app → Signal collectors: collects · The background service gathers signals from external sources and local state.
- Heartbeat app → Signal outputs: dispatches · Collected signals are turned into outputs and side effects.
- Signal collectors → Google APIs: reads · Heartbeat can inspect Gmail and Calendar sources through Google integrations.
- Signal collectors → Firebase/Firestore: reads tokens · Token and state signals are pulled from Firestore-backed storage.
- Signal outputs → Firebase/Firestore: publishes · Outputs may be written back to Firestore for sync and auditability.
- Signal outputs → OS boundaries: uses secrets · The service can write logs, secrets, and integrate with systemd-managed deployment.
- Signal outputs → Workspace files: logs context · Audit and right-hand artifacts connect the autonomous service back to local working memory.