# koha-community/koha architecture

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

- Interactive diagram: https://gitdiagram.com/koha-community/koha
- Repository: https://github.com/koha-community/koha

## Overview

Koha is an integrated library system; this tree shows browser-side code for both staff and public interfaces. A staff user enters a Vue-based intranet module, which loads configuration and domain data through API clients and presents navigation, forms, and dialogs. The tree also contains distinct cataloguing, circulation, acquisitions, and discovery-related code. The sampled files establish several Vue component and API-client relationships, but not the server-side request handlers or most legacy page wiring; dashed edges mark unverified entry paths.

Main entry points: [`koha-tmpl/intranet-tmpl/prog/js/vue/fetch/api-client.js`](https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/api-client.js) (Domain API clients), [`koha-tmpl/intranet-tmpl/prog/js/vue/components/LeftMenu.vue`](https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/components/LeftMenu.vue) (Navigation UI), [`koha-tmpl/intranet-tmpl/prog/js/vue/stores/main.js`](https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/stores/main.js) (UI state), [`koha-tmpl/intranet-tmpl/prog/js/vue/components/Dialog.vue`](https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/components/Dialog.vue) (Dialog UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_users["Library users"]
  node_staff(("Staff user"))
  node_patron(("Library patron"))
end

subgraph group_intranet["Staff intranet"]
  node_intranet_modules["Staff workflows"]
  node_cataloguing["Cataloguing<br/>[cataloging.js]"]
  node_circulation["Circulation<br/>[checkouts.js]"]
  node_acquisitions["Acquisitions"]
  node_vue_erm["E-resource management<br/>[Main.vue]"]
  node_vue_ill["Interlibrary loans<br/>[Main.vue]"]
  node_vue_preservation["Preservation<br/>[Main.vue]"]
  node_vue_sip2["SIP2 administration<br/>[Main.vue]"]
  node_vue_vendors["Vendor management<br/>[Main.vue]"]
end

subgraph group_shared["Vue foundations"]
  node_api_clients["Domain API clients<br/>[api-client.js]"]
  node_http_client["HTTP client<br/>[http-client.js]"]
  node_main_store["UI state<br/>[main.js]"]
  node_messages["UI messages<br/>[messages.js]"]
  node_navigation["Navigation UI<br/>[LeftMenu.vue]"]
  node_breadcrumbs["Breadcrumbs<br/>[Breadcrumbs.vue]"]
  node_navigation_item["Navigation item<br/>[NavigationItem.vue]"]
  node_dialog["Dialog UI<br/>[Dialog.vue]"]
end

subgraph group_opac["Public catalog"]
  node_opac_ui["Public catalog UI"]
  node_opac_search["Catalog discovery<br/>[authtoresults.js]"]
  node_opac_checkout["Online checkout<br/>[checkout.js]"]
end

node_staff -.->|"uses"| node_intranet_modules
node_patron -.->|"uses"| node_opac_ui
node_intranet_modules -.->|"includes"| node_cataloguing
node_intranet_modules -.->|"includes"| node_circulation
node_vue_erm -->|"requests data"| node_api_clients
node_vue_ill -->|"requests data"| node_api_clients
node_vue_preservation -->|"requests data"| node_api_clients
node_vue_sip2 -->|"requests data"| node_api_clients
node_vue_vendors -->|"requests data"| node_api_clients
node_api_clients -->|"uses"| node_http_client
node_http_client -->|"uses"| node_messages
node_messages -->|"updates"| node_main_store
node_vue_erm -->|"sets loading"| node_main_store
node_vue_ill -->|"sets loading"| node_main_store
node_vue_preservation -->|"sets loading"| node_main_store
node_vue_sip2 -->|"sets loading"| node_main_store
node_vue_vendors -->|"sets loading"| node_main_store
node_vue_erm -->|"renders"| node_dialog
node_vue_ill -->|"renders"| node_dialog
node_vue_preservation -->|"renders"| node_dialog
node_vue_sip2 -->|"renders"| node_dialog
node_vue_vendors -->|"renders"| node_dialog
node_vue_erm -->|"renders"| node_navigation
node_vue_ill -->|"renders"| node_navigation
node_vue_preservation -->|"renders"| node_navigation
node_vue_sip2 -->|"renders"| node_navigation
node_vue_vendors -->|"renders"| node_navigation
node_navigation -->|"renders"| node_navigation_item
node_breadcrumbs -->|"renders"| node_navigation_item
node_opac_ui -.->|"includes"| node_opac_search
node_opac_ui -.->|"includes"| node_opac_checkout

click node_intranet_modules "https://github.com/koha-community/koha/tree/main/koha-tmpl/intranet-tmpl/prog/js"
click node_cataloguing "https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/cataloging.js"
click node_circulation "https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/checkouts.js"
click node_acquisitions "https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/AcquisitionsMenu.vue"
click node_vue_erm "https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue"
click node_vue_ill "https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/components/ILL/Main.vue"
click node_vue_preservation "https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/Main.vue"
click node_vue_sip2 "https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/components/SIP2/Main.vue"
click node_vue_vendors "https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/Main.vue"
click node_api_clients "https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/api-client.js"
click node_http_client "https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/http-client.js"
click node_main_store "https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/stores/main.js"
click node_messages "https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/messages.js"
click node_navigation "https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/components/LeftMenu.vue"
click node_breadcrumbs "https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/components/Breadcrumbs.vue"
click node_navigation_item "https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/components/NavigationItem.vue"
click node_dialog "https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/components/Dialog.vue"
click node_opac_ui "https://github.com/koha-community/koha/tree/main/koha-tmpl/opac-tmpl/bootstrap/js"
click node_opac_search "https://github.com/koha-community/koha/blob/main/koha-tmpl/opac-tmpl/bootstrap/js/authtoresults.js"
click node_opac_checkout "https://github.com/koha-community/koha/blob/main/koha-tmpl/opac-tmpl/bootstrap/js/modals/checkout.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_staff,node_patron toneBlue
class node_intranet_modules,node_cataloguing,node_circulation,node_acquisitions,node_vue_erm,node_vue_ill,node_vue_preservation,node_vue_sip2,node_vue_vendors toneAmber
class node_api_clients,node_http_client,node_main_store,node_messages,node_navigation,node_breadcrumbs,node_navigation_item,node_dialog toneMint
class node_opac_ui,node_opac_search,node_opac_checkout toneRose
```

## Components

### Library users

- **Staff user**
- **Library patron**

### Staff intranet

- [Staff workflows](https://github.com/koha-community/koha/tree/main/koha-tmpl/intranet-tmpl/prog/js): `koha-tmpl/intranet-tmpl/prog/js`
- [Cataloguing](https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/cataloging.js): `koha-tmpl/intranet-tmpl/prog/js/cataloging.js`
- [Circulation](https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/checkouts.js): `koha-tmpl/intranet-tmpl/prog/js/checkouts.js`
- [Acquisitions](https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/AcquisitionsMenu.vue): `koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/AcquisitionsMenu.vue`
- [E-resource management](https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue): `koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue`
- [Interlibrary loans](https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/components/ILL/Main.vue): `koha-tmpl/intranet-tmpl/prog/js/vue/components/ILL/Main.vue`
- [Preservation](https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/Main.vue): `koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/Main.vue`
- [SIP2 administration](https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/components/SIP2/Main.vue): `koha-tmpl/intranet-tmpl/prog/js/vue/components/SIP2/Main.vue`
- [Vendor management](https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/Main.vue): `koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/Main.vue`

### Vue foundations

- [Domain API clients](https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/api-client.js): `koha-tmpl/intranet-tmpl/prog/js/vue/fetch/api-client.js`
- [HTTP client](https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/fetch/http-client.js): `koha-tmpl/intranet-tmpl/prog/js/vue/fetch/http-client.js`
- [UI state](https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/stores/main.js): `koha-tmpl/intranet-tmpl/prog/js/vue/stores/main.js`
- [UI messages](https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/messages.js): `koha-tmpl/intranet-tmpl/prog/js/vue/messages.js`
- [Navigation UI](https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/components/LeftMenu.vue): `koha-tmpl/intranet-tmpl/prog/js/vue/components/LeftMenu.vue`
- [Breadcrumbs](https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/components/Breadcrumbs.vue): `koha-tmpl/intranet-tmpl/prog/js/vue/components/Breadcrumbs.vue`
- [Navigation item](https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/components/NavigationItem.vue): `koha-tmpl/intranet-tmpl/prog/js/vue/components/NavigationItem.vue`
- [Dialog UI](https://github.com/koha-community/koha/blob/main/koha-tmpl/intranet-tmpl/prog/js/vue/components/Dialog.vue): `koha-tmpl/intranet-tmpl/prog/js/vue/components/Dialog.vue`

### Public catalog

- [Public catalog UI](https://github.com/koha-community/koha/tree/main/koha-tmpl/opac-tmpl/bootstrap/js): `koha-tmpl/opac-tmpl/bootstrap/js`
- [Catalog discovery](https://github.com/koha-community/koha/blob/main/koha-tmpl/opac-tmpl/bootstrap/js/authtoresults.js): `koha-tmpl/opac-tmpl/bootstrap/js/authtoresults.js`
- [Online checkout](https://github.com/koha-community/koha/blob/main/koha-tmpl/opac-tmpl/bootstrap/js/modals/checkout.js): `koha-tmpl/opac-tmpl/bootstrap/js/modals/checkout.js`

## Connections

- Staff user → Staff workflows: uses
- Library patron → Public catalog UI: uses
- Staff workflows → Cataloguing: includes
- Staff workflows → Circulation: includes
- E-resource management → Domain API clients: requests data (evidence: `koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue`)
- Interlibrary loans → Domain API clients: requests data (evidence: `koha-tmpl/intranet-tmpl/prog/js/vue/components/ILL/Main.vue`)
- Preservation → Domain API clients: requests data (evidence: `koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/Main.vue`)
- SIP2 administration → Domain API clients: requests data (evidence: `koha-tmpl/intranet-tmpl/prog/js/vue/components/SIP2/Main.vue`)
- Vendor management → Domain API clients: requests data (evidence: `koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/Main.vue`)
- Domain API clients → HTTP client: uses (evidence: `koha-tmpl/intranet-tmpl/prog/js/vue/fetch/api-client.js`)
- HTTP client → UI messages: uses (evidence: `koha-tmpl/intranet-tmpl/prog/js/vue/fetch/http-client.js`)
- UI messages → UI state: updates (evidence: `koha-tmpl/intranet-tmpl/prog/js/vue/messages.js`)
- E-resource management → UI state: sets loading (evidence: `koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue`)
- Interlibrary loans → UI state: sets loading (evidence: `koha-tmpl/intranet-tmpl/prog/js/vue/components/ILL/Main.vue`)
- Preservation → UI state: sets loading (evidence: `koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/Main.vue`)
- SIP2 administration → UI state: sets loading (evidence: `koha-tmpl/intranet-tmpl/prog/js/vue/components/SIP2/Main.vue`)
- Vendor management → UI state: sets loading (evidence: `koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/Main.vue`)
- E-resource management → Dialog UI: renders (evidence: `koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue`)
- Interlibrary loans → Dialog UI: renders (evidence: `koha-tmpl/intranet-tmpl/prog/js/vue/components/ILL/Main.vue`)
- Preservation → Dialog UI: renders (evidence: `koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/Main.vue`)
- SIP2 administration → Dialog UI: renders (evidence: `koha-tmpl/intranet-tmpl/prog/js/vue/components/SIP2/Main.vue`)
- Vendor management → Dialog UI: renders (evidence: `koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/Main.vue`)
- E-resource management → Navigation UI: renders (evidence: `koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Main.vue`)
- Interlibrary loans → Navigation UI: renders (evidence: `koha-tmpl/intranet-tmpl/prog/js/vue/components/ILL/Main.vue`)
- Preservation → Navigation UI: renders (evidence: `koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/Main.vue`)
- SIP2 administration → Navigation UI: renders (evidence: `koha-tmpl/intranet-tmpl/prog/js/vue/components/SIP2/Main.vue`)
- Vendor management → Navigation UI: renders (evidence: `koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/Main.vue`)
- Navigation UI → Navigation item: renders (evidence: `koha-tmpl/intranet-tmpl/prog/js/vue/components/LeftMenu.vue`)
- Breadcrumbs → Navigation item: renders (evidence: `koha-tmpl/intranet-tmpl/prog/js/vue/components/Breadcrumbs.vue`)
- Public catalog UI → Catalog discovery: includes
- Public catalog UI → Online checkout: includes
