How hotovo/aider-desk works
Project type and purpose
• AiderDesk is an Electron-based desktop application with a React/TypeScript frontend (the “renderer”), a Node.js/Electron backend (the “main” process), and auxiliary Python components.
• It wraps the Aider CLI and a Vercel AI-SDK agent in a GUI, manages multiple projects, sessions, context files, and exposes both a REST API and an MCP server for integration with external IDE plugins and tools.
File structure
• Top-level build & config: electron-builder.yml, tsconfig.*.json, postcss.config.js, tailwind.config.js, etc.
• src/renderer: React UI (App.tsx, components/, pages/, styles)
• src/preload: secure IPC bindings between renderer and main
• src/main: Electron main process
– startup (start-up.ts), auto-updater, IPC handlers, REST API controller, project/session/file-system managers, connector manager, logger, local store (store.ts + migrations)
– agent subfolder: agent orchestration via Vercel AI SDK, tool plugins, MCP client integration
– web-scrapper, utilities
• src/mcp-server: built-in MCP server entrypoint
• resources/connector: Python script used by IDE connector plugins (IntelliJ, VSCode)
• shared code: src/common (types, utils, locales)
• package.json & lock: dependency definitions
• docs/images, CHANGELOG.md, CONVENTIONS.md: documentation
README for additional insights
• Confirms the multi-project, session, context management, LLM provider abstraction, REST API endpoints on port 24337, built-in MCP server capabilities, and Python connector for IDE integration.
• Shows features: autonomous agent mode, tool-driven architecture via MCP, integrated diff viewer, cost tracking, etc.
a. Main components
– User Interface (Electron renderer / React)
– Preload layer (IPC bridge)
– Electron Main Process
• Startup & auto-update
• IPC handlers
• REST API Controller
• Project Manager & Session Manager
• File System Manager & Context Files Service
• Local Store (persistent sessions & settings)
• Agent Engine (Vercel AI SDK) with Tool Manager (MCP client)
• Connector Manager (launch Python connector for IDE plugins)
– Built-in MCP Server (src/mcp-server)
– Python Connector (resources/connector/connector.py)
– External LLM Providers (OpenAI, Anthropic, Gemini, Bedrock, etc.)
– External MCP Servers & Tools (web scrapper, doc lookup)
b. Relationships & data flows
– UI ↔ Preload ↔ Main via IPC
– Main ↔ Local Store (read/write sessions, settings)
– Main ↔ File System (project files, context files)
– Main ↔ Agent Engine → LLM Providers & MCP Tools
– Main ↔ REST API clients (external scripts or services)
– External IDE Plugins ↔ Python Connector ↔ Main’s REST API
– External MCP Clients ↔ Built-in MCP Server ↔ Main’s API
c. Architectural patterns & design principles
– Layered architecture: UI → IPC → Controllers & Services → Persistence
– Modular “agent” subsystem supporting multiple LLM providers via abstraction
– Extensibility via MCP: decoupling tool definitions from core logic
– Secure boundary between untrusted UI code and privileged main process via preload
– Local data migrations ensure backward compatibility in store
d. Key technologies & libraries
– Electron (main + renderer processes)
– React + TypeScript + Tailwind CSS (renderer)
– Vercel AI SDK for agent implementation
– Node.js for main, REST API, MCP server
– Python 3.9+ for IDE connector
– SQLite or file-based JSON store (via main/store)
– Model Context Protocol (MCP) for tool integration
Essential details without over-fragmenting
• Do not split every single .ts file—group by logical subsystems (UI, IPC, controllers, services, store, agent).
• Major feature (session management, context files, agent/mcp integration, REST API, connector) appears as a distinct node.