# ngophatneknha/olp-mnm architecture

> Architecture diagram of the GitHub repository ngophatneknha/olp-mnm, 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/ngophatneknha/olp-mnm
- Repository: https://github.com/ngophatneknha/olp-mnm

## Overview

DX-Lab Project Hub is a web-based workflow digitization platform: staff submit and track cases, while managers draft, review, and publish workflows for execution. The web client reaches platform services through an API gateway; the workflow bridge coordinates workflow compilation, case files and events, search, AI assistance, and platform capabilities. The README documents additional governance, analytics, cold archiving, bulk ingestion, and sensor features. Some implementation paths are unsampled, so those capabilities are represented at their supported directory or page level; edges reflect only shown imports or README relationships.

Main entry points: [`services/workflow-bridge/bridge.js`](https://github.com/ngophatneknha/olp-mnm/blob/main/services/workflow-bridge/bridge.js) (Workflow bridge), [`web/src/main.js`](https://github.com/ngophatneknha/olp-mnm/blob/main/web/src/main.js) (Web application), [`web/src/lib.js`](https://github.com/ngophatneknha/olp-mnm/blob/main/web/src/lib.js) (API and auth client), [`web/src/pages/Submission.vue`](https://github.com/ngophatneknha/olp-mnm/blob/main/web/src/pages/Submission.vue) (Case tracking)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_webapp["Web application<br/>[main.js]"]
  node_caseforms["Case forms<br/>[Apps.vue]"]
  node_caseviews["Case tracking<br/>[Submission.vue]"]
  node_builder["Workflow builder<br/>[Builder.vue]"]
  node_processes["Process proposals<br/>[Processes.vue]"]
  node_analytics["Operational analytics<br/>[Stats.vue]"]
  node_processflow["Process visualization<br/>[ProcessFlow.vue]"]
  node_signatures["Approval signatures<br/>[SignatureRow.vue]"]
  node_api_client["API and auth client<br/>[lib.js]"]
  node_live["Live updates<br/>[live.js]"]
end

subgraph group_workflow["Workflow and cases"]
  node_bridge["Workflow bridge<br/>[bridge.js]"]
  node_compiler["Workflow compiler<br/>[compile.js]"]
  node_ai["AI drafting<br/>[ai.js]"]
  node_probation["AI probation<br/>[probation.js]"]
  node_casefiles["Case files<br/>[files.js]"]
  node_ingestion["Bulk ingestion<br/>[ingest.js]"]
  node_search["Search and Q&amp;A<br/>[search.js]"]
  node_events["Case events<br/>[events.js]"]
  node_sensors["Sensor workflows<br/>[sensors.js]"]
end

subgraph group_platform["Platform services"]
  node_gateway["API gateway"]
  node_keycloak["Keycloak identity"]
  node_hasura["Hasura data API"]
  node_postgres[("PostgreSQL")]
  node_flowable["BPMN engine"]
  node_objectstore[("S3 storage")]
end

subgraph group_trust["Trust and operations"]
  node_cold["Cold archive and lineage<br/>[cold.js]"]
  node_pki["Digital signatures<br/>[pki.js]"]
  node_organizations["Organization isolation<br/>[orgs.js]"]
  node_clamav["Malware scanner"]
end

node_staff(("Staff and managers"))
node_devices(("Devices and sensors"))

node_staff -->|"uses"| node_webapp
node_webapp -->|"initializes"| node_api_client
node_api_client -->|"authenticates"| node_keycloak
node_api_client -->|"calls API"| node_gateway
node_webapp -->|"routes to"| node_caseforms
node_webapp -->|"routes to"| node_caseviews
node_webapp -->|"routes to"| node_builder
node_webapp -->|"routes to"| node_processes
node_webapp -->|"routes to"| node_analytics
node_caseforms -->|"renders"| node_signatures
node_caseviews -->|"renders"| node_processflow
node_caseviews -->|"renders"| node_signatures
node_analytics -->|"queries"| node_api_client
node_api_client -->|"starts stream"| node_live
node_gateway -->|"verifies tokens"| node_keycloak
node_gateway -->|"routes data"| node_hasura
node_gateway -->|"routes requests"| node_bridge
node_hasura -->|"reads and writes"| node_postgres
node_bridge -->|"delegates"| node_compiler
node_bridge -->|"delegates"| node_ai
node_bridge -->|"delegates"| node_casefiles
node_bridge -->|"delegates"| node_events
node_bridge -->|"delegates"| node_ingestion
node_bridge -->|"delegates"| node_sensors
node_bridge -->|"delegates"| node_probation
node_bridge -->|"delegates"| node_search
node_bridge -->|"delegates"| node_pki
node_bridge -->|"delegates"| node_organizations
node_bridge -->|"delegates"| node_cold
node_bridge -->|"publishes workflows"| node_flowable
node_hasura -->|"sends events"| node_bridge
node_bridge -->|"uses data API"| node_hasura
node_casefiles -->|"scans uploads"| node_clamav
node_casefiles -->|"stores files"| node_objectstore
node_cold -->|"archives records"| node_objectstore
node_cold -->|"reads and records"| node_postgres
node_ingestion -->|"inserts cases"| node_hasura
node_search -->|"checks access"| node_hasura
node_search -->|"requests answers"| node_ai
node_sensors -->|"receives telemetry"| node_devices
node_devices -->|"sends token data"| node_gateway

click node_webapp "https://github.com/ngophatneknha/olp-mnm/blob/main/web/src/main.js"
click node_caseforms "https://github.com/ngophatneknha/olp-mnm/blob/main/web/src/pages/Apps.vue"
click node_caseviews "https://github.com/ngophatneknha/olp-mnm/blob/main/web/src/pages/Submission.vue"
click node_builder "https://github.com/ngophatneknha/olp-mnm/blob/main/web/src/pages/Builder.vue"
click node_processes "https://github.com/ngophatneknha/olp-mnm/blob/main/web/src/pages/Processes.vue"
click node_analytics "https://github.com/ngophatneknha/olp-mnm/blob/main/web/src/pages/Stats.vue"
click node_processflow "https://github.com/ngophatneknha/olp-mnm/blob/main/web/src/components/ProcessFlow.vue"
click node_signatures "https://github.com/ngophatneknha/olp-mnm/blob/main/web/src/components/SignatureRow.vue"
click node_api_client "https://github.com/ngophatneknha/olp-mnm/blob/main/web/src/lib.js"
click node_live "https://github.com/ngophatneknha/olp-mnm/blob/main/web/src/live.js"
click node_bridge "https://github.com/ngophatneknha/olp-mnm/blob/main/services/workflow-bridge/bridge.js"
click node_compiler "https://github.com/ngophatneknha/olp-mnm/blob/main/services/workflow-bridge/compile.js"
click node_ai "https://github.com/ngophatneknha/olp-mnm/blob/main/services/workflow-bridge/ai.js"
click node_probation "https://github.com/ngophatneknha/olp-mnm/blob/main/services/workflow-bridge/probation.js"
click node_casefiles "https://github.com/ngophatneknha/olp-mnm/blob/main/services/workflow-bridge/files.js"
click node_ingestion "https://github.com/ngophatneknha/olp-mnm/blob/main/services/workflow-bridge/ingest.js"
click node_search "https://github.com/ngophatneknha/olp-mnm/blob/main/services/workflow-bridge/search.js"
click node_events "https://github.com/ngophatneknha/olp-mnm/blob/main/services/workflow-bridge/events.js"
click node_sensors "https://github.com/ngophatneknha/olp-mnm/blob/main/services/workflow-bridge/sensors.js"
click node_cold "https://github.com/ngophatneknha/olp-mnm/blob/main/services/workflow-bridge/cold.js"
click node_pki "https://github.com/ngophatneknha/olp-mnm/blob/main/services/workflow-bridge/pki.js"
click node_organizations "https://github.com/ngophatneknha/olp-mnm/blob/main/services/workflow-bridge/orgs.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_webapp,node_caseforms,node_caseviews,node_builder,node_processes,node_analytics,node_processflow,node_signatures,node_api_client,node_live toneBlue
class node_bridge,node_compiler,node_ai,node_probation,node_casefiles,node_ingestion,node_search,node_events,node_sensors toneAmber
class node_gateway,node_keycloak,node_hasura,node_postgres,node_flowable,node_objectstore toneMint
class node_cold,node_pki,node_organizations,node_clamav toneRose
class node_staff,node_devices toneIndigo
```

## Components

### Web experience

- [Web application](https://github.com/ngophatneknha/olp-mnm/blob/main/web/src/main.js): `web/src/main.js`
- [Case forms](https://github.com/ngophatneknha/olp-mnm/blob/main/web/src/pages/Apps.vue): `web/src/pages/Apps.vue`
- [Case tracking](https://github.com/ngophatneknha/olp-mnm/blob/main/web/src/pages/Submission.vue): `web/src/pages/Submission.vue`
- [Workflow builder](https://github.com/ngophatneknha/olp-mnm/blob/main/web/src/pages/Builder.vue): `web/src/pages/Builder.vue`
- [Process proposals](https://github.com/ngophatneknha/olp-mnm/blob/main/web/src/pages/Processes.vue): `web/src/pages/Processes.vue`
- [Operational analytics](https://github.com/ngophatneknha/olp-mnm/blob/main/web/src/pages/Stats.vue): `web/src/pages/Stats.vue`
- [Process visualization](https://github.com/ngophatneknha/olp-mnm/blob/main/web/src/components/ProcessFlow.vue): `web/src/components/ProcessFlow.vue`
- [Approval signatures](https://github.com/ngophatneknha/olp-mnm/blob/main/web/src/components/SignatureRow.vue): `web/src/components/SignatureRow.vue`
- [API and auth client](https://github.com/ngophatneknha/olp-mnm/blob/main/web/src/lib.js): `web/src/lib.js`
- [Live updates](https://github.com/ngophatneknha/olp-mnm/blob/main/web/src/live.js): `web/src/live.js`

### Workflow and cases

- [Workflow bridge](https://github.com/ngophatneknha/olp-mnm/blob/main/services/workflow-bridge/bridge.js): `services/workflow-bridge/bridge.js`
- [Workflow compiler](https://github.com/ngophatneknha/olp-mnm/blob/main/services/workflow-bridge/compile.js): `services/workflow-bridge/compile.js`
- [AI drafting](https://github.com/ngophatneknha/olp-mnm/blob/main/services/workflow-bridge/ai.js): `services/workflow-bridge/ai.js`
- [AI probation](https://github.com/ngophatneknha/olp-mnm/blob/main/services/workflow-bridge/probation.js): `services/workflow-bridge/probation.js`
- [Case files](https://github.com/ngophatneknha/olp-mnm/blob/main/services/workflow-bridge/files.js): `services/workflow-bridge/files.js`
- [Bulk ingestion](https://github.com/ngophatneknha/olp-mnm/blob/main/services/workflow-bridge/ingest.js): `services/workflow-bridge/ingest.js`
- [Search and Q&A](https://github.com/ngophatneknha/olp-mnm/blob/main/services/workflow-bridge/search.js): `services/workflow-bridge/search.js`
- [Case events](https://github.com/ngophatneknha/olp-mnm/blob/main/services/workflow-bridge/events.js): `services/workflow-bridge/events.js`
- [Sensor workflows](https://github.com/ngophatneknha/olp-mnm/blob/main/services/workflow-bridge/sensors.js): `services/workflow-bridge/sensors.js`

### Platform services

- **API gateway**
- **Keycloak identity**
- **Hasura data API**
- **PostgreSQL**
- **BPMN engine**
- **S3 storage**

### Trust and operations

- [Cold archive and lineage](https://github.com/ngophatneknha/olp-mnm/blob/main/services/workflow-bridge/cold.js): `services/workflow-bridge/cold.js`
- [Digital signatures](https://github.com/ngophatneknha/olp-mnm/blob/main/services/workflow-bridge/pki.js): `services/workflow-bridge/pki.js`
- [Organization isolation](https://github.com/ngophatneknha/olp-mnm/blob/main/services/workflow-bridge/orgs.js): `services/workflow-bridge/orgs.js`
- **Malware scanner**

### Other components

- **Staff and managers**
- **Devices and sensors**

## Connections

- Staff and managers → Web application: uses
- Web application → API and auth client: initializes (evidence: `web/src/main.js`)
- API and auth client → Keycloak identity: authenticates
- API and auth client → API gateway: calls API
- Web application → Case forms: routes to (evidence: `web/src/main.js`)
- Web application → Case tracking: routes to (evidence: `web/src/main.js`)
- Web application → Workflow builder: routes to (evidence: `web/src/main.js`)
- Web application → Process proposals: routes to (evidence: `web/src/main.js`)
- Web application → Operational analytics: routes to (evidence: `web/src/main.js`)
- Case forms → Approval signatures: renders (evidence: `web/src/pages/Apps.vue`)
- Case tracking → Process visualization: renders (evidence: `web/src/pages/Submission.vue`)
- Case tracking → Approval signatures: renders (evidence: `web/src/pages/Submission.vue`)
- Operational analytics → API and auth client: queries (evidence: `web/src/pages/Stats.vue`)
- API and auth client → Live updates: starts stream (evidence: `web/src/lib.js`)
- API gateway → Keycloak identity: verifies tokens
- API gateway → Hasura data API: routes data
- API gateway → Workflow bridge: routes requests
- Hasura data API → PostgreSQL: reads and writes
- Workflow bridge → Workflow compiler: delegates (evidence: `services/workflow-bridge/bridge.js`)
- Workflow bridge → AI drafting: delegates (evidence: `services/workflow-bridge/bridge.js`)
- Workflow bridge → Case files: delegates (evidence: `services/workflow-bridge/bridge.js`)
- Workflow bridge → Case events: delegates (evidence: `services/workflow-bridge/bridge.js`)
- Workflow bridge → Bulk ingestion: delegates (evidence: `services/workflow-bridge/bridge.js`)
- Workflow bridge → Sensor workflows: delegates (evidence: `services/workflow-bridge/bridge.js`)
- Workflow bridge → AI probation: delegates (evidence: `services/workflow-bridge/bridge.js`)
- Workflow bridge → Search and Q&A: delegates (evidence: `services/workflow-bridge/bridge.js`)
- Workflow bridge → Digital signatures: delegates (evidence: `services/workflow-bridge/bridge.js`)
- Workflow bridge → Organization isolation: delegates (evidence: `services/workflow-bridge/bridge.js`)
- Workflow bridge → Cold archive and lineage: delegates (evidence: `services/workflow-bridge/bridge.js`)
- Workflow bridge → BPMN engine: publishes workflows
- Hasura data API → Workflow bridge: sends events
- Workflow bridge → Hasura data API: uses data API
- Case files → Malware scanner: scans uploads (evidence: `services/workflow-bridge/files.js`)
- Case files → S3 storage: stores files (evidence: `services/workflow-bridge/files.js`)
- Cold archive and lineage → S3 storage: archives records (evidence: `services/workflow-bridge/cold.js`)
- Cold archive and lineage → PostgreSQL: reads and records (evidence: `services/workflow-bridge/cold.js`)
- Bulk ingestion → Hasura data API: inserts cases (evidence: `services/workflow-bridge/ingest.js`)
- Search and Q&A → Hasura data API: checks access (evidence: `services/workflow-bridge/search.js`)
- Search and Q&A → AI drafting: requests answers (evidence: `services/workflow-bridge/search.js`)
- Sensor workflows → Devices and sensors: receives telemetry
- Devices and sensors → API gateway: sends token data
