Skip to content

Monorepo Structure

Condrix is an NX monorepo using npm workspaces. All packages are TypeScript with ES modules.

condrix/
├── apps/ # Deployable applications
│ ├── core/ # Core agent runtime daemon
│ │ └── src/
│ │ ├── managers/ # Domain managers (workspace, agent, AI connection, etc.)
│ │ ├── providers/ # AI provider implementations (Claude, OpenAI)
│ │ ├── tools/ # Tool format adapters for multi-provider support
│ │ ├── services/ # Infrastructure services (tunnel, auth)
│ │ └── runtime.ts # Main entry point
│ ├── maestro/ # Orchestration service
│ │ └── src/
│ │ ├── managers/ # Core registry, relay, messaging
│ │ └── index.ts # Main entry point
│ ├── client-web/ # Web client (Vite + React)
│ │ └── src/
│ │ ├── components/ # React components
│ │ ├── stores/ # State management
│ │ └── App.tsx # Root component
│ ├── client-desktop/ # Desktop client (Tauri 2.0 wrapper)
│ │ ├── src/ # React frontend (shared with web)
│ │ └── src-tauri/ # Rust Tauri backend
│ ├── client-mobile/ # Mobile client (React Native / Expo)
│ ├── client-cli/ # Terminal client (Ink + Commander)
│ └── docs/ # Documentation site (VitePress)
├── libs/ # Shared libraries
│ ├── protocol/ # Message types, schemas, interfaces
│ │ └── src/
│ │ ├── messages/ # Message envelope definitions
│ │ ├── schemas/ # Validation schemas (including ai-connection.ts)
│ │ └── index.ts # Public API
│ ├── client-shared/ # Shared React hooks and stores
│ │ └── src/
│ │ ├── hooks/ # useCore, useWorkspace, useAgent, useConnections, etc.
│ │ └── stores/ # Multi-Core connection store
│ ├── client-components/ # Shared UI components (shadcn/ui style)
│ │ └── src/
│ │ ├── ui/ # Base components (Button, Dialog, etc.)
│ │ └── app-layout.tsx # Shared layout shell
│ ├── skills/ # Built-in agent skill definitions
│ └── mcp-configs/ # Pre-configured MCP server definitions
├── nx.json # NX workspace configuration
├── tsconfig.base.json # Base TypeScript config
├── package.json # Root package.json (workspaces + scripts)
└── docker-compose.yml # Docker deployment configuration

The headless agent runtime. Manages workspaces, AI sessions, terminals, files, and Git operations. Runs as a Node.js process exposing a WebSocket server.

Key files:

  • runtime.ts — Service initialization and WebSocket server setup
  • managers/ — Domain-specific managers (WorkspaceManager, AgentManager, AIConnectionManager, etc.)
  • managers/ai-connection-manager.ts — Manages AI connections, profiles, and provider credentials
  • providers/claude-provider.ts — Claude AI integration via CLI subprocess
  • providers/openai-provider.ts — OpenAI-compatible provider (OpenAI, Local, Custom endpoints)
  • tools/tool-format-adapter.ts — Translates tool definitions between provider formats

Central coordinator for multi-Core deployments. Handles Core registry, connection relay, and messaging bridges (Telegram, WhatsApp).

Browser-based UI built with React and Vite. Three-panel layout: Core tree sidebar, center chat/editor area, and right-side explorer/terminal panel.

Key technologies: React, Vite, Monaco Editor, xterm.js, Tailwind CSS v4, shadcn/ui components

Tauri 2.0 application that wraps the web client in a native window. Provides native OS integration (file system access, system tray, notifications) with a ~10MB binary size.

React Native (Expo) application for iOS and Android. Uses React 18 due to React Native peer dependency constraints.

Terminal-based client using Ink (React for terminals) and Commander for argument parsing. Provides a TUI experience for headless environments.

VitePress-powered documentation site for architecture docs and guides.

The most critical package. Defines all message types, schemas, and interfaces used for WebSocket communication. Every other package depends on this. Includes AI connection and profile schemas (schemas/ai-connection.ts) that define the shared types for multi-provider support.

Rule: This is the only library that other packages may import for shared types. Apps never import from each other — they communicate via the WebSocket protocol.

libs/client-shared — Shared Client Logic

Section titled “libs/client-shared — Shared Client Logic”

React hooks and state stores shared across all client applications (web, desktop, mobile). Includes the multi-Core connection store that manages simultaneous WebSocket connections and the useConnections hook for managing AI provider connections.

libs/client-components — Shared UI Components

Section titled “libs/client-components — Shared UI Components”

shadcn/ui-style components built with Radix UI, class-variance-authority (cva), and tailwind-merge. Provides the consistent design system across web and desktop clients.

Built-in agent skills (file operations, search, terminal commands, etc.) defined as pluggable modules.

Pre-configured Model Context Protocol server definitions that agents can use for extended tool access.

libs/protocol ◄── Foundation (no dependencies)
├── libs/skills ◄── Depends on: protocol
├── libs/mcp-configs ◄── Depends on: protocol
├── libs/client-shared ◄── Depends on: protocol
│ │
│ ├── libs/client-components ◄── Depends on: protocol, client-shared
│ │ │
│ │ ├── apps/client-web ◄── Depends on: protocol, client-shared, client-components
│ │ ├── apps/client-desktop ◄── Depends on: protocol, client-shared, client-components
│ │ └── apps/client-mobile ◄── Depends on: protocol, client-shared, client-components
│ │
│ └── apps/client-cli ◄── Depends on: protocol, client-shared
├── apps/core ◄── Depends on: protocol
└── apps/maestro ◄── Depends on: protocol

Key principle: Data flows through the protocol, not through direct imports. A client never imports from apps/core — it sends a WebSocket message defined in libs/protocol and the Core responds with another protocol message.

All packages extend tsconfig.base.json:

  • Strict mode enabled (strict: true)
  • ES modules throughout ("type": "module" in all package.json files)
  • Node packages use NodeNext module resolution and target ES2023
  • Client packages use Bundler module resolution (Vite handles the bundling)
  • No path aliases — npm workspaces handles cross-package resolution