Tech Stack: Effect, Electron & SQLite
Inside the pingdotgg/t3code TypeScript monorepo: Effect RPC over WebSockets, SQLite state, Electron, and Expo.
If you are a TypeScript developer planning to clone pingdotgg/t3code, inspect how an agent driver works, or contribute a PR, here is how the monorepo is organized and why those technologies were chosen.
1. Monorepo Directory Breakdown
T3 Code is structured as a full-stack TypeScript monorepo split across four applications (apps/) and shared internal packages (packages/):
t3code/
├─ apps/
│ ├─ server/ # Node.js / Bun control plane (Effect, WebSockets, SQLite, Git)
│ ├─ web/ # React + Vite browser UI
│ ├─ desktop/ # Electron shell wrapping the web UI and server runner
│ └─ mobile/ # Expo / React Native companion app (iOS & Android)
└─ packages/
├─ contracts/ # Shared RPC schemas and protocol contracts
└─ client-runtime/ # Shared client connection and state runtime
By isolating contracts and runtime state in packages/, the Web UI, Electron app, and mobile app all stay aligned with apps/server without duplicating protocol logic.
2. Why apps/server Leans Heavily on Effect
Reading apps/server, you will notice it is built around the Effect ecosystem and Effect RPC rather than a typical REST controller layout:
- Managing concurrent child processes cleanly: The server spawns and monitors multiple external CLI processes alongside Git worktree operations and WebSocket streams. Effect's structured concurrency, scoped resource cleanup, and typed error channels map well to long-running process orchestration.
- Type-safe Effect RPC over WebSockets: Agent output, tool approval prompts, and live diff updates are continuous bidirectional streams. Sharing Effect RPC contracts via
packages/contractskeeps server and client payloads checked end-to-end by TypeScript.
3. Local SQLite + WebSocket Streaming
- Embedded SQLite (
state.sqlite): Requiring external databases like Postgres would ruin the "runnpx t3@latestin 10 seconds" experience. Embedded SQLite stores thread records, event logs, settings, and remote pairing grants inside a single local file under~/.t3/userdata/, maintained witht3 doctor. - Real-time WebSocket sync: Because Desktop, Web, and Mobile can connect to the same server simultaneously, WebSocket streams ensure approving a tool call on your phone immediately reflects on your desktop screen.
4. License & Trademark Boundaries
Two distinct rules govern reuse of pingdotgg/t3code:
- Source Code (MIT License): You are free to inspect, fork, self-host, and submit upstream pull requests.
- Branding & Trademarks: Project names, logos, and trademarks are covered under separate terms—so if you distribute a public fork or derivative product, replace the official branding with your own.