CoreLayer Docs
Architecture

System Overview

CoreLayer architecture: three-layer proxy model.

CoreLayer uses a three-layer proxy model that separates the user interface, business logic, and data access.

Architecture Diagram

┌─────────────────────────────────────────────┐
│              Tauri Desktop App              │
│  ┌───────────────────────────────────────┐  │
│  │     React 19 + Vite + Tailwind 4     │  │
│  │         (Frontend UI Layer)           │  │
│  └──────────────┬────────────────────────┘  │
│                 │ Tauri IPC                  │
│  ┌──────────────┴────────────────────────┐  │
│  │      Rust Backend (lib.rs)            │  │
│  │   Daemon Supervisor + HTTP Proxy      │  │
│  └──────────────┬────────────────────────┘  │
└─────────────────┼───────────────────────────┘
                  │ HTTP
┌─────────────────┴───────────────────────────┐
│          Node.js Daemon (Hono)              │
│  ┌──────────┐ ┌──────────┐ ┌─────────────┐ │
│  │  Model   │ │   Tool   │ │ Permission  │ │
│  │ Gateway  │ │ Registry │ │   Guard     │ │
│  └──────────┘ └──────────┘ └─────────────┘ │
│  ┌──────────┐ ┌──────────┐ ┌─────────────┐ │
│  │   MCP    │ │ Runtime  │ │  Storage    │ │
│  │  Client  │ │  Core    │ │   Layer     │ │
│  └──────────┘ └──────────┘ └─────────────┘ │
└─────────────────────────────────────────────┘
         │              │              │
    MCP Servers    AI Providers    Database

Layer Responsibilities

Frontend (React)

  • User interface rendering
  • State management (Zustand)
  • User input handling
  • Display of AI responses and tool results

Tauri Bridge (Rust)

  • IPC between frontend and daemon
  • Daemon lifecycle management (start, stop, restart)
  • Native system integration (file system, notifications)
  • HTTP proxy to daemon

Daemon (Node.js)

  • AI orchestration and model routing
  • Tool registration and execution
  • Permission checking and audit logging
  • MCP server management
  • Data persistence

Communication Flow

User types message
  → React frontend captures input
  → Tauri IPC sends to Rust backend
  → Rust proxies HTTP to daemon
  → Daemon processes with Jarvis
  → Response streams back through the same path
  → Frontend renders response

Package Architecture

The daemon consumes shared packages from the monorepo:

PackageRole
@jarvis/typesShared TypeScript types
@jarvis/model-gatewayMulti-provider model routing
@jarvis/mcp-clientMCP server connections
@jarvis/tool-registryTool management
@jarvis/permission-guardSafety system
@jarvis/runtime-coreRuntime management
@jarvis/runtime-protocolProtocol definitions
@jarvis/execution-environmentExecution abstraction

Next Steps

On this page