# pengovbr/mod-wssei architecture

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

- Interactive diagram: https://gitdiagram.com/pengovbr/mod-wssei
- Repository: https://github.com/pengovbr/mod-wssei

## Overview

WSSEI is a PHP module that exposes SEI capabilities as REST endpoints for integrations, including the SEI app. The principal workflow is a client request entering the web-service controller, being handled by versioned service logic, and accessing SEI functionality. The source tree also shows distinct process, document, activity, identity, and notification domains. Most implementation files were not sampled, so internal dispatch and persistence relationships are shown only as unverified dashed links; the README supports the module’s REST role and its dependency on SEI.

Main entry points: [`src/versao/v2/MdWsSeiServicosV2.php`](https://github.com/pengovbr/mod-wssei/blob/master/src/versao/v2/MdWsSeiServicosV2.php) (Version 2 services), [`src/controlador_ws.php`](https://github.com/pengovbr/mod-wssei/blob/master/src/controlador_ws.php) (REST controller), [`src/MdWsSeiRest.php`](https://github.com/pengovbr/mod-wssei/blob/master/src/MdWsSeiRest.php) (Module registration), [`src/controlador_editor_externo.php`](https://github.com/pengovbr/mod-wssei/blob/master/src/controlador_editor_externo.php) (External editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["REST API"]
  node_rest["REST controller<br/>[controlador_ws.php]"]
  node_editor["External editor"]
  node_v2["Version 2 services"]
  node_version["Service versions"]
  node_module["Module registration<br/>[MdWsSeiRest.php]"]
end

subgraph group_process["Process and Documents"]
  node_procedure["Procedures"]
  node_procedurev1["Procedures v1"]
  node_document["Documents"]
  node_documentv1["Documents v1"]
  node_protocol["Protocol search"]
end

subgraph group_operations["Activities and Tracking"]
  node_activity["Activities"]
  node_tracking["Tracking"]
  node_schedule["Scheduled returns"]
  node_notifications["Notifications"]
end

subgraph group_identity["Identity and Setup"]
  node_users["Users"]
  node_units["Units"]
  node_configuration["Module configuration"]
end

node_client(("API client"))
node_sei["SEI system"]

node_client -->|"sends request"| node_rest
node_rest -.->|"dispatches to"| node_v2
node_editor -.->|"uses services"| node_v2
node_module -.->|"registers services"| node_version
node_v2 -.->|"delegates to"| node_procedure
node_v2 -.->|"delegates to"| node_procedurev1
node_v2 -.->|"delegates to"| node_document
node_v2 -.->|"delegates to"| node_documentv1
node_v2 -.->|"uses data shape"| node_protocol
node_v2 -.->|"delegates to"| node_activity
node_v2 -.->|"delegates to"| node_tracking
node_v2 -.->|"delegates to"| node_schedule
node_v2 -.->|"delegates to"| node_notifications
node_v2 -.->|"delegates to"| node_users
node_v2 -.->|"delegates to"| node_units
node_configuration -.->|"configures"| node_module
node_v2 -.->|"accesses"| node_sei

click node_rest "https://github.com/pengovbr/mod-wssei/blob/master/src/controlador_ws.php"
click node_editor "https://github.com/pengovbr/mod-wssei/blob/master/src/controlador_editor_externo.php"
click node_v2 "https://github.com/pengovbr/mod-wssei/blob/master/src/versao/v2/MdWsSeiServicosV2.php"
click node_version "https://github.com/pengovbr/mod-wssei/blob/master/src/versao/MdWsSeiVersaoServicos.php"
click node_module "https://github.com/pengovbr/mod-wssei/blob/master/src/MdWsSeiRest.php"
click node_procedure "https://github.com/pengovbr/mod-wssei/blob/master/src/rn/MdWsSeiProcedimentoRN.php"
click node_procedurev1 "https://github.com/pengovbr/mod-wssei/blob/master/src/rn/MdWsSeiProcedimento_V1_RN.php"
click node_document "https://github.com/pengovbr/mod-wssei/blob/master/src/rn/MdWsSeiDocumentoRN.php"
click node_documentv1 "https://github.com/pengovbr/mod-wssei/blob/master/src/rn/MdWsSeiDocumento_V1_RN.php"
click node_protocol "https://github.com/pengovbr/mod-wssei/blob/master/src/dto/MdWsSeiPesquisaProtocoloSolrDTO.php"
click node_activity "https://github.com/pengovbr/mod-wssei/blob/master/src/rn/MdWsSeiAtividadeRN.php"
click node_tracking "https://github.com/pengovbr/mod-wssei/blob/master/src/rn/MdWsSeiAcompanhamentoRN.php"
click node_schedule "https://github.com/pengovbr/mod-wssei/blob/master/src/rn/MdWsSeiRetornoProgramadoRN.php"
click node_notifications "https://github.com/pengovbr/mod-wssei/blob/master/src/rn/MdWsSeiNotificacaoRN.php"
click node_users "https://github.com/pengovbr/mod-wssei/blob/master/src/rn/MdWsSeiUsuarioRN.php"
click node_units "https://github.com/pengovbr/mod-wssei/blob/master/src/rn/MdWsSeiUnidadeRN.php"
click node_configuration "https://github.com/pengovbr/mod-wssei/blob/master/src/config/ConfiguracaoMdWSSEI.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_rest,node_editor,node_v2,node_version,node_module,node_client toneBlue
class node_procedure,node_procedurev1,node_document,node_documentv1,node_protocol toneAmber
class node_activity,node_tracking,node_schedule,node_notifications toneMint
class node_users,node_units,node_configuration toneRose
class node_sei toneIndigo
```

## Components

### REST API

- [REST controller](https://github.com/pengovbr/mod-wssei/blob/master/src/controlador_ws.php): `src/controlador_ws.php`
- [External editor](https://github.com/pengovbr/mod-wssei/blob/master/src/controlador_editor_externo.php): `src/controlador_editor_externo.php`
- [Version 2 services](https://github.com/pengovbr/mod-wssei/blob/master/src/versao/v2/MdWsSeiServicosV2.php): `src/versao/v2/MdWsSeiServicosV2.php`
- [Service versions](https://github.com/pengovbr/mod-wssei/blob/master/src/versao/MdWsSeiVersaoServicos.php): `src/versao/MdWsSeiVersaoServicos.php`
- [Module registration](https://github.com/pengovbr/mod-wssei/blob/master/src/MdWsSeiRest.php): `src/MdWsSeiRest.php`

### Process and Documents

- [Procedures](https://github.com/pengovbr/mod-wssei/blob/master/src/rn/MdWsSeiProcedimentoRN.php): `src/rn/MdWsSeiProcedimentoRN.php`
- [Procedures v1](https://github.com/pengovbr/mod-wssei/blob/master/src/rn/MdWsSeiProcedimento_V1_RN.php): `src/rn/MdWsSeiProcedimento_V1_RN.php`
- [Documents](https://github.com/pengovbr/mod-wssei/blob/master/src/rn/MdWsSeiDocumentoRN.php): `src/rn/MdWsSeiDocumentoRN.php`
- [Documents v1](https://github.com/pengovbr/mod-wssei/blob/master/src/rn/MdWsSeiDocumento_V1_RN.php): `src/rn/MdWsSeiDocumento_V1_RN.php`
- [Protocol search](https://github.com/pengovbr/mod-wssei/blob/master/src/dto/MdWsSeiPesquisaProtocoloSolrDTO.php): `src/dto/MdWsSeiPesquisaProtocoloSolrDTO.php`

### Activities and Tracking

- [Activities](https://github.com/pengovbr/mod-wssei/blob/master/src/rn/MdWsSeiAtividadeRN.php): `src/rn/MdWsSeiAtividadeRN.php`
- [Tracking](https://github.com/pengovbr/mod-wssei/blob/master/src/rn/MdWsSeiAcompanhamentoRN.php): `src/rn/MdWsSeiAcompanhamentoRN.php`
- [Scheduled returns](https://github.com/pengovbr/mod-wssei/blob/master/src/rn/MdWsSeiRetornoProgramadoRN.php): `src/rn/MdWsSeiRetornoProgramadoRN.php`
- [Notifications](https://github.com/pengovbr/mod-wssei/blob/master/src/rn/MdWsSeiNotificacaoRN.php): `src/rn/MdWsSeiNotificacaoRN.php`

### Identity and Setup

- [Users](https://github.com/pengovbr/mod-wssei/blob/master/src/rn/MdWsSeiUsuarioRN.php): `src/rn/MdWsSeiUsuarioRN.php`
- [Units](https://github.com/pengovbr/mod-wssei/blob/master/src/rn/MdWsSeiUnidadeRN.php): `src/rn/MdWsSeiUnidadeRN.php`
- [Module configuration](https://github.com/pengovbr/mod-wssei/blob/master/src/config/ConfiguracaoMdWSSEI.php): `src/config/ConfiguracaoMdWSSEI.php`

### Other components

- **API client**
- **SEI system**

## Connections

- API client → REST controller: sends request (evidence: `README.md`)
- REST controller → Version 2 services: dispatches to
- External editor → Version 2 services: uses services
- Module registration → Service versions: registers services
- Version 2 services → Procedures: delegates to
- Version 2 services → Procedures v1: delegates to
- Version 2 services → Documents: delegates to
- Version 2 services → Documents v1: delegates to
- Version 2 services → Protocol search: uses data shape
- Version 2 services → Activities: delegates to
- Version 2 services → Tracking: delegates to
- Version 2 services → Scheduled returns: delegates to
- Version 2 services → Notifications: delegates to
- Version 2 services → Users: delegates to
- Version 2 services → Units: delegates to
- Module configuration → Module registration: configures
- Version 2 services → SEI system: accesses
