# succulent-tortoise/barf architecture

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

- Interactive diagram: https://gitdiagram.com/succulent-tortoise/barf
- Repository: https://github.com/succulent-tortoise/barf

## Overview

This is a small Python YAML configuration-loading library. A caller may request configuration loading; the loader uses defaults when no usable file is provided, parses YAML when present, validates the root mapping, and recursively merges overrides. The sole runtime module is excerpted; no README or broader application workflow is present.

Main entry points: [`src/config_loader.py`](https://github.com/succulent-tortoise/barf/blob/main/src/config_loader.py) (Config loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_caller(("Library caller"))
node_yaml_file["YAML config file"]
node_loader["Config loader<br/>[config_loader.py]"]
node_defaults["Default settings<br/>[config_loader.py]"]
node_deep_merge["Recursive merge<br/>[config_loader.py]"]
node_yaml_parser["PyYAML parser"]
node_config_error["Config errors<br/>[config_loader.py]"]
node_resolved_config["Resolved config"]

node_caller -.->|"requests load"| node_loader
node_loader -->|"reads"| node_yaml_file
node_loader -->|"uses defaults"| node_defaults
node_loader -->|"parses YAML"| node_yaml_parser
node_loader -->|"merges overrides"| node_deep_merge
node_loader -->|"raises"| node_config_error
node_loader -->|"returns"| node_resolved_config

click node_loader "https://github.com/succulent-tortoise/barf/blob/main/src/config_loader.py"
click node_defaults "https://github.com/succulent-tortoise/barf/blob/main/src/config_loader.py"
click node_deep_merge "https://github.com/succulent-tortoise/barf/blob/main/src/config_loader.py"
click node_config_error "https://github.com/succulent-tortoise/barf/blob/main/src/config_loader.py"

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_caller,node_yaml_file,node_yaml_parser,node_resolved_config toneIndigo
class node_loader,node_defaults,node_deep_merge,node_config_error toneTeal
```

## Components

### Other components

- **Library caller**
- **YAML config file**
- [Config loader](https://github.com/succulent-tortoise/barf/blob/main/src/config_loader.py): `src/config_loader.py`
- [Default settings](https://github.com/succulent-tortoise/barf/blob/main/src/config_loader.py): `src/config_loader.py`
- [Recursive merge](https://github.com/succulent-tortoise/barf/blob/main/src/config_loader.py): `src/config_loader.py`
- **PyYAML parser**
- [Config errors](https://github.com/succulent-tortoise/barf/blob/main/src/config_loader.py): `src/config_loader.py`
- **Resolved config**

## Connections

- Library caller → Config loader: requests load
- Config loader → YAML config file: reads (evidence: `src/config_loader.py`)
- Config loader → Default settings: uses defaults (evidence: `src/config_loader.py`)
- Config loader → PyYAML parser: parses YAML (evidence: `src/config_loader.py`)
- Config loader → Recursive merge: merges overrides (evidence: `src/config_loader.py`)
- Config loader → Config errors: raises (evidence: `src/config_loader.py`)
- Config loader → Resolved config: returns (evidence: `src/config_loader.py`)
