# redcandletheory/ibm architecture

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

- Interactive diagram: https://gitdiagram.com/redcandletheory/ibm
- Repository: https://github.com/redcandletheory/ibm

## Overview

This is a browser-based IBM i IAS log and GSKit diagnostic analyzer, with REST endpoints for return-code searches, status, and native IBM i program calls. The principal workflow is an administrator pasting an IAS log into the page, which presents decoded log details and matched API or GSKit errors; the service also supports broader code searches and lookup tabs. Source excerpts establish the API-to-service and program-call paths. The browser wiring and some search internals were not sampled, so those links are omitted or marked unverified.

Main entry points: [`src/main/webapp/index.html`](https://github.com/redcandletheory/ibm/blob/main/src/main/webapp/index.html) (Diagnostic page), [`src/main/java/com/ibmi/ias/service/DcmSearchService.java`](https://github.com/redcandletheory/ibm/blob/main/src/main/java/com/ibmi/ias/service/DcmSearchService.java) (DCM search service), [`src/main/java/com/ibmi/ias/service/ProgramCallerService.java`](https://github.com/redcandletheory/ibm/blob/main/src/main/java/com/ibmi/ias/service/ProgramCallerService.java) (Native program caller), [`src/main/java/com/ibmi/ias/api/DcmSearchResource.java`](https://github.com/redcandletheory/ibm/blob/main/src/main/java/com/ibmi/ias/api/DcmSearchResource.java) (DCM REST resource)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browser["Browser diagnostics"]
  node_diagnostic_page["Diagnostic page<br/>[index.html]"]
  node_log_analysis["IAS log analysis<br/>[index.html]"]
  node_code_lookup["Code lookup tabs<br/>[index.html]"]
end

subgraph group_search["Search and lookup"]
  node_dcm_service["DCM search service"]
  node_reference_data["Code reference data"]
end

subgraph group_api["REST interfaces"]
  node_dcm_resource["DCM REST resource"]
  node_api_servlet["API servlet<br/>[ApiServlet.java]"]
  node_status_resource["Status resource"]
  node_rest_application["REST application root"]
  node_program_resource["Program REST resource"]
end

subgraph group_ibmi["IBM i integration"]
  node_program_caller["Native program caller"]
  node_ibmi_program{{"IBM i native program"}}
end

node_administrator(("Administrator"))

node_administrator -->|"uses"| node_diagnostic_page
node_diagnostic_page -->|"offers"| node_log_analysis
node_diagnostic_page -->|"offers"| node_code_lookup
node_diagnostic_page -.->|"may query"| node_dcm_service
node_dcm_resource -->|"decodes and searches"| node_dcm_service
node_api_servlet -->|"decodes and searches"| node_dcm_service
node_dcm_service -->|"loads"| node_reference_data
node_program_resource -->|"calls"| node_program_caller
node_program_caller -->|"executes"| node_ibmi_program

click node_diagnostic_page "https://github.com/redcandletheory/ibm/blob/main/src/main/webapp/index.html"
click node_log_analysis "https://github.com/redcandletheory/ibm/blob/main/src/main/webapp/index.html"
click node_code_lookup "https://github.com/redcandletheory/ibm/blob/main/src/main/webapp/index.html"
click node_dcm_service "https://github.com/redcandletheory/ibm/blob/main/src/main/java/com/ibmi/ias/service/DcmSearchService.java"
click node_reference_data "https://github.com/redcandletheory/ibm/blob/main/src/main/resources/unified_dcm_db.json"
click node_dcm_resource "https://github.com/redcandletheory/ibm/blob/main/src/main/java/com/ibmi/ias/api/DcmSearchResource.java"
click node_api_servlet "https://github.com/redcandletheory/ibm/blob/main/src/main/java/com/ibmi/ias/servlet/ApiServlet.java"
click node_status_resource "https://github.com/redcandletheory/ibm/blob/main/src/main/java/com/ibmi/ias/api/StatusResource.java"
click node_rest_application "https://github.com/redcandletheory/ibm/blob/main/src/main/java/com/ibmi/ias/RestApplication.java"
click node_program_resource "https://github.com/redcandletheory/ibm/blob/main/src/main/java/com/ibmi/ias/api/ProgramResource.java"
click node_program_caller "https://github.com/redcandletheory/ibm/blob/main/src/main/java/com/ibmi/ias/service/ProgramCallerService.java"

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_diagnostic_page,node_log_analysis,node_code_lookup toneBlue
class node_dcm_service,node_reference_data toneAmber
class node_dcm_resource,node_api_servlet,node_status_resource,node_rest_application,node_program_resource toneMint
class node_program_caller,node_ibmi_program toneRose
class node_administrator toneIndigo
```

## Components

### Browser diagnostics

- [Diagnostic page](https://github.com/redcandletheory/ibm/blob/main/src/main/webapp/index.html): `src/main/webapp/index.html`
- [IAS log analysis](https://github.com/redcandletheory/ibm/blob/main/src/main/webapp/index.html): `src/main/webapp/index.html`
- [Code lookup tabs](https://github.com/redcandletheory/ibm/blob/main/src/main/webapp/index.html): `src/main/webapp/index.html`

### Search and lookup

- [DCM search service](https://github.com/redcandletheory/ibm/blob/main/src/main/java/com/ibmi/ias/service/DcmSearchService.java): `src/main/java/com/ibmi/ias/service/DcmSearchService.java`
- [Code reference data](https://github.com/redcandletheory/ibm/blob/main/src/main/resources/unified_dcm_db.json): `src/main/resources/unified_dcm_db.json`

### REST interfaces

- [DCM REST resource](https://github.com/redcandletheory/ibm/blob/main/src/main/java/com/ibmi/ias/api/DcmSearchResource.java): `src/main/java/com/ibmi/ias/api/DcmSearchResource.java`
- [API servlet](https://github.com/redcandletheory/ibm/blob/main/src/main/java/com/ibmi/ias/servlet/ApiServlet.java): `src/main/java/com/ibmi/ias/servlet/ApiServlet.java`
- [Status resource](https://github.com/redcandletheory/ibm/blob/main/src/main/java/com/ibmi/ias/api/StatusResource.java): `src/main/java/com/ibmi/ias/api/StatusResource.java`
- [REST application root](https://github.com/redcandletheory/ibm/blob/main/src/main/java/com/ibmi/ias/RestApplication.java): `src/main/java/com/ibmi/ias/RestApplication.java`
- [Program REST resource](https://github.com/redcandletheory/ibm/blob/main/src/main/java/com/ibmi/ias/api/ProgramResource.java): `src/main/java/com/ibmi/ias/api/ProgramResource.java`

### IBM i integration

- [Native program caller](https://github.com/redcandletheory/ibm/blob/main/src/main/java/com/ibmi/ias/service/ProgramCallerService.java): `src/main/java/com/ibmi/ias/service/ProgramCallerService.java`
- **IBM i native program**

### Other components

- **Administrator**

## Connections

- Administrator → Diagnostic page: uses (evidence: `README.md`)
- Diagnostic page → IAS log analysis: offers (evidence: `README.md`)
- Diagnostic page → Code lookup tabs: offers (evidence: `README.md`)
- Diagnostic page → DCM search service: may query
- DCM REST resource → DCM search service: decodes and searches (evidence: `src/main/java/com/ibmi/ias/api/DcmSearchResource.java`)
- API servlet → DCM search service: decodes and searches (evidence: `src/main/java/com/ibmi/ias/servlet/ApiServlet.java`)
- DCM search service → Code reference data: loads (evidence: `src/main/java/com/ibmi/ias/service/DcmSearchService.java`)
- Program REST resource → Native program caller: calls (evidence: `src/main/java/com/ibmi/ias/api/ProgramResource.java`)
- Native program caller → IBM i native program: executes (evidence: `src/main/java/com/ibmi/ias/service/ProgramCallerService.java`)
