Class: RiviereBuilder
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:72
Programmatically construct Riviere architecture graphs.
Thin facade preserving the flat public API while delegating to focused domain classes internally.
Riviere-role
aggregate
Properties
graphPath
readonlygraphPath:string
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:75
Methods
addApi()
addApi(
input):APIComponent
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:138
Adds an API component to the graph.
Parameters
input
API component properties
Returns
APIComponent
The created API component
addCustom()
addCustom(
input):CustomComponent
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:197
Adds a Custom component to the graph.
Parameters
input
Custom component properties
Returns
CustomComponent
The created Custom component
addDomain()
addDomain(
input):void
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:118
Adds a new domain to the graph.
Parameters
input
Domain name and description
Returns
void
addDomainOp()
addDomainOp(
input):DomainOpComponent
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:158
Adds a DomainOp component to the graph.
Parameters
input
DomainOp component properties
Returns
DomainOpComponent
The created DomainOp component
addEvent()
addEvent(
input):EventComponent
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:168
Adds an Event component to the graph.
Parameters
input
Event component properties
Returns
EventComponent
The created Event component
addEventHandler()
addEventHandler(
input):EventHandlerComponent
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:178
Adds an EventHandler component to the graph.
Parameters
input
EventHandler component properties
Returns
EventHandlerComponent
The created EventHandler component
addSource()
addSource(
source):void
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:109
Adds an additional source repository to the graph.
Parameters
source
SourceInfo
Source repository information
Returns
void
addUI()
addUI(
input):UIComponent
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:128
Adds a UI component to the graph.
Parameters
input
UI component properties
Returns
UIComponent
The created UI component
addUseCase()
addUseCase(
input):UseCaseComponent
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:148
Adds a UseCase component to the graph.
Parameters
input
UseCase component properties
Returns
UseCaseComponent
The created UseCase component
build()
build():
RiviereGraph
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:301
Validates and returns the completed graph.
Returns
RiviereGraph
Valid RiviereGraph object
defineCustomType()
defineCustomType(
input):void
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:187
Defines a custom component type for the graph.
Parameters
input
Custom type definition
Returns
void
enrichComponent()
enrichComponent(
id,enrichment):void
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:207
Enriches a DomainOp component with additional domain details.
Parameters
id
string
The component ID to enrich
enrichment
State changes and business rules to add
Returns
void
link()
link(
input):Link
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:228
Creates a link between two components in the graph.
Parameters
input
Link properties including source, target, and type
Returns
Link
The created link
linkExternal()
linkExternal(
input):ExternalLink
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:238
Creates a link from a component to an external system.
Parameters
input
External link properties including target system info
Returns
ExternalLink
The created external link
nearMatches()
nearMatches(
query,options?):NearMatchResult[]
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:218
Finds components similar to a query for error recovery.
Parameters
query
Search criteria including partial ID, name, type, or domain
options?
Optional matching thresholds and limits
Returns
Array of similar components with similarity scores
orphans()
orphans():
string[]
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:274
Returns IDs of components with no incoming or outgoing links.
Returns
string[]
Array of orphaned component IDs
query()
query():
RiviereQuery
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:283
Returns a RiviereQuery instance for the current graph state.
Returns
RiviereQuery
RiviereQuery instance for the current graph
serialize()
serialize():
string
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:292
Serializes the current graph state as a JSON string.
Returns
string
JSON string representation of the graph
stats()
stats():
BuilderStats
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:256
Returns statistics about the current graph state.
Returns
Counts of components by type, domains, and links
validate()
validate():
ValidationResult
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:265
Runs full validation on the graph.
Returns
ValidationResult
Validation result with valid flag and error details
warnings()
warnings():
BuilderWarning[]
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:247
Returns non-fatal issues found in the graph.
Returns
Array of warning objects with type and message
new()
staticnew(options,graphPath):RiviereBuilder
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:100
Creates a new builder with initial configuration.
Parameters
options
Configuration including sources and domains
graphPath
string = ''
File path where the graph will be persisted
Returns
RiviereBuilder
A new RiviereBuilder instance
resume()
staticresume(graph,graphPath):RiviereBuilder
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:89
Restores a builder from a previously serialized graph.
Parameters
graph
RiviereGraph
A valid RiviereGraph to resume from
graphPath
string = ''
File path where the graph is persisted
Returns
RiviereBuilder
A new RiviereBuilder with the graph state restored