# mpdl/pubmangui architecture

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

- Interactive diagram: https://gitdiagram.com/mpdl/pubmangui
- Repository: https://github.com/mpdl/pubmangui

## Overview

PubManGUI is an Angular front end for the MPG PubMan publication repository. Users can discover publications, refine searches, inspect and edit records, and use dedicated import and batch workflows; the UI communicates with PubMan through REST services. The graph captures routed product areas, the sampled search-state/query and REST-client relationships, and authentication/context handling. Source for many feature components was not sampled, so their internal calls and connections to backend operations are intentionally not asserted.

Main entry points: [`src/app/app.routes.ts`](https://github.com/mpdl/pubmangui/blob/main/src/app/app.routes.ts) (Application routes), [`src/app/components/search-result-list/search-state.service.ts`](https://github.com/mpdl/pubmangui/blob/main/src/app/components/search-result-list/search-state.service.ts) (Search state), [`src/app/app.component.ts`](https://github.com/mpdl/pubmangui/blob/main/src/app/app.component.ts) (Angular application shell), [`src/app/services/pubman-rest-client/contexts.service.ts`](https://github.com/mpdl/pubmangui/blob/main/src/app/services/pubman-rest-client/contexts.service.ts) (Context REST client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["App and access"]
  node_app["Angular application shell<br/>[app.component.ts]"]
  node_routes["Application routes<br/>[app.routes.ts]"]
  node_auth["Authentication and account<br/>[aa.service.ts]"]
  node_contexts["Context REST client"]
  node_restbase["Generic REST client"]
  node_restsearch["Search REST client"]
end

subgraph group_discovery["Publication discovery"]
  node_searchpage["Search results"]
  node_searchstate["Search state"]
  node_advanced["Advanced query builder"]
  node_criterion["Search criteria<br/>[SearchCriterion.ts]"]
  node_saved["Saved searches"]
  node_simple["Simple search"]
end

subgraph group_records["Publication records"]
  node_itemview["Publication view"]
  node_itemform["Publication editor"]
end

subgraph group_operations["Repository operations"]
  node_imports["Import workflow"]
  node_importservice["Import service<br/>[imports.service.ts]"]
  node_batch["Batch workflow"]
  node_batchservice["Batch actions and logs<br/>[batch.service.ts]"]
end

node_user(("Repository user"))
node_backend{{"PubMan REST API"}}

node_user -->|"uses"| node_app
node_app -->|"hosts routes"| node_routes
node_routes -->|"routes to"| node_searchpage
node_routes -->|"routes to"| node_itemview
node_routes -->|"routes to"| node_itemform
node_routes -->|"loads routes"| node_imports
node_routes -->|"loads routes"| node_batch
node_searchstate -->|"builds queries with"| node_advanced
node_searchstate -->|"retrieves saved query"| node_saved
node_advanced -->|"prepares criteria"| node_criterion
node_simple -->|"uses search state"| node_searchstate
node_auth -->|"loads contexts"| node_contexts
node_contexts -->|"extends client"| node_restsearch
node_restsearch -->|"delegates requests"| node_restbase
node_restbase -.->|"sends REST requests"| node_backend
node_imports -.->|"provides import area"| node_importservice
node_batch -.->|"provides batch area"| node_batchservice

click node_app "https://github.com/mpdl/pubmangui/blob/main/src/app/app.component.ts"
click node_routes "https://github.com/mpdl/pubmangui/blob/main/src/app/app.routes.ts"
click node_auth "https://github.com/mpdl/pubmangui/blob/main/src/app/services/aa.service.ts"
click node_contexts "https://github.com/mpdl/pubmangui/blob/main/src/app/services/pubman-rest-client/contexts.service.ts"
click node_restbase "https://github.com/mpdl/pubmangui/blob/main/src/app/services/pubman-rest-client/pubman-generic-rest-client.service.ts"
click node_restsearch "https://github.com/mpdl/pubmangui/blob/main/src/app/services/pubman-rest-client/pubman-searchable-generic-rest-client.service.ts"
click node_searchpage "https://github.com/mpdl/pubmangui/blob/main/src/app/components/search-result-list/search-result-list.component.ts"
click node_searchstate "https://github.com/mpdl/pubmangui/blob/main/src/app/components/search-result-list/search-state.service.ts"
click node_advanced "https://github.com/mpdl/pubmangui/blob/main/src/app/components/item-search-advanced/item-search-advanced.service.ts"
click node_criterion "https://github.com/mpdl/pubmangui/blob/main/src/app/components/item-search-advanced/criterions/SearchCriterion.ts"
click node_saved "https://github.com/mpdl/pubmangui/blob/main/src/app/services/pubman-rest-client/saved-search.service.ts"
click node_simple "https://github.com/mpdl/pubmangui/blob/main/src/app/services/simplesearch.service.ts"
click node_itemview "https://github.com/mpdl/pubmangui/blob/main/src/app/components/item-view/item-view.component.ts"
click node_itemform "https://github.com/mpdl/pubmangui/blob/main/src/app/components/item-edit/item-form/item-form.component.ts"
click node_imports "https://github.com/mpdl/pubmangui/blob/main/src/app/components/imports/imports-routing.module.ts"
click node_importservice "https://github.com/mpdl/pubmangui/blob/main/src/app/components/imports/services/imports.service.ts"
click node_batch "https://github.com/mpdl/pubmangui/blob/main/src/app/components/batch/batch-routing.module.ts"
click node_batchservice "https://github.com/mpdl/pubmangui/blob/main/src/app/components/batch/services/batch.service.ts"

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_app,node_routes,node_auth,node_contexts,node_restbase,node_restsearch,node_user toneBlue
class node_searchpage,node_searchstate,node_advanced,node_criterion,node_saved,node_simple toneAmber
class node_itemview,node_itemform,node_backend toneMint
class node_imports,node_importservice,node_batch,node_batchservice toneRose
```

## Components

### App and access

- [Angular application shell](https://github.com/mpdl/pubmangui/blob/main/src/app/app.component.ts): `src/app/app.component.ts`
- [Application routes](https://github.com/mpdl/pubmangui/blob/main/src/app/app.routes.ts): `src/app/app.routes.ts`
- [Authentication and account](https://github.com/mpdl/pubmangui/blob/main/src/app/services/aa.service.ts): `src/app/services/aa.service.ts`
- [Context REST client](https://github.com/mpdl/pubmangui/blob/main/src/app/services/pubman-rest-client/contexts.service.ts): `src/app/services/pubman-rest-client/contexts.service.ts`
- [Generic REST client](https://github.com/mpdl/pubmangui/blob/main/src/app/services/pubman-rest-client/pubman-generic-rest-client.service.ts): `src/app/services/pubman-rest-client/pubman-generic-rest-client.service.ts`
- [Search REST client](https://github.com/mpdl/pubmangui/blob/main/src/app/services/pubman-rest-client/pubman-searchable-generic-rest-client.service.ts): `src/app/services/pubman-rest-client/pubman-searchable-generic-rest-client.service.ts`

### Publication discovery

- [Search results](https://github.com/mpdl/pubmangui/blob/main/src/app/components/search-result-list/search-result-list.component.ts): `src/app/components/search-result-list/search-result-list.component.ts`
- [Search state](https://github.com/mpdl/pubmangui/blob/main/src/app/components/search-result-list/search-state.service.ts): `src/app/components/search-result-list/search-state.service.ts`
- [Advanced query builder](https://github.com/mpdl/pubmangui/blob/main/src/app/components/item-search-advanced/item-search-advanced.service.ts): `src/app/components/item-search-advanced/item-search-advanced.service.ts`
- [Search criteria](https://github.com/mpdl/pubmangui/blob/main/src/app/components/item-search-advanced/criterions/SearchCriterion.ts): `src/app/components/item-search-advanced/criterions/SearchCriterion.ts`
- [Saved searches](https://github.com/mpdl/pubmangui/blob/main/src/app/services/pubman-rest-client/saved-search.service.ts): `src/app/services/pubman-rest-client/saved-search.service.ts`
- [Simple search](https://github.com/mpdl/pubmangui/blob/main/src/app/services/simplesearch.service.ts): `src/app/services/simplesearch.service.ts`

### Publication records

- [Publication view](https://github.com/mpdl/pubmangui/blob/main/src/app/components/item-view/item-view.component.ts): `src/app/components/item-view/item-view.component.ts`
- [Publication editor](https://github.com/mpdl/pubmangui/blob/main/src/app/components/item-edit/item-form/item-form.component.ts): `src/app/components/item-edit/item-form/item-form.component.ts`

### Repository operations

- [Import workflow](https://github.com/mpdl/pubmangui/blob/main/src/app/components/imports/imports-routing.module.ts): `src/app/components/imports/imports-routing.module.ts`
- [Import service](https://github.com/mpdl/pubmangui/blob/main/src/app/components/imports/services/imports.service.ts): `src/app/components/imports/services/imports.service.ts`
- [Batch workflow](https://github.com/mpdl/pubmangui/blob/main/src/app/components/batch/batch-routing.module.ts): `src/app/components/batch/batch-routing.module.ts`
- [Batch actions and logs](https://github.com/mpdl/pubmangui/blob/main/src/app/components/batch/services/batch.service.ts): `src/app/components/batch/services/batch.service.ts`

### Other components

- **Repository user**
- **PubMan REST API**

## Connections

- Repository user → Angular application shell: uses (evidence: `src/app/app.component.ts`)
- Angular application shell → Application routes: hosts routes
- Application routes → Search results: routes to (evidence: `src/app/app.routes.ts`)
- Application routes → Publication view: routes to (evidence: `src/app/app.routes.ts`)
- Application routes → Publication editor: routes to (evidence: `src/app/app.routes.ts`)
- Application routes → Import workflow: loads routes (evidence: `src/app/app.routes.ts`)
- Application routes → Batch workflow: loads routes (evidence: `src/app/app.routes.ts`)
- Search state → Advanced query builder: builds queries with (evidence: `src/app/components/search-result-list/search-state.service.ts`)
- Search state → Saved searches: retrieves saved query (evidence: `src/app/components/search-result-list/search-state.service.ts`)
- Advanced query builder → Search criteria: prepares criteria (evidence: `src/app/components/item-search-advanced/item-search-advanced.service.ts`)
- Simple search → Search state: uses search state (evidence: `src/app/services/simplesearch.service.ts`)
- Authentication and account → Context REST client: loads contexts (evidence: `src/app/services/aa.service.ts`)
- Context REST client → Search REST client: extends client (evidence: `src/app/services/pubman-rest-client/contexts.service.ts`)
- Search REST client → Generic REST client: delegates requests (evidence: `src/app/services/pubman-rest-client/pubman-searchable-generic-rest-client.service.ts`)
- Generic REST client → PubMan REST API: sends REST requests (evidence: `README.md`)
- Import workflow → Import service: provides import area
- Batch workflow → Batch actions and logs: provides batch area
