SAService Architect Back to designer
SAService ArchitectDocumentation
Code generation Designer graph -> downloadable project.zip

Code button and ZIP download

The Code button on the Project page generates the current graph and downloads the complete generated project as a ZIP archive.

When to use

Use this workflow when you are ready to turn the current designer model into a local source workspace or obtain a new archive for regeneration.

Behavior

  • Open the Project page and press Code. The designer serializes the current in-memory project model, including services, streams, links, types, connectors, endpoints, pools, modules and project settings.
  • The model is sent to the authenticated Service Architect generation endpoint with POST /service_architect/generateCode. A persistent progress dialog remains visible while generation is running.
  • ServiceGen validates the submitted graph and builds the complete multi-service workspace described in this section. The result is packaged as a ZIP archive.
  • The API response carries the archive body as base64 data together with response headers. The browser decodes it into an application/zip Blob and starts a normal file download automatically.
  • The download filename comes from the server Content-Disposition header. If that header does not provide a filename, the designer uses download.zip.
  • A successful download displays a success notification. Validation, generation, authentication and response errors are displayed in the designer instead of downloading an incomplete archive.

What happens after the click

The browser sends the same graph model represented by the Project DSL view. Generation happens on the Service Architect backend; the returned archive is then downloaded locally by the browser.

  • Serialize the current project model
  • Authenticate when required
  • Submit the model to ServiceGen
  • Validate the complete graph
  • Generate services, modules and operational assets
  • Package the workspace as ZIP
  • Decode the response and start the browser download

First download and regeneration

For a new project, extract the ZIP and use its root Makefile as the command entrypoint. For an existing project with implemented business files, keep the new ZIP intact and pass it to make merge-check and make merge so generator ownership rules can preserve user-owned files.

Code button workflow

Observable stages in the designer and downloaded result.

StageLocationDescription
CodeDesigner action

Starts generation from the current in-memory graph.

AuthenticationAccess

Opens sign-in when there is no authenticated session, then resumes the pending generation request.

Generating CodeProgress

Persistent modal shown while the generation request is running.

Graph validationBackend

Rejects invalid topology, contracts, settings or unsupported backend features before packaging.

ZIP packagingBackend

Creates the complete project directory tree selected by the graph.

Content-DispositionFilename

Supplies the archive filename; the browser falls back to download.zip when absent.

Browser downloadResult

Creates an application/zip Blob and downloads it through the browser download manager.

Using the downloaded archive

# First generation
unzip <generated-project>.zip
cd <generated-project>
make init
make build

# Regenerating an existing workspace
make merge-check ARCHIVE=../<generated-project>.zip
make merge ARCHIVE=../<generated-project>.zip
make merge-validate