# beminee/configboundnet architecture

> Architecture diagram of the GitHub repository beminee/configboundnet, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/beminee/configboundnet
- Repository: https://github.com/beminee/configboundnet

## Overview

ConfigBoundNET is a .NET compile-time configuration generator. A developer annotates a partial configuration type; the Roslyn generator analyzes its shape and annotations, reports build-time diagnostics, and emits binding, validation, DI registration, and schema code. At host startup, generated registration binds configuration and validates options. The graph also shows the editor-fix branch and the generator’s internal model/emission layers. Edges are limited to README statements and source-index references; unsampled runtime wiring is not inferred.

Main entry points: [`src/ConfigBoundNET/ConfigBoundGenerator.cs`](https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET/ConfigBoundGenerator.cs) (Incremental generator), [`src/ConfigBoundNET/ConfigSectionModel.cs`](https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET/ConfigSectionModel.cs) (Section model), [`src/ConfigBoundNET/DiagnosticDescriptors.cs`](https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET/DiagnosticDescriptors.cs) (Diagnostic descriptors), [`src/ConfigBoundNET/SourceEmitter.cs`](https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET/SourceEmitter.cs) (Binding and validation emitter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_analysis["Analysis"]
  node_generator["Incremental generator"]
  node_attributes["Embedded attributes<br/>[AttributeSource.cs]"]
  node_tracking["Pipeline tracking<br/>[TrackingNames.cs]"]
end

subgraph group_emission["Code generation"]
  node_source_emitter["Binding and validation emitter<br/>[SourceEmitter.cs]"]
  node_schema_emitter["JSON schema emitter<br/>[SchemaEmitter.cs]"]
end

subgraph group_diagnostics["Diagnostics and fixes"]
  node_descriptors["Diagnostic descriptors"]
  node_empty_fix["Empty-name fix"]
  node_target_fix["Target-kind fix"]
  node_partial_fix["Partial-type fix"]
  node_nested_fix["Nested-type fix"]
  node_required_fix["Required-attribute fix"]
end

subgraph group_model["Generator internals"]
  node_section_model["Section model"]
  node_annotation_model["Annotation model"]
  node_equatable["Equatable collections<br/>[EquatableArray.cs]"]
  node_section_names["Section-name helper"]
end

node_developer(("Application developer"))
node_roslyn(("Roslyn generator host"))
node_config["Configuration source"]
node_generated["Generated application code"]
node_host["Application host"]

node_developer -->|"annotates types"| node_generator
node_roslyn -.->|"runs"| node_generator
node_generator -->|"emits attributes"| node_attributes
node_generator -->|"names pipeline steps"| node_tracking
node_generator -.->|"builds models"| node_section_model
node_generator -->|"emits binding code"| node_source_emitter
node_generator -->|"emits schemas"| node_schema_emitter
node_section_model -->|"captures annotations"| node_annotation_model
node_section_model -->|"uses"| node_equatable
node_section_model -->|"infers names"| node_section_names
node_section_model -->|"creates diagnostics"| node_descriptors
node_source_emitter -->|"reads model"| node_section_model
node_source_emitter -->|"emits checks"| node_annotation_model
node_source_emitter -->|"uses"| node_equatable
node_schema_emitter -->|"reads model"| node_section_model
node_schema_emitter -->|"reports diagnostics"| node_descriptors
node_empty_fix -->|"fixes diagnostic"| node_descriptors
node_empty_fix -->|"infers name"| node_section_names
node_target_fix -->|"fixes diagnostic"| node_descriptors
node_partial_fix -->|"fixes diagnostic"| node_descriptors
node_nested_fix -->|"fixes diagnostic"| node_descriptors
node_required_fix -->|"fixes diagnostic"| node_descriptors
node_generator -->|"produces"| node_generated
node_generated -->|"binds and validates"| node_config
node_host -->|"registers options"| node_generated

click node_generator "https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET/ConfigBoundGenerator.cs"
click node_attributes "https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET/AttributeSource.cs"
click node_tracking "https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET/TrackingNames.cs"
click node_section_model "https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET/ConfigSectionModel.cs"
click node_annotation_model "https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET/DataAnnotationModel.cs"
click node_equatable "https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET/EquatableArray.cs"
click node_section_names "https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET/SectionNameHelper.cs"
click node_source_emitter "https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET/SourceEmitter.cs"
click node_schema_emitter "https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET/SchemaEmitter.cs"
click node_descriptors "https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET/DiagnosticDescriptors.cs"
click node_empty_fix "https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET.CodeFixes/CodeFixes/EmptySectionNameCodeFix.cs"
click node_target_fix "https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET.CodeFixes/CodeFixes/InvalidTargetKindCodeFix.cs"
click node_partial_fix "https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET.CodeFixes/CodeFixes/MustBePartialCodeFix.cs"
click node_nested_fix "https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET.CodeFixes/CodeFixes/NestedTypeCodeFix.cs"
click node_required_fix "https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET.CodeFixes/CodeFixes/RedundantRequiredCodeFix.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_generator,node_attributes,node_tracking toneBlue
class node_source_emitter,node_schema_emitter toneAmber
class node_descriptors,node_empty_fix,node_target_fix,node_partial_fix,node_nested_fix,node_required_fix toneMint
class node_section_model,node_annotation_model,node_equatable,node_section_names toneRose
class node_developer,node_roslyn,node_config,node_generated,node_host toneIndigo
```

## Components

### Analysis

- [Incremental generator](https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET/ConfigBoundGenerator.cs): `src/ConfigBoundNET/ConfigBoundGenerator.cs`
- [Embedded attributes](https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET/AttributeSource.cs): `src/ConfigBoundNET/AttributeSource.cs`
- [Pipeline tracking](https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET/TrackingNames.cs): `src/ConfigBoundNET/TrackingNames.cs`

### Code generation

- [Binding and validation emitter](https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET/SourceEmitter.cs): `src/ConfigBoundNET/SourceEmitter.cs`
- [JSON schema emitter](https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET/SchemaEmitter.cs): `src/ConfigBoundNET/SchemaEmitter.cs`

### Diagnostics and fixes

- [Diagnostic descriptors](https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET/DiagnosticDescriptors.cs): `src/ConfigBoundNET/DiagnosticDescriptors.cs`
- [Empty-name fix](https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET.CodeFixes/CodeFixes/EmptySectionNameCodeFix.cs): `src/ConfigBoundNET.CodeFixes/CodeFixes/EmptySectionNameCodeFix.cs`
- [Target-kind fix](https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET.CodeFixes/CodeFixes/InvalidTargetKindCodeFix.cs): `src/ConfigBoundNET.CodeFixes/CodeFixes/InvalidTargetKindCodeFix.cs`
- [Partial-type fix](https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET.CodeFixes/CodeFixes/MustBePartialCodeFix.cs): `src/ConfigBoundNET.CodeFixes/CodeFixes/MustBePartialCodeFix.cs`
- [Nested-type fix](https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET.CodeFixes/CodeFixes/NestedTypeCodeFix.cs): `src/ConfigBoundNET.CodeFixes/CodeFixes/NestedTypeCodeFix.cs`
- [Required-attribute fix](https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET.CodeFixes/CodeFixes/RedundantRequiredCodeFix.cs): `src/ConfigBoundNET.CodeFixes/CodeFixes/RedundantRequiredCodeFix.cs`

### Generator internals

- [Section model](https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET/ConfigSectionModel.cs): `src/ConfigBoundNET/ConfigSectionModel.cs`
- [Annotation model](https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET/DataAnnotationModel.cs): `src/ConfigBoundNET/DataAnnotationModel.cs`
- [Equatable collections](https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET/EquatableArray.cs): `src/ConfigBoundNET/EquatableArray.cs`
- [Section-name helper](https://github.com/beminee/configboundnet/blob/main/src/ConfigBoundNET/SectionNameHelper.cs): `src/ConfigBoundNET/SectionNameHelper.cs`

### Other components

- **Application developer**
- **Roslyn generator host**
- **Configuration source**
- **Generated application code**
- **Application host**

## Connections

- Application developer → Incremental generator: annotates types (evidence: `README.md`)
- Roslyn generator host → Incremental generator: runs
- Incremental generator → Embedded attributes: emits attributes (evidence: `src/ConfigBoundNET/ConfigBoundGenerator.cs`)
- Incremental generator → Pipeline tracking: names pipeline steps (evidence: `src/ConfigBoundNET/ConfigBoundGenerator.cs`)
- Incremental generator → Section model: builds models
- Incremental generator → Binding and validation emitter: emits binding code (evidence: `src/ConfigBoundNET/ConfigBoundGenerator.cs`)
- Incremental generator → JSON schema emitter: emits schemas (evidence: `src/ConfigBoundNET/ConfigBoundGenerator.cs`)
- Section model → Annotation model: captures annotations (evidence: `src/ConfigBoundNET/ConfigSectionModel.cs`)
- Section model → Equatable collections: uses (evidence: `src/ConfigBoundNET/ConfigSectionModel.cs`)
- Section model → Section-name helper: infers names (evidence: `src/ConfigBoundNET/ConfigSectionModel.cs`)
- Section model → Diagnostic descriptors: creates diagnostics (evidence: `src/ConfigBoundNET/ConfigSectionModel.cs`)
- Binding and validation emitter → Section model: reads model (evidence: `src/ConfigBoundNET/SourceEmitter.cs`)
- Binding and validation emitter → Annotation model: emits checks (evidence: `src/ConfigBoundNET/SourceEmitter.cs`)
- Binding and validation emitter → Equatable collections: uses (evidence: `src/ConfigBoundNET/SourceEmitter.cs`)
- JSON schema emitter → Section model: reads model (evidence: `src/ConfigBoundNET/SchemaEmitter.cs`)
- JSON schema emitter → Diagnostic descriptors: reports diagnostics (evidence: `src/ConfigBoundNET/SchemaEmitter.cs`)
- Empty-name fix → Diagnostic descriptors: fixes diagnostic (evidence: `src/ConfigBoundNET.CodeFixes/CodeFixes/EmptySectionNameCodeFix.cs`)
- Empty-name fix → Section-name helper: infers name (evidence: `src/ConfigBoundNET.CodeFixes/CodeFixes/EmptySectionNameCodeFix.cs`)
- Target-kind fix → Diagnostic descriptors: fixes diagnostic (evidence: `src/ConfigBoundNET.CodeFixes/CodeFixes/InvalidTargetKindCodeFix.cs`)
- Partial-type fix → Diagnostic descriptors: fixes diagnostic (evidence: `src/ConfigBoundNET.CodeFixes/CodeFixes/MustBePartialCodeFix.cs`)
- Nested-type fix → Diagnostic descriptors: fixes diagnostic (evidence: `src/ConfigBoundNET.CodeFixes/CodeFixes/NestedTypeCodeFix.cs`)
- Required-attribute fix → Diagnostic descriptors: fixes diagnostic (evidence: `src/ConfigBoundNET.CodeFixes/CodeFixes/RedundantRequiredCodeFix.cs`)
- Incremental generator → Generated application code: produces (evidence: `README.md`)
- Generated application code → Configuration source: binds and validates (evidence: `README.md`)
- Application host → Generated application code: registers options (evidence: `README.md`)
