How temporalio/samples-go works
Project type and purpose
• This is neither a monolithic web app nor a mobile project, but a collection of sample Workflow applications demonstrating the capabilities of the Temporal Server via the Temporal Go SDK.
• Each subdirectory under the root (e.g., helloworld, expense, child-workflow, etc.) is an independent sample illustrating one feature or pattern (Activity retries, child Workflows, signals, queries, DataConverters, interceptors, cron/schedules, sessions, context propagation, OpenTelemetry, etc.).
File structure
• Top-level files & dirs:
• .github/, .gitignore, Makefile, docker-compose.yml, go.mod – build and CI/CD configuration
• README.md – high-level repo overview and sample index
• dozens of sample directories, each with the same three-tier pattern:
• <sample>/starter/ – the client process that starts Workflows, sends signals/queries/updates or cancels
• <sample>/worker/ – the worker process that polls the Temporal Server task queue, executes Workflow logic & Activities
• sample-specific Go files (workflow.go, activities.go, data_converter.go, interceptor.go, etc.) and tests
• Shared components: some samples run a dedicated Codec Server (e.g., codec-server) to offload payload encoding/decoding, or embed OIDC/mTLS logic for authentication.
Insights from README
• The repo runs against a Temporal Server (local via docker-compose or remote), which itself has a frontend, matching, history, and worker services backed by a persistence database (MySQL/Cassandra).
• Each sample shows a distinct SDK feature or architectural pattern (async completion, cron vs. schedule, saga, polling, dynamic Workflows, Nexus cross-namespace calls, etc.).