# monitoringartist/zapix architecture

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

- Interactive diagram: https://gitdiagram.com/monitoringartist/zapix
- Repository: https://github.com/monitoringartist/zapix
- Video tour (about a minute): https://gitdiagram.com/monitoringartist/zapix/video

## Overview

Zapix is a browser-based Zabbix API query tool. Users connect to a Zabbix instance, compose a method and parameters, execute the request, and view the response; the README also describes version-aware method autocomplete and browser-only credential storage. The source excerpts show JSON-RPC login, version detection, and API calls, plus a standalone JSON linter. The UI wiring is only partially sampled, so some relationships are documented rather than confirmed in the excerpts.

Main entry points: [`js/js.js`](https://github.com/monitoringartist/zapix/blob/master/js/js.js) (UI and query state), [`js/jsonrpc.js`](https://github.com/monitoringartist/zapix/blob/master/js/jsonrpc.js) (JSON-RPC client), [`index.html`](https://github.com/monitoringartist/zapix/blob/master/index.html) (Query interface), [`js/jsonlint.js`](https://github.com/monitoringartist/zapix/blob/master/js/jsonlint.js) (JSON linter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Browser interface"]
  node_webui["Query interface<br/>[index.html]"]
  node_app["UI and query state<br/>[js.js]"]
end

subgraph group_query["Query assistance"]
  node_method_catalog["Versioned method catalogue<br/>[js.js]"]
  node_json_lint["JSON linter<br/>[jsonlint.js]"]
end

subgraph group_transport["API connection"]
  node_rpc_client["JSON-RPC client<br/>[jsonrpc.js]"]
end

node_user(("User"))
node_zabbix{{"Zabbix API"}}

node_user -->|"uses"| node_webui
node_webui -.->|"provides query UI"| node_app
node_app -->|"offers methods"| node_method_catalog
node_user -.->|"enters query"| node_app
node_app -.->|"validates parameters"| node_json_lint
node_app -.->|"executes request"| node_rpc_client
node_rpc_client -->|"sends JSON-RPC"| node_zabbix
node_zabbix -->|"returns response"| node_rpc_client
node_rpc_client -->|"detects API version"| node_method_catalog
node_app -.->|"shows result"| node_user

click node_webui "https://github.com/monitoringartist/zapix/blob/master/index.html"
click node_app "https://github.com/monitoringartist/zapix/blob/master/js/js.js"
click node_method_catalog "https://github.com/monitoringartist/zapix/blob/master/js/js.js"
click node_json_lint "https://github.com/monitoringartist/zapix/blob/master/js/jsonlint.js"
click node_rpc_client "https://github.com/monitoringartist/zapix/blob/master/js/jsonrpc.js"

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_webui,node_app,node_user toneBlue
class node_method_catalog,node_json_lint toneAmber
class node_rpc_client,node_zabbix toneMint
```

## Components

### Browser interface

- [Query interface](https://github.com/monitoringartist/zapix/blob/master/index.html): `index.html`
- [UI and query state](https://github.com/monitoringartist/zapix/blob/master/js/js.js): `js/js.js`

### Query assistance

- [Versioned method catalogue](https://github.com/monitoringartist/zapix/blob/master/js/js.js): `js/js.js`
- [JSON linter](https://github.com/monitoringartist/zapix/blob/master/js/jsonlint.js): `js/jsonlint.js`

### API connection

- [JSON-RPC client](https://github.com/monitoringartist/zapix/blob/master/js/jsonrpc.js): `js/jsonrpc.js`

### Other components

- **User**
- **Zabbix API**

## Connections

- User → Query interface: uses (evidence: `README.md`)
- Query interface → UI and query state: provides query UI
- UI and query state → Versioned method catalogue: offers methods (evidence: `js/js.js`)
- User → UI and query state: enters query
- UI and query state → JSON linter: validates parameters
- UI and query state → JSON-RPC client: executes request
- JSON-RPC client → Zabbix API: sends JSON-RPC (evidence: `js/jsonrpc.js`)
- Zabbix API → JSON-RPC client: returns response (evidence: `js/jsonrpc.js`)
- JSON-RPC client → Versioned method catalogue: detects API version (evidence: `js/jsonrpc.js`)
- UI and query state → User: shows result
