Architecture Diagrams¶
This page contains all the architectural diagrams that illustrate Injinja's design and data flow.
Overview Diagram¶
The high-level flow showing the two-step templating process:

This diagram shows: 1. Environment Variables (DYNAMIC) provide runtime configuration 2. Configuration Files (STATIC) are templated with environment variables 3. Final Template is rendered with the merged configuration 4. Output is generated (SQL, YAML, JSON, etc.)
Detailed Architecture¶
The complete system architecture showing all components and their interactions:

Key components illustrated: - Environment variable collection from multiple sources - Configuration file discovery and templating - Deep merge process - Template rendering with custom functions - Output generation
Collections of Configs Pattern¶
The hierarchical configuration management pattern:

This shows:
- How multiple configuration files are collected via -c flags
- File vs. glob pattern resolution
- Independent templating of each config with environment variables
- Deep merge process to create final unified configuration
Testing Architecture¶
The validation and testing workflow:

Illustrates:
- Configuration validation against expected outputs
- Debug output for troubleshooting
- Integration with external tools like jq and yq
- Diff generation for output validation
Diagram Source¶
All diagrams are created using Mermaid and stored as .mmd files in the diagrams/ folder of the repository. They are automatically converted to PNG format using the project's Makefile.
To update diagrams:
- Edit the
.mmdfiles in thediagrams/folder - Run
make diagto regenerate PNG files - The documentation automatically references the updated images
For local editing, we recommend using the VSCode Mermaid Preview Extension.
Diagram Files¶
The source Mermaid files are:
diagrams/overview.mmd- High-level overviewdiagrams/architecture.mmd- Detailed architecturediagrams/collections_of_configs.mmd- Configuration collection patterndiagrams/testing.mmd- Testing and validation workflow