|
| 1 | +{ |
| 2 | + "id": "t1code-onboarding", |
| 3 | + "title": "T1Code: Multi-Platform AI Coding Agent", |
| 4 | + "description": "A guided tour of the T1Code monorepo — a terminal-first, multi-platform UI for interacting with AI coding agents. Learn the architecture, key apps, shared packages, and how data flows from user input to provider sessions.", |
| 5 | + "version": "1.0.0", |
| 6 | + "steps": [ |
| 7 | + { |
| 8 | + "id": "overview", |
| 9 | + "title": "Welcome to T1Code", |
| 10 | + "description": "T1Code is a monorepo powering a terminal-first AI coding assistant with web and desktop clients. Built with Bun, Turbo, and TypeScript, it uses Effect for functional service composition and a schema-first contract design. Five apps and three shared packages make up the architecture.", |
| 11 | + "focusDirectory": "", |
| 12 | + "colorMode": "fileTypes" |
| 13 | + }, |
| 14 | + { |
| 15 | + "id": "tui-app", |
| 16 | + "title": "Terminal UI — The Primary Interface", |
| 17 | + "description": "The TUI is the flagship product built with OpenTUI and React. The main component handles rendering, while supporting modules manage keyboard behavior, responsive layout, composer submission, thread selection, and server supervision. This is where most user interaction happens.", |
| 18 | + "focusDirectory": "apps/tui", |
| 19 | + "colorMode": "fileTypes", |
| 20 | + "highlightLayers": [ |
| 21 | + { |
| 22 | + "id": "tui-entry", |
| 23 | + "name": "Entry & Core UI", |
| 24 | + "color": "#3b82f6", |
| 25 | + "items": [ |
| 26 | + { "path": "apps/tui/src/index.tsx", "type": "file" }, |
| 27 | + { "path": "apps/tui/src/ui.tsx", "type": "file" } |
| 28 | + ], |
| 29 | + "opacity": 0.7, |
| 30 | + "renderStrategy": "border" |
| 31 | + }, |
| 32 | + { |
| 33 | + "id": "tui-behavior", |
| 34 | + "name": "Behavior Modules", |
| 35 | + "color": "#f59e0b", |
| 36 | + "items": [ |
| 37 | + { "path": "apps/tui/src/keyboardBehavior.ts", "type": "file" }, |
| 38 | + { "path": "apps/tui/src/composerSubmit.ts", "type": "file" }, |
| 39 | + { "path": "apps/tui/src/threadSelection.ts", "type": "file" }, |
| 40 | + { "path": "apps/tui/src/serverSupervisor.ts", "type": "file" } |
| 41 | + ], |
| 42 | + "opacity": 0.7, |
| 43 | + "renderStrategy": "border" |
| 44 | + } |
| 45 | + ] |
| 46 | + }, |
| 47 | + { |
| 48 | + "id": "server-app", |
| 49 | + "title": "Server — The Brain", |
| 50 | + "description": "The server manages WebSocket connections, provider sessions, database persistence, Git integration, and terminal emulation. It uses Effect layers for dependency injection. The provider subprocess communicates via JSON-RPC, and domain events are projected to clients in real-time.", |
| 51 | + "focusDirectory": "apps/server", |
| 52 | + "colorMode": "fileTypes", |
| 53 | + "highlightLayers": [ |
| 54 | + { |
| 55 | + "id": "server-core", |
| 56 | + "name": "Core Server", |
| 57 | + "color": "#10b981", |
| 58 | + "items": [ |
| 59 | + { "path": "apps/server/src/index.ts", "type": "file" }, |
| 60 | + { "path": "apps/server/src/wsServer.ts", "type": "file" }, |
| 61 | + { "path": "apps/server/src/main.ts", "type": "file" }, |
| 62 | + { "path": "apps/server/src/serverLayers.ts", "type": "file" } |
| 63 | + ], |
| 64 | + "opacity": 0.7, |
| 65 | + "renderStrategy": "border" |
| 66 | + }, |
| 67 | + { |
| 68 | + "id": "server-domains", |
| 69 | + "name": "Domain Subsystems", |
| 70 | + "color": "#8b5cf6", |
| 71 | + "items": [ |
| 72 | + { "path": "apps/server/src/provider", "type": "directory" }, |
| 73 | + { "path": "apps/server/src/orchestration", "type": "directory" }, |
| 74 | + { "path": "apps/server/src/persistence", "type": "directory" }, |
| 75 | + { "path": "apps/server/src/git", "type": "directory" } |
| 76 | + ], |
| 77 | + "opacity": 0.7, |
| 78 | + "renderStrategy": "border" |
| 79 | + } |
| 80 | + ] |
| 81 | + }, |
| 82 | + { |
| 83 | + "id": "web-app", |
| 84 | + "title": "Web UI — Browser Client", |
| 85 | + "description": "The web app mirrors TUI functionality in the browser. It uses TanStack for navigation and server state, Zustand for client state, Lexical for rich text editing, and an embedded terminal emulator. Components, hooks, and utilities are cleanly separated.", |
| 86 | + "focusDirectory": "apps/web", |
| 87 | + "colorMode": "fileTypes", |
| 88 | + "highlightLayers": [ |
| 89 | + { |
| 90 | + "id": "web-core", |
| 91 | + "name": "Core & State", |
| 92 | + "color": "#ec4899", |
| 93 | + "items": [ |
| 94 | + { "path": "apps/web/src/main.tsx", "type": "file" }, |
| 95 | + { "path": "apps/web/src/store.ts", "type": "file" }, |
| 96 | + { "path": "apps/web/src/router.ts", "type": "file" }, |
| 97 | + { "path": "apps/web/src/wsTransport.ts", "type": "file" } |
| 98 | + ], |
| 99 | + "opacity": 0.7, |
| 100 | + "renderStrategy": "border" |
| 101 | + }, |
| 102 | + { |
| 103 | + "id": "web-structure", |
| 104 | + "name": "UI Structure", |
| 105 | + "color": "#06b6d4", |
| 106 | + "items": [ |
| 107 | + { "path": "apps/web/src/components", "type": "directory" }, |
| 108 | + { "path": "apps/web/src/hooks", "type": "directory" }, |
| 109 | + { "path": "apps/web/src/lib", "type": "directory" } |
| 110 | + ], |
| 111 | + "opacity": 0.7, |
| 112 | + "renderStrategy": "border" |
| 113 | + } |
| 114 | + ] |
| 115 | + }, |
| 116 | + { |
| 117 | + "id": "desktop-app", |
| 118 | + "title": "Desktop — Electron Wrapper", |
| 119 | + "description": "The desktop app wraps the web UI for native distribution. It handles window management, inter-process communication, auto-updates, and shell environment syncing. Lightweight by design — most logic lives in the server and web layers.", |
| 120 | + "focusDirectory": "apps/desktop", |
| 121 | + "colorMode": "fileTypes", |
| 122 | + "highlightLayers": [ |
| 123 | + { |
| 124 | + "id": "desktop-core", |
| 125 | + "name": "Desktop Entry & Updates", |
| 126 | + "color": "#f97316", |
| 127 | + "items": [ |
| 128 | + { "path": "apps/desktop/src/main.ts", "type": "file" }, |
| 129 | + { "path": "apps/desktop/src/preload.ts", "type": "file" }, |
| 130 | + { "path": "apps/desktop/src/updateMachine.ts", "type": "file" } |
| 131 | + ], |
| 132 | + "opacity": 0.7, |
| 133 | + "renderStrategy": "border" |
| 134 | + } |
| 135 | + ] |
| 136 | + }, |
| 137 | + { |
| 138 | + "id": "shared-packages", |
| 139 | + "title": "Shared Packages — The Glue", |
| 140 | + "description": "Three packages enforce consistency across apps. Contracts defines all cross-boundary schemas and types. Shared provides runtime utilities for Git, shell, networking, and logging. Client-Core holds reusable client logic for session management, transport, and ID generation.", |
| 141 | + "focusDirectory": "packages", |
| 142 | + "colorMode": "fileTypes", |
| 143 | + "highlightLayers": [ |
| 144 | + { |
| 145 | + "id": "contracts", |
| 146 | + "name": "Contracts (Schemas & Types)", |
| 147 | + "color": "#3b82f6", |
| 148 | + "items": [ |
| 149 | + { "path": "packages/contracts", "type": "directory" } |
| 150 | + ], |
| 151 | + "opacity": 0.7, |
| 152 | + "renderStrategy": "border" |
| 153 | + }, |
| 154 | + { |
| 155 | + "id": "shared", |
| 156 | + "name": "Shared (Runtime Utils)", |
| 157 | + "color": "#10b981", |
| 158 | + "items": [ |
| 159 | + { "path": "packages/shared", "type": "directory" } |
| 160 | + ], |
| 161 | + "opacity": 0.7, |
| 162 | + "renderStrategy": "border" |
| 163 | + }, |
| 164 | + { |
| 165 | + "id": "client-core", |
| 166 | + "name": "Client-Core (Client Logic)", |
| 167 | + "color": "#f59e0b", |
| 168 | + "items": [ |
| 169 | + { "path": "packages/client-core", "type": "directory" } |
| 170 | + ], |
| 171 | + "opacity": 0.7, |
| 172 | + "renderStrategy": "border" |
| 173 | + } |
| 174 | + ] |
| 175 | + }, |
| 176 | + { |
| 177 | + "id": "data-flow", |
| 178 | + "title": "Data Flow: User to Provider", |
| 179 | + "description": "User input flows from the terminal or browser client via WebSocket to the server. The server spawns a provider subprocess to handle AI sessions. Provider events stream back through the orchestration layer as domain events, get persisted to the database, and are pushed to all connected clients in real-time.", |
| 180 | + "focusDirectory": "", |
| 181 | + "colorMode": "fileTypes", |
| 182 | + "highlightLayers": [ |
| 183 | + { |
| 184 | + "id": "client-layer", |
| 185 | + "name": "Client Layer (Input)", |
| 186 | + "color": "#3b82f6", |
| 187 | + "items": [ |
| 188 | + { "path": "apps/tui", "type": "directory" }, |
| 189 | + { "path": "apps/web", "type": "directory" } |
| 190 | + ], |
| 191 | + "opacity": 0.5, |
| 192 | + "renderStrategy": "border" |
| 193 | + }, |
| 194 | + { |
| 195 | + "id": "server-layer", |
| 196 | + "name": "Server Layer (Processing)", |
| 197 | + "color": "#10b981", |
| 198 | + "items": [ |
| 199 | + { "path": "apps/server", "type": "directory" } |
| 200 | + ], |
| 201 | + "opacity": 0.5, |
| 202 | + "renderStrategy": "border" |
| 203 | + }, |
| 204 | + { |
| 205 | + "id": "contract-layer", |
| 206 | + "name": "Contracts (Type Safety)", |
| 207 | + "color": "#f59e0b", |
| 208 | + "items": [ |
| 209 | + { "path": "packages/contracts", "type": "directory" } |
| 210 | + ], |
| 211 | + "opacity": 0.5, |
| 212 | + "renderStrategy": "border" |
| 213 | + } |
| 214 | + ] |
| 215 | + }, |
| 216 | + { |
| 217 | + "id": "build-and-config", |
| 218 | + "title": "Build System & Configuration", |
| 219 | + "description": "Turbo orchestrates builds across the monorepo with dependency-aware pipelines. Bun serves as the package manager and runtime. TypeScript strict mode is enforced via a shared base config. Oxlint and Oxfmt handle linting and formatting. Dedicated scripts provide build and deployment utilities.", |
| 220 | + "focusDirectory": "", |
| 221 | + "colorMode": "fileTypes", |
| 222 | + "highlightLayers": [ |
| 223 | + { |
| 224 | + "id": "build-config", |
| 225 | + "name": "Build & Config Files", |
| 226 | + "color": "#8b5cf6", |
| 227 | + "items": [ |
| 228 | + { "path": "turbo.json", "type": "file" }, |
| 229 | + { "path": "tsconfig.base.json", "type": "file" }, |
| 230 | + { "path": "package.json", "type": "file" }, |
| 231 | + { "path": "vitest.config.ts", "type": "file" } |
| 232 | + ], |
| 233 | + "opacity": 0.7, |
| 234 | + "renderStrategy": "border" |
| 235 | + }, |
| 236 | + { |
| 237 | + "id": "scripts-dir", |
| 238 | + "name": "Build Scripts", |
| 239 | + "color": "#ec4899", |
| 240 | + "items": [ |
| 241 | + { "path": "scripts", "type": "directory" } |
| 242 | + ], |
| 243 | + "opacity": 0.7, |
| 244 | + "renderStrategy": "border" |
| 245 | + } |
| 246 | + ] |
| 247 | + }, |
| 248 | + { |
| 249 | + "id": "full-picture", |
| 250 | + "title": "The Full Picture", |
| 251 | + "description": "T1Code is a terminal-first, multi-platform AI coding agent built on a clean monorepo architecture. Five apps share three packages through schema-first contracts. Effect powers the server's functional service layer. Start exploring from the terminal UI for the primary experience, or dive into the server to understand the provider orchestration engine.", |
| 252 | + "focusDirectory": "" |
| 253 | + } |
| 254 | + ] |
| 255 | +} |
0 commit comments