Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

workspace-layout.md

63 lines3.4 KB

1# Workspace layout
2​
3> For maintainers. Using T3 Code? See [docs/user](../user/).
4​
5A pnpm workspace driven by [vite-plus](https://vite.plus) (`vp`). See [scripts.md](./scripts.md) for
6the task commands.
7​
8## apps
9​
10- `apps/server` (`t3`): the execution runtime and the published CLI. Owns orchestration, provider
11 drivers, checkpointing, VCS, terminals, filesystem access, auth, and the HTTP + WebSocket surface.
12 Also serves the built web app.
13- `apps/web` (`@t3tools/web`): React + Vite UI. Consumes the shared client runtime and adds routing,
14 components, and web-specific platform layers.
15- `apps/desktop` (`@t3tools/desktop`): Electron shell. Supervises a desktop-scoped `t3` backend,
16 loads the web bundle over the `t3code://` protocol, and owns SSH-managed remote environments.
17- `apps/mobile` (`@t3tools/mobile`): Expo/React Native client. Same client runtime composition as
18 web, different platform layer and UI.
19- `apps/marketing` (`@t3tools/marketing`): Astro marketing site.
20​
21## packages
22​
23- `packages/contracts` (`@t3tools/contracts`): shared Effect Schema definitions. RPC group,
24 orchestration commands/events/read model, auth scopes, environment descriptors, settings.
25- `packages/shared` (`@t3tools/shared`): framework-agnostic utilities used by server and clients
26 (`DrainableWorker`, git and source-control helpers, relay auth and signing, DPoP, semver, logging,
27 observability, and more).
28- `packages/client-runtime` (`@t3tools/client-runtime`): connection lifecycle, authorization, RPC
29 session, environment registry, and Atom-based domain state shared by web and mobile. See its
30 [README](../../packages/client-runtime/README.md).
31- `packages/ssh` (`@t3tools/ssh`): SSH config parsing, auth prompts, command execution, and the
32 tunnel/environment manager behind desktop-managed SSH environments.
33- `packages/tailscale` (`@t3tools/tailscale`): Tailscale CLI wrapper, including the
34 `ensureTailscaleServe` / `disableTailscaleServe` serve lifecycle the server drives.
35- `packages/effect-acp` (`effect-acp`): Effect client and agent implementation of the Agent Client
36 Protocol, used by ACP-speaking provider drivers.
37- `packages/effect-codex-app-server` (`effect-codex-app-server`): Effect client for the
38 `codex app-server` JSON-RPC protocol.
39​
40## infra
41​
42- `infra/relay` (`t3code-relay`): the hosted T3 Connect relay, deployed with Alchemy. Handles
43 environment discovery, cloud-side records, and mobile notifications. It is not in the hot path;
44 after connect, client traffic goes directly to the environment. See
45 [t3-connect.md](./t3-connect.md).
46​
47## Other top-level directories
48​
49- `scripts/`: workspace tooling run through `vp run`. Dev runner, desktop artifact builds, release
50 helpers, mobile static checks and showcase capture, update-manifest merging.
51- `assets/`: brand and app icon sources per channel (`dev`, `nightly`, `prod`).
52- `patches/`: pnpm patches for pinned upstream dependencies.
53- `oxlint-plugin-t3code/`: repo-specific lint rules.
54- `experiments/`: throwaway prototypes. Not part of the shipped build.
55- `docs/`: this documentation tree.
56​
57## Import conventions
58​
59`@t3tools/shared` and `@t3tools/client-runtime` use explicit subpath exports with no barrel index and
60no root export. Import the narrow path (`@t3tools/shared/DrainableWorker`,
61`@t3tools/client-runtime/state/threads`) rather than the package root. Files that are not exported
62are implementation details. `@t3tools/contracts` does export a root alongside `./settings` and
63`./relay`.