# andreas-prouza/obi architecture

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

- Interactive diagram: https://gitdiagram.com/andreas-prouza/obi
- Repository: https://github.com/andreas-prouza/obi

## Overview

OBI is a Python backend for building IBM i objects, usable by IDE integrations or directly. Its central workflow reads project settings and source files, detects changes or accepts a requested source, expands dependency-aware compile lists, generates configured build commands, and presents build results. The sampled source confirms source scanning, dependency handling, command construction, and reporting; the excerpts do not show the complete CLI dispatch path, so the graph leaves execution wiring from the CLI out rather than inferring it. README capabilities such as IDE-independent backend use are represented at the boundary.

Main entry points: [`module/files.py`](https://github.com/andreas-prouza/obi/blob/main/module/files.py) (File persistence), [`main.py`](https://github.com/andreas-prouza/obi/blob/main/main.py) (CLI backend), [`module/properties.py`](https://github.com/andreas-prouza/obi/blob/main/module/properties.py) (Project properties), [`module/compile_list.py`](https://github.com/andreas-prouza/obi/blob/main/module/compile_list.py) (Compile-list management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Client entry"]
  node_cli["CLI backend<br/>[main.py]"]
end

subgraph group_planning["Build planning"]
  node_source_scan["Source scanning<br/>[files.py]"]
  node_compile_list["Compile-list management<br/>[compile_list.py]"]
  node_dependency["Dependency analysis<br/>[dependency.py]"]
end

subgraph group_execution["Build execution"]
  node_command_build["Command generation<br/>[build_cmds.py]"]
  node_step_config["Step selection"]
  node_command_runner["Command execution<br/>[run_cmds.py]"]
end

subgraph group_state["Configuration and results"]
  node_results["Build reporting<br/>[results.py]"]
  node_properties["Project properties<br/>[properties.py]"]
  node_toml_tools["TOML helpers<br/>[toml_tools.py]"]
  node_file_io["File persistence<br/>[files.py]"]
  node_build_state["Build-list files"]
  node_project_config["Project configuration"]
  node_report_files["Build reports and logs"]
end

node_client(("IDE or user"))
node_ibmi_shell["IBM i shell"]

node_client -->|"invokes"| node_cli
node_cli -->|"loads settings"| node_properties
node_cli -->|"scans sources"| node_source_scan
node_cli -->|"adds source"| node_compile_list
node_cli -->|"creates report"| node_results
node_properties -->|"reads tables"| node_toml_tools
node_properties -->|"reads configuration"| node_file_io
node_compile_list -->|"finds dependents"| node_dependency
node_compile_list -->|"sets source commands"| node_command_build
node_compile_list -->|"writes lists"| node_file_io
node_dependency -->|"adds build commands"| node_command_build
node_command_build -->|"resolves properties"| node_properties
node_command_build -->|"selects steps"| node_step_config
node_step_config -->|"gets source settings"| node_properties
node_command_runner -->|"runs commands"| node_ibmi_shell
node_command_runner -->|"reads and writes state"| node_file_io
node_results -->|"reads build data"| node_file_io
node_results -->|"reads dependency data"| node_dependency
node_file_io -->|"persists"| node_build_state
node_file_io -->|"reads"| node_project_config
node_results -->|"writes reports"| node_report_files
node_command_runner -->|"stores command output"| node_report_files

click node_cli "https://github.com/andreas-prouza/obi/blob/main/main.py"
click node_source_scan "https://github.com/andreas-prouza/obi/blob/main/module/files.py"
click node_compile_list "https://github.com/andreas-prouza/obi/blob/main/module/compile_list.py"
click node_dependency "https://github.com/andreas-prouza/obi/blob/main/module/dependency.py"
click node_command_build "https://github.com/andreas-prouza/obi/blob/main/module/build_cmds.py"
click node_step_config "https://github.com/andreas-prouza/obi/blob/main/module/app_config_tools.py"
click node_command_runner "https://github.com/andreas-prouza/obi/blob/main/module/run_cmds.py"
click node_results "https://github.com/andreas-prouza/obi/blob/main/module/results.py"
click node_properties "https://github.com/andreas-prouza/obi/blob/main/module/properties.py"
click node_toml_tools "https://github.com/andreas-prouza/obi/blob/main/module/toml_tools.py"
click node_file_io "https://github.com/andreas-prouza/obi/blob/main/module/files.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_cli,node_client toneBlue
class node_source_scan,node_compile_list,node_dependency toneAmber
class node_command_build,node_step_config,node_command_runner toneMint
class node_results,node_properties,node_toml_tools,node_file_io,node_build_state,node_project_config,node_report_files toneRose
class node_ibmi_shell toneIndigo
```

## Components

### Client entry

- [CLI backend](https://github.com/andreas-prouza/obi/blob/main/main.py): `main.py`

### Build planning

- [Source scanning](https://github.com/andreas-prouza/obi/blob/main/module/files.py): `module/files.py`
- [Compile-list management](https://github.com/andreas-prouza/obi/blob/main/module/compile_list.py): `module/compile_list.py`
- [Dependency analysis](https://github.com/andreas-prouza/obi/blob/main/module/dependency.py): `module/dependency.py`

### Build execution

- [Command generation](https://github.com/andreas-prouza/obi/blob/main/module/build_cmds.py): `module/build_cmds.py`
- [Step selection](https://github.com/andreas-prouza/obi/blob/main/module/app_config_tools.py): `module/app_config_tools.py`
- [Command execution](https://github.com/andreas-prouza/obi/blob/main/module/run_cmds.py): `module/run_cmds.py`

### Configuration and results

- [Build reporting](https://github.com/andreas-prouza/obi/blob/main/module/results.py): `module/results.py`
- [Project properties](https://github.com/andreas-prouza/obi/blob/main/module/properties.py): `module/properties.py`
- [TOML helpers](https://github.com/andreas-prouza/obi/blob/main/module/toml_tools.py): `module/toml_tools.py`
- [File persistence](https://github.com/andreas-prouza/obi/blob/main/module/files.py): `module/files.py`
- **Build-list files**
- **Project configuration**
- **Build reports and logs**

### Other components

- **IDE or user**
- **IBM i shell**

## Connections

- IDE or user → CLI backend: invokes
- CLI backend → Project properties: loads settings
- CLI backend → Source scanning: scans sources
- CLI backend → Compile-list management: adds source
- CLI backend → Build reporting: creates report
- Project properties → TOML helpers: reads tables
- Project properties → File persistence: reads configuration
- Compile-list management → Dependency analysis: finds dependents
- Compile-list management → Command generation: sets source commands
- Compile-list management → File persistence: writes lists
- Dependency analysis → Command generation: adds build commands
- Command generation → Project properties: resolves properties
- Command generation → Step selection: selects steps
- Step selection → Project properties: gets source settings
- Command execution → IBM i shell: runs commands
- Command execution → File persistence: reads and writes state
- Build reporting → File persistence: reads build data
- Build reporting → Dependency analysis: reads dependency data
- File persistence → Build-list files: persists
- File persistence → Project configuration: reads
- Build reporting → Build reports and logs: writes reports
- Command execution → Build reports and logs: stores command output
