# ui5experts/ui5-schemas architecture

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

- Interactive diagram: https://gitdiagram.com/ui5experts/ui5-schemas
- Repository: https://github.com/ui5experts/ui5-schemas

## Overview

UI5 Schemas is a Node.js CLI that prepares SAPUI5/OpenUI5 XML schemas for IDE use. Its principal workflow parses CLI options, resolves SDK/version information, downloads the library registry and schema files, then optionally enhances the core schema and registers schemas with a WebStorm project. The README also documents custom URL or local origins and SAPUI5, OpenUI5, and OpenUI5 Nightly selection. Edges reflect calls and data handling visible in excerpts or README; the implementation of any unshown IDE integrations is not inferred.

Main entry points: [`lib/main.js`](https://github.com/ui5experts/ui5-schemas/blob/master/lib/main.js) (Workflow Coordinator), [`lib/link.js`](https://github.com/ui5experts/ui5-schemas/blob/master/lib/link.js) (IDE Schema Linker), [`lib/Options.js`](https://github.com/ui5experts/ui5-schemas/blob/master/lib/Options.js) (Options and Version), [`bin/index.js`](https://github.com/ui5experts/ui5-schemas/blob/master/bin/index.js) (Command Entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI and Configuration"]
  node_command["Command Entry<br/>[index.js]"]
  node_options["Options and Version<br/>[Options.js]"]
  node_paths["App Data Paths<br/>[Util.js]"]
end

subgraph group_acquisition["Schema Acquisition"]
  node_runner["Workflow Coordinator<br/>[main.js]"]
  node_sdk["UI5 SDK Origin"]
  node_fetcher["Schema Downloader<br/>[download.js]"]
  node_schema_files["Downloaded Schemas"]
end

subgraph group_enhancement["Schema Enhancement"]
  node_enhancer["Schema Enhancer<br/>[upgrade.js]"]
  node_xml_schema["Enhanced Core Schema"]
end

subgraph group_ide["IDE Setup"]
  node_linker["IDE Schema Linker<br/>[link.js]"]
  node_idea_project["WebStorm Project"]
  node_misc_template["IDE Registry Template<br/>[misc.xml]"]
end

node_user(("CLI User"))

node_user -->|"runs"| node_command
node_command -->|"creates"| node_options
node_command -->|"starts"| node_runner
node_runner -->|"initializes"| node_options
node_options -->|"gets app path"| node_paths
node_options -->|"loads version"| node_sdk
node_fetcher -->|"requests metadata and schemas"| node_sdk
node_runner -->|"downloads registry and schemas"| node_fetcher
node_fetcher -->|"writes schemas"| node_schema_files
node_runner -->|"invokes when enabled"| node_enhancer
node_enhancer -->|"reads and rewrites"| node_xml_schema
node_runner -->|"invokes when enabled"| node_linker
node_linker -->|"registers locations"| node_schema_files
node_linker -->|"updates registry"| node_idea_project
node_linker -->|"copies if missing"| node_misc_template

click node_command "https://github.com/ui5experts/ui5-schemas/blob/master/bin/index.js"
click node_options "https://github.com/ui5experts/ui5-schemas/blob/master/lib/Options.js"
click node_paths "https://github.com/ui5experts/ui5-schemas/blob/master/lib/Util.js"
click node_runner "https://github.com/ui5experts/ui5-schemas/blob/master/lib/main.js"
click node_fetcher "https://github.com/ui5experts/ui5-schemas/blob/master/lib/download.js"
click node_enhancer "https://github.com/ui5experts/ui5-schemas/blob/master/lib/upgrade.js"
click node_linker "https://github.com/ui5experts/ui5-schemas/blob/master/lib/link.js"
click node_misc_template "https://github.com/ui5experts/ui5-schemas/blob/master/templates/misc.xml"

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_command,node_options,node_paths,node_user toneBlue
class node_runner,node_sdk,node_fetcher,node_schema_files toneAmber
class node_enhancer,node_xml_schema toneMint
class node_linker,node_idea_project,node_misc_template toneRose
```

## Components

### CLI and Configuration

- [Command Entry](https://github.com/ui5experts/ui5-schemas/blob/master/bin/index.js): `bin/index.js`
- [Options and Version](https://github.com/ui5experts/ui5-schemas/blob/master/lib/Options.js): `lib/Options.js`
- [App Data Paths](https://github.com/ui5experts/ui5-schemas/blob/master/lib/Util.js): `lib/Util.js`

### Schema Acquisition

- [Workflow Coordinator](https://github.com/ui5experts/ui5-schemas/blob/master/lib/main.js): `lib/main.js`
- **UI5 SDK Origin**
- [Schema Downloader](https://github.com/ui5experts/ui5-schemas/blob/master/lib/download.js): `lib/download.js`
- **Downloaded Schemas**

### Schema Enhancement

- [Schema Enhancer](https://github.com/ui5experts/ui5-schemas/blob/master/lib/upgrade.js): `lib/upgrade.js`
- **Enhanced Core Schema**

### IDE Setup

- [IDE Schema Linker](https://github.com/ui5experts/ui5-schemas/blob/master/lib/link.js): `lib/link.js`
- **WebStorm Project**
- [IDE Registry Template](https://github.com/ui5experts/ui5-schemas/blob/master/templates/misc.xml): `templates/misc.xml`

### Other components

- **CLI User**

## Connections

- CLI User → Command Entry: runs (evidence: `README.md`)
- Command Entry → Options and Version: creates (evidence: `bin/index.js`)
- Command Entry → Workflow Coordinator: starts (evidence: `bin/index.js`)
- Workflow Coordinator → Options and Version: initializes (evidence: `lib/main.js`)
- Options and Version → App Data Paths: gets app path (evidence: `lib/Options.js`)
- Options and Version → UI5 SDK Origin: loads version (evidence: `lib/Options.js`)
- Schema Downloader → UI5 SDK Origin: requests metadata and schemas (evidence: `lib/download.js`)
- Workflow Coordinator → Schema Downloader: downloads registry and schemas (evidence: `lib/main.js`)
- Schema Downloader → Downloaded Schemas: writes schemas (evidence: `lib/download.js`)
- Workflow Coordinator → Schema Enhancer: invokes when enabled (evidence: `lib/main.js`)
- Schema Enhancer → Enhanced Core Schema: reads and rewrites (evidence: `lib/upgrade.js`)
- Workflow Coordinator → IDE Schema Linker: invokes when enabled (evidence: `lib/main.js`)
- IDE Schema Linker → Downloaded Schemas: registers locations (evidence: `lib/link.js`)
- IDE Schema Linker → WebStorm Project: updates registry (evidence: `lib/link.js`)
- IDE Schema Linker → IDE Registry Template: copies if missing (evidence: `lib/link.js`)
