Documentation Index
Fetch the complete documentation index at: https://mintlify.com/pingdotgg/t3code/llms.txt
Use this file to discover all available pages before exploring further.
Workspace Overview
T3 Code uses a Bun workspace managed by Turbo for build orchestration. The monorepo is organized into apps and shared packages.Apps
/apps/server - Backend Server
Published as: t3 (npm package)
Purpose: Node.js WebSocket server that wraps Codex and manages provider sessions.
- Runtime: Node.js 24+
- Effects: Effect-TS for DI and error handling
- Database: @effect/sql-sqlite-bun
- WebSocket: ws library
- Processes: node-pty for terminals
- Bundled ESM:
dist/index.mjs - Includes web app assets (production)
/apps/web - Frontend UI
Published as: @t3tools/web (workspace-only)
Purpose: React web application for session control and conversation rendering.
- Framework: React 19
- Build Tool: Vite 8
- Routing: TanStack Router
- State: Zustand + TanStack Query
- Styling: Tailwind CSS 4
- Terminal: xterm.js
- Compiler: Babel React Compiler
- Static HTML/JS/CSS in
dist/ - Served by server in production
- Bundled in desktop app
/apps/desktop - Electron App
Published as: @t3tools/desktop (workspace-only)
Purpose: Native desktop wrapper with auto-updates.
- Platform: Electron 40
- Updates: electron-updater
- Build: tsdown
- Backend: Spawns
t3CLI
- macOS:
.dmg(arm64/x64) - Linux:
.AppImage - Windows: NSIS installer
/apps/marketing - Marketing Site
Published as: @t3tools/marketing (workspace-only)
Purpose: Marketing and documentation website.
package.json
Packages
/packages/contracts - Shared Schemas
Purpose: Effect/Schema definitions for all protocol types.
src/provider.ts
/packages/shared - Runtime Utilities
Purpose: Shared runtime code for server and web.
Build Scripts
/scripts - Build and Dev Tooling
| Script | Purpose |
|---|---|
dev-runner.ts | Manages Turbo watch mode and env vars |
build-desktop-artifact.ts | Builds platform-specific installers |
sync-vscode-icons.mjs | Syncs VSCode icon themes |
Workspace Configuration
package.json (Root)
effect- Effect-TS (smol fork)typescript- TypeScript compilervitest- Test runner@types/node- Node.js types
turbo.json - Build Pipeline
^build- Depends on dependencies’ build tasks@t3tools/contracts#build- Contracts must build first in dev
Dependency Graph
Build Order:packages/contracts(no dependencies)packages/shared(no dependencies)apps/web(depends on contracts, shared)apps/server(depends on contracts, shared, web)apps/desktop(depends on all)
Adding New Packages
Create a New App
Create a New Shared Package
Best Practices
Shared Logic
Extract duplicate logic into
packages/shared to avoid code smellType Safety
Use schemas from
contracts for all cross-boundary dataWorkspace Deps
Always use
workspace:* for internal dependenciesCatalog Versions
Use
catalog: for shared dependencies across packagesLong-term maintainability is a core priority. Don’t be afraid to refactor!
Next Steps
Testing
Learn how to write and run tests
Building
Build for production and distribution
