generators — Code View¶
← Back to Container | ← Back to System
Component Information¶
| Field | Value |
|---|---|
| Component | generators |
| Container | Application |
| Type | module |
| Description | Generation stage of the AAC pipeline | Structurizr DSL Generator (Template-based) |
| --- |
Code Structure¶
Class Diagram¶

Code Elements¶
11 code element(s)
#### Functions ##### `run()` Execute the generation stage | Field | Value | | --- | --- | | **Type** | `function` | | **Visibility** | `public` | | **Async** | Yes || **Returns** | `Promiseimport("C:/Users/chris/git/archlette/src/core/types").PipelineContext — - Pipeline context with configuration, logging, and validated IR
---
##### `loadDefaultTheme()`
Load the default Structurizr theme from templates directory
| Field | Value |
| --- | --- |
| **Type** | `function` |
| **Visibility** | `private` |
| **Returns** | `string` - Theme DSL content as string || **Location** | `C:/Users/chris/git/archlette/src/generators/builtin/structurizr.ts:59` |
---
##### `structurizrGenerator()`
Generate Structurizr DSL from ArchletteIR
| Field | Value |
| --- | --- |
| **Type** | `function` |
| **Visibility** | `public` |
| **Returns** | `string` || **Location** | `C:/Users/chris/git/archlette/src/generators/builtin/structurizr.ts:75` |
**Parameters:**
- `ir`: z.infer- `node`: any
---
##### `prepareContainerData()`
Prepare container data with components, code, and relationships for template
| Field | Value |
| --- | --- |
| **Type** | `function` |
| **Visibility** | `private` |
| **Returns** | `any` || **Location** | `C:/Users/chris/git/archlette/src/generators/builtin/structurizr.ts:154` |
**Parameters:**
- `container`: z.infer- `ir`: z.infer
---
##### `prepareComponentView()`
Prepare component view data for template
| Field | Value |
| --- | --- |
| **Type** | `function` |
| **Visibility** | `private` |
| **Returns** | `{ containerId: any; viewName: string; relevantActors: any; components: any; }` || **Location** | `C:/Users/chris/git/archlette/src/generators/builtin/structurizr.ts:204` |
**Parameters:**
- `container`: z.infer- `ir`: z.infer
---
##### `prepareClassView()`
Prepare class view data for template
| Field | Value |
| --- | --- |
| **Type** | `function` |
| **Visibility** | `private` |
| **Returns** | `{ containerId: any; viewName: string; codeItems: any; }` || **Location** | `C:/Users/chris/git/archlette/src/generators/builtin/structurizr.ts:241` |
**Parameters:**
- `component`: z.infer- `ir`: z.infer
---
##### `generateAllActorRelationships()`
Generate all actor-related relationships
| Field | Value |
| --- | --- |
| **Type** | `function` |
| **Visibility** | `private` |
| **Returns** | `z.inferz.infer
---
##### `generateUniqueCodeName()`
Generate a unique name for a code item to avoid naming collisions
| Field | Value |
| --- | --- |
| **Type** | `function` |
| **Visibility** | `private` |
| **Returns** | `string` || **Location** | `C:/Users/chris/git/archlette/src/generators/builtin/structurizr.ts:303` |
**Parameters:**
- `code`: z.infer
---
##### `buildTechnologyString()`
Build technology string from relationship metadata
| Field | Value |
| --- | --- |
| **Type** | `function` |
| **Visibility** | `private` |
| **Returns** | `string` || **Location** | `C:/Users/chris/git/archlette/src/generators/builtin/structurizr.ts:341` |
**Parameters:**
- `rel`: z.infer
---
##### `sanitizeId()`
Sanitize ID for DSL (remove special characters, convert to valid identifier)
| Field | Value |
| --- | --- |
| **Type** | `function` |
| **Visibility** | `private` |
| **Returns** | `string` || **Location** | `C:/Users/chris/git/archlette/src/generators/builtin/structurizr.ts:357` |
**Parameters:**
- `id`: string
---
##### `escapeString()`
Escape special characters in strings for DSL
Structurizr DSL doesn't support \n escape sequences in strings,
so we replace newlines with spaces for cleaner output.
| Field | Value |
| --- | --- |
| **Type** | `function` |
| **Visibility** | `private` |
| **Returns** | `string` || **Location** | `C:/Users/chris/git/archlette/src/generators/builtin/structurizr.ts:367` |
**Parameters:**
- `str`: string
---