Understand the T3 Code workspace architecture
mainT3 Code is organized as a pnpm workspace driven by vite-plus (vp). The architecture is divided into apps, packages, and infra:
Apps
t3(apps/server): The core execution runtime and CLI. Handles orchestration, provider drivers, VCS, auth, and the HTTP/WebSocket surface.@t3tools/web(apps/web): React + Vite UI for web browsers.@t3tools/desktop(apps/desktop): Electron shell that manages desktop-scopedt3backends and SSH-managed remote environments via thet3code://protocol.@t3tools/mobile(apps/mobile): Expo/React Native client.@t3tools/marketing(apps/marketing): Astro-based marketing site.
Packages
@t3tools/contracts: Shared Effect Schema definitions (RPC, orchestration, auth scopes, etc.).@t3tools/shared: Framework-agnostic utilities (e.g.,DrainableWorker, git helpers, logging).@t3tools/client-runtime: Manages connection lifecycle, authorization, RPC sessions, and domain state. Shared by web and mobile.@t3tools/ssh: SSH config parsing, auth prompts, and tunnel/environment management.@t3tools/tailscale: Tailscale CLI wrapper.effect-acp: Implementation of the Agent Client Protocol (ACP).effect-codex-app-server: JSON-RPC client for thecodex app-serverprotocol.
Infrastructure
t3code-relay(infra/relay): Hosted relay (deployed with Alchemy) for environment discovery and mobile notifications. Note: Client traffic goes directly to the environment after connection, so the relay is not in the hot path.