repowisetemporalio/temporal

Architecture of temporalio/temporal

temporalio/temporal is 3,156 source files holding 40,520 symbols across 17 modules, written mainly in Go, Shell, Makefile. The largest module is common, with 1,171 files, and 33 files are entry points into the dependency graph.

How temporal fits together

The server process starts from cmd/server/main.go, which is one of the repository's entry points. The service directory is the orchestration hub that coordinates history persistence logic, task execution and queue processing, and task matching. The client directory holds the client-facing RPC stubs for history, matching, frontend, admin, and operator, along with client-side routing and connection caching. The common directory supplies shared building blocks such as logging, metrics, dynamic configuration, RPC wiring, namespaces, and persistence glue that other parts reuse. The chasm directory defines the core data model and interfaces for typed components and archetypes used to build decoupled execution graphs. The schema directory embeds the schema filesystem and reads backend schema and visibility versions during database setup.

Largest modules

  • common: 1,171 files and 211,471 lines of code
  • service: 873 files and 317,751 lines of code
  • chasm: 223 files and 57,292 lines of code
  • tests: 199 files and 126,595 lines of code
  • tools: 136 files and 23,823 lines of code
  • schema: 130 files and 4,444 lines of code
  • client: 35 files and 4,693 lines of code
  • cmd: 28 files and 3,929 lines of code

Languages

By file count: Go 2,689 files, Shell 26 files, Makefile 2 files, Terraform 1 file.

Documentation

Repowise documents temporal in 4,306 pages generated from the source, 81 of them written explanations of the repository and its modules. Module guides include:

  • chasm/lib/activity: Activity Abstractions
  • service/history/api: Api Overview
  • common/effect: Async Effect Primitives

More on temporal: summary and FAQ, codebase overview, code health.

Related guide: Best dependency graph tools for monorepos