# pkp/portico architecture

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

- Interactive diagram: https://gitdiagram.com/pkp/portico
- Repository: https://github.com/pkp/portico

## Overview

This OJS plugin exports article metadata and full-text packages for digital preservation, with manual export and scheduled automatic registration. The main workflow selects content, builds a ZIP with Portico-compatible JATS and packaged renditions, then delivers it to configured endpoints and updates deposit status. Settings and endpoint validation support that workflow. The graph follows the sampled source and README; internal packaging details are grouped where excerpts do not establish separate call relationships.

Main entry points: [`PorticoExportPlugin.php`](https://github.com/pkp/portico/blob/main/PorticoExportPlugin.php) (Export actions and packaging), [`jobs/PorticoDeliver.php`](https://github.com/pkp/portico/blob/main/jobs/PorticoDeliver.php) (Deposit job), [`PorticoInfoSender.php`](https://github.com/pkp/portico/blob/main/PorticoInfoSender.php) (Scheduled registration), [`classes/form/PorticoSettingsForm.php`](https://github.com/pkp/portico/blob/main/classes/form/PorticoSettingsForm.php) (Endpoint settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_plugin["Plugin and settings"]
  node_generic_plugin["Plugin registration<br/>[PorticoPlugin.php]"]
  node_export_plugin["Export actions and packaging"]
  node_settings_form["Endpoint settings"]
  node_deployment["Deployment stub"]
end

subgraph group_packaging["Package generation"]
  node_jats["JATS processing"]
end

subgraph group_delivery["Deposit and delivery"]
  node_automatic_sender["Scheduled registration"]
  node_deliver_job["Deposit job<br/>[PorticoDeliver.php]"]
end

node_manager(("Journal manager"))
node_export_user(("Export user"))
node_portico["Portico preservation"]

node_manager -->|"configures"| node_settings_form
node_export_user -->|"starts export"| node_export_plugin
node_generic_plugin -->|"registers"| node_export_plugin
node_export_plugin -->|"creates form"| node_settings_form
node_export_plugin -->|"names deployment"| node_deployment
node_export_plugin -->|"uses processor"| node_jats
node_export_plugin -->|"dispatches"| node_deliver_job
node_export_plugin -->|"schedules"| node_automatic_sender
node_automatic_sender -->|"selects and deposits"| node_export_plugin
node_deliver_job -->|"builds and delivers"| node_export_plugin
node_deliver_job -.->|"delivers package"| node_portico

click node_generic_plugin "https://github.com/pkp/portico/blob/main/PorticoPlugin.php"
click node_export_plugin "https://github.com/pkp/portico/blob/main/PorticoExportPlugin.php"
click node_settings_form "https://github.com/pkp/portico/blob/main/classes/form/PorticoSettingsForm.php"
click node_deployment "https://github.com/pkp/portico/blob/main/PorticoExportDeployment.php"
click node_jats "https://github.com/pkp/portico/blob/main/PorticoJatsProcessor.php"
click node_automatic_sender "https://github.com/pkp/portico/blob/main/PorticoInfoSender.php"
click node_deliver_job "https://github.com/pkp/portico/blob/main/jobs/PorticoDeliver.php"

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_generic_plugin,node_export_plugin,node_settings_form,node_deployment,node_export_user toneBlue
class node_jats toneAmber
class node_automatic_sender,node_deliver_job toneMint
class node_manager,node_portico toneIndigo
```

## Components

### Plugin and settings

- [Plugin registration](https://github.com/pkp/portico/blob/main/PorticoPlugin.php): `PorticoPlugin.php`
- [Export actions and packaging](https://github.com/pkp/portico/blob/main/PorticoExportPlugin.php): `PorticoExportPlugin.php`
- [Endpoint settings](https://github.com/pkp/portico/blob/main/classes/form/PorticoSettingsForm.php): `classes/form/PorticoSettingsForm.php`
- [Deployment stub](https://github.com/pkp/portico/blob/main/PorticoExportDeployment.php): `PorticoExportDeployment.php`

### Package generation

- [JATS processing](https://github.com/pkp/portico/blob/main/PorticoJatsProcessor.php): `PorticoJatsProcessor.php`

### Deposit and delivery

- [Scheduled registration](https://github.com/pkp/portico/blob/main/PorticoInfoSender.php): `PorticoInfoSender.php`
- [Deposit job](https://github.com/pkp/portico/blob/main/jobs/PorticoDeliver.php): `jobs/PorticoDeliver.php`

### Other components

- **Journal manager**
- **Export user**
- **Portico preservation**

## Connections

- Journal manager → Endpoint settings: configures (evidence: `classes/form/PorticoSettingsForm.php`)
- Export user → Export actions and packaging: starts export (evidence: `README.md`)
- Plugin registration → Export actions and packaging: registers (evidence: `PorticoPlugin.php`)
- Export actions and packaging → Endpoint settings: creates form (evidence: `PorticoExportPlugin.php`)
- Export actions and packaging → Deployment stub: names deployment (evidence: `PorticoExportPlugin.php`)
- Export actions and packaging → JATS processing: uses processor (evidence: `PorticoExportPlugin.php`)
- Export actions and packaging → Deposit job: dispatches (evidence: `PorticoExportPlugin.php`)
- Export actions and packaging → Scheduled registration: schedules (evidence: `PorticoExportPlugin.php`)
- Scheduled registration → Export actions and packaging: selects and deposits (evidence: `PorticoInfoSender.php`)
- Deposit job → Export actions and packaging: builds and delivers (evidence: `jobs/PorticoDeliver.php`)
- Deposit job → Portico preservation: delivers package
