This is the source code of Chan, the modern engineer's IDE. Download binaries from chan.app or build locally using the Makefile here.
Contributors and agents: start at .agents/README.md; the practical guide is CONTRIBUTING.md.
The architecture is documented next to the code it describes. design.md is the whole-system reference (crate boundaries, runtime topology, bind vs tunnel, the devserver); each crate or surface below carries its own design of record.
Core:
- crates/chan - the CLI binary: dispatch, process lifecycle, service supervision, self-upgrade.
- crates/chan-workspace - the core: filesystem gates, workspace registry, search, graph, state placement, locking.
- crates/chan-server - the serving layer: per-tenant HTTP/WS, SPA embed, MCP host, devserver builder.
- crates/chan-library - multi-tenant orchestration:
WorkspaceHost, the window registry, the launcher slot. - crates/chan-shell -
cs: the control-socket wire contract and the client that speaks it. - crates/chan-llm - the MCP tool sandbox exposed to external agent CLIs.
- crates/chan-systemd - the systemd boundary: notify, watchdog, fdstore, unit render and classification.
- crates/chan-report - repository reports: the walker, the JSONL schema, the COCOMO model.
- crates/fetch-models - build-only helper that produces the embedded-model tarball.
Desktop and web:
- desktop - the Tauri shell: windows, exact-origin trust, native IPC.
- web/packages/workspace-app/src - the web frontend: the two SPAs, serving topology, the color system.
- web/packages/workspace-app/src/editor - the CM6 editor surface.
- web/packages/launcher - the launcher SPA and its three-surface serving.
Tunnel:
- crates/chan-tunnel-proto - the shared wire contracts.
- crates/chan-tunnel-client - the dial-side client embedded by
chan devserver. - crates/chan-tunnel-server - the terminator embedded by the gateway.
- crates/chan-revtunnel - reverse port forwarding from a devserver to the connected desktop (
cs tunnel); distinct from the gateway tunnel.
Gateway (separate Cargo workspace; the chan.app account, sign-in, and proxy surface):
- gateway/crates/identity - sign-in, PATs, discovery, desktop entry: the public account surface (gw.{domain}).
- gateway/crates/profile - the authoritative user store.
- gateway/crates/devserver-proxy - the public data-plane edge for tunneled devservers ({proxy}.usr.{domain}).
- gateway/crates/devserver-control - the fleet control plane: proxy directory, admission, kill routing.
- gateway/crates/gateway-common - the contracts the gateway services share.
- gateway/crates/admin - the operator CLI.