SAService Architect Back to designer
SAService ArchitectDocumentation
Code generation service -> cmd + internal + modules

Go 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 entrypoint

Starts the service with generated app/config packages.

internal/app/*.generated.goGenerated

Topology, runtime and transport initialization.

internal/app/service.goPreserved

Custom service extension point.

internal/functions/Preserved

Business stream functions, endpoint handlers and tests.

internal/config/config.generated.goGenerated

Typed runtime configuration model.

internal/config/config.goPreserved

Custom configuration additions.

internal/types/ + internal/serdes/Mixed

Service-local types and serialization.

go.mod + go.sumManaged

Standalone module dependency contract.

Dockerfile + Dockerfile.localManaged

Production 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/