Code generation
service -> cmd + internal + modulesGo project
Go generation produces small entrypoints, generated graph wiring and ordinary Go packages for business logic.
When to use
Use this reference when generating, reviewing or operating a Service Architect project.
Behavior
- cmd/service/main.go starts the generated service.
- internal/app/*generated.go materializes ServiceLib initialization, streams and connector wiring.
- internal/functions contains preserved business implementations and tests.
- internal/config separates generated configuration models from custom extensions.
- internal/types and internal/serdes contain service-local contracts.
- Every referenced Module is emitted under Module.name with its own go.mod; its actual shared type, function, protobuf and OpenAPI contents come from graph references.
Go service directories
Important paths in each generated Go service.
PathOwnershipDescription
cmd/service/main.goPreserved entrypointStarts the service with generated app/config packages.
internal/app/*.generated.goGeneratedTopology, runtime and transport initialization.
internal/app/service.goPreservedCustom service extension point.
internal/functions/PreservedBusiness stream functions, endpoint handlers and tests.
internal/config/config.generated.goGeneratedTyped runtime configuration model.
internal/config/config.goPreservedCustom configuration additions.
internal/types/ + internal/serdes/MixedService-local types and serialization.
go.mod + go.sumManagedStandalone module dependency contract.
Dockerfile + Dockerfile.localManagedProduction multi-stage and local debug image definitions.
Go service tree
<service-name>/
cmd/service/main.go
internal/app/service.generated.go
internal/functions/*.go
internal/config/
internal/types/ + internal/serdes/
config/ + graph/ + docs/
grafana/ + helm/