SAService Architect Back to designer
SAService ArchitectDocumentation
Code generation pnpm workspace -> npm packages

TypeScript project

TypeScript generation creates independent npm packages joined by a root pnpm workspace.

When to use

Use this reference when generating, reviewing or operating a Service Architect project.

Behavior

  • src/main.generated.ts starts a generated service package.
  • src/internal/app and config contain runtime graph assembly and typed configuration.
  • src/internal/functions holds preserved business code.
  • test mirrors business functions and supplies ServiceLib test support.
  • User-named Modules expose generated ESM entrypoints for the public types, functions and connector schemas assigned to them.
  • Standalone package metadata and Compose/Docker files can be emitted for repository extraction.

TypeScript service directories

Important paths in each generated TypeScript service.

PathOwnershipDescription
package.jsonManaged

Package scripts, dependencies and ESM metadata.

src/main.generated.tsGenerated

Service process entrypoint.

src/internal/app/Generated

Runtime graph and connector construction.

src/internal/functions/Preserved

Business operators and endpoint handlers.

test/functions/Preserved

Business behavior tests.

tsconfig.json + tsconfig.test.jsonManaged

Production and test build graphs.

package.standalone.generated.jsonGenerated

Metadata for extracting an independent repository.

Dockerfile.standalone.generatedGenerated

Standalone multi-stage service image.

scripts/node-diagnostics.generated.mjsGenerated

Diagnostic reports and heap snapshots.

TypeScript service tree

<service-name>/
  package.json + tsconfig.json
  src/main.generated.ts
  src/internal/app/ + functions/
  test/functions/ + support/
  scripts/
  config/ + graph/ + docs/
  grafana/ + helm/