# farisifakhri/lpmqtashihhub architecture

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

- Interactive diagram: https://gitdiagram.com/farisifakhri/lpmqtashihhub
- Repository: https://github.com/farisifakhri/lpmqtashihhub

## Overview

This is a LPMQ service-management portal for publishers and internal staff. Publishers submit service registrations and documents; staff handle physical intake, verification and approval, payment checks, distribution and subsequent tashih/documentation work. The React portal calls an Express API whose services implement domain operations and persist state through Prisma/MySQL, with private file storage for uploads. The README documents the full SOP capabilities; sampled source confirms key verification, payment, distribution and file-handling links. Some UI-to-endpoint and later-stage wiring is inferred only from module names, so those links are kept broad or omitted.

Main entry points: [`frontend/src/app/App.jsx`](https://github.com/farisifakhri/lpmqtashihhub/blob/main/frontend/src/app/App.jsx) (LPMQ portal), [`frontend/src/api/client.js`](https://github.com/farisifakhri/lpmqtashihhub/blob/main/frontend/src/api/client.js) (API client), [`backend/src/routes/workflow.routes.js`](https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/routes/workflow.routes.js) (Workflow routes), [`backend/src/routes/verification.routes.js`](https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/routes/verification.routes.js) (Verification routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portal["User portal"]
  node_webapp["LPMQ portal<br/>[App.jsx]"]
  node_authui["Login and roles<br/>[AuthContext.jsx]"]
  node_registrationui["Registration portal"]
  node_verificationui["Verification workspace"]
  node_distributionui["Distribution workspace"]
  node_tashihui["Pentashih workspace"]
  node_signatureui["Signature center"]
  node_apiclient["API client<br/>[client.js]"]
end

subgraph group_intake["Intake and verification"]
  node_registrationroutes["Registration routes"]
  node_verificationroutes["Verification routes"]
  node_registration["Registration service"]
  node_intake["Physical intake"]
  node_review["Verification review"]
  node_signing["Digital signing"]
end

subgraph group_fulfillment["Payment and fulfillment"]
  node_workflowroutes["Workflow routes<br/>[workflow.routes.js]"]
  node_payment["Payment service<br/>[payment.service.js]"]
  node_distribution["Distribution service"]
  node_documents["Official documents"]
end

subgraph group_platform["API and platform"]
  node_routes["API router<br/>[index.js]"]
  node_authroutes["Authentication routes<br/>[auth.routes.js]"]
  node_notification["Notifications"]
  node_sla["SLA monitoring<br/>[sla.service.js]"]
  node_storage["Private file storage<br/>[storage.service.js]"]
  node_backend["Express API<br/>[app.js]"]
  node_database[("MySQL database<br/>[database.js]")]
end

node_publishers(("Publishers"))
node_staff(("Internal staff"))
node_email["Email provider"]
node_external["External systems"]

node_publishers -->|"use portal"| node_webapp
node_staff -->|"use portal"| node_webapp
node_webapp -->|"provides session"| node_authui
node_webapp -->|"routes users"| node_registrationui
node_webapp -->|"routes staff"| node_verificationui
node_webapp -->|"routes staff"| node_distributionui
node_webapp -->|"routes staff"| node_tashihui
node_webapp -->|"routes staff"| node_signatureui
node_registrationui -->|"requests data"| node_apiclient
node_verificationui -->|"requests data"| node_apiclient
node_distributionui -->|"requests data"| node_apiclient
node_tashihui -->|"requests data"| node_apiclient
node_signatureui -->|"requests data"| node_apiclient
node_authui -->|"authenticates"| node_apiclient
node_apiclient -->|"HTTP requests"| node_backend
node_backend -->|"mounts API"| node_routes
node_routes -->|"dispatches"| node_authroutes
node_routes -->|"dispatches"| node_registrationroutes
node_routes -->|"dispatches"| node_verificationroutes
node_routes -->|"dispatches"| node_workflowroutes
node_registrationroutes -->|"invokes"| node_registration
node_verificationroutes -->|"invokes"| node_intake
node_verificationroutes -->|"invokes"| node_review
node_verificationroutes -->|"invokes"| node_signing
node_verificationroutes -->|"reads files"| node_storage
node_workflowroutes -->|"invokes"| node_payment
node_workflowroutes -->|"invokes"| node_distribution
node_workflowroutes -->|"invokes"| node_documents
node_workflowroutes -->|"invokes"| node_notification
node_workflowroutes -->|"uploads files"| node_storage
node_backend -->|"uses Prisma"| node_database
node_storage -->|"records metadata"| node_database
node_review -->|"updates workflow"| node_database
node_backend -->|"checks overdue work"| node_sla
node_notification -.->|"sends messages"| node_email
node_backend -.->|"syncs status"| node_external

click node_webapp "https://github.com/farisifakhri/lpmqtashihhub/blob/main/frontend/src/app/App.jsx"
click node_authui "https://github.com/farisifakhri/lpmqtashihhub/blob/main/frontend/src/features/auth/AuthContext.jsx"
click node_registrationui "https://github.com/farisifakhri/lpmqtashihhub/blob/main/frontend/src/features/registrations/PublisherRegistrationsPage.jsx"
click node_verificationui "https://github.com/farisifakhri/lpmqtashihhub/blob/main/frontend/src/features/verification/VerificationInspectionPage.jsx"
click node_distributionui "https://github.com/farisifakhri/lpmqtashihhub/blob/main/frontend/src/features/distribution/DistributorHandoverInboxPage.jsx"
click node_tashihui "https://github.com/farisifakhri/lpmqtashihhub/blob/main/frontend/src/features/tashih/PentashihWorkspacePage.jsx"
click node_signatureui "https://github.com/farisifakhri/lpmqtashihhub/blob/main/frontend/src/features/signatures/SignatureCenterPage.jsx"
click node_apiclient "https://github.com/farisifakhri/lpmqtashihhub/blob/main/frontend/src/api/client.js"
click node_routes "https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/routes/index.js"
click node_authroutes "https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/routes/auth.routes.js"
click node_registrationroutes "https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/routes/registration.routes.js"
click node_verificationroutes "https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/routes/verification.routes.js"
click node_workflowroutes "https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/routes/workflow.routes.js"
click node_registration "https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/services/registration.service.js"
click node_intake "https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/services/verification-intake.service.js"
click node_review "https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/services/verification-review.service.js"
click node_signing "https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/services/verification-signing.service.js"
click node_payment "https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/services/payment.service.js"
click node_distribution "https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/services/distribution.service.js"
click node_documents "https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/services/official-document.service.js"
click node_notification "https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/services/notification.service.js"
click node_sla "https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/services/sla.service.js"
click node_storage "https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/services/storage.service.js"
click node_backend "https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/app.js"
click node_database "https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/config/database.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_authui,node_registrationui,node_verificationui,node_distributionui,node_tashihui,node_signatureui,node_apiclient toneBlue
class node_registrationroutes,node_verificationroutes,node_registration,node_intake,node_review,node_signing toneAmber
class node_workflowroutes,node_payment,node_distribution,node_documents toneMint
class node_routes,node_authroutes,node_notification,node_sla,node_storage,node_backend,node_database toneRose
class node_publishers,node_staff,node_email,node_external toneIndigo
```

## Components

### User portal

- [LPMQ portal](https://github.com/farisifakhri/lpmqtashihhub/blob/main/frontend/src/app/App.jsx): `frontend/src/app/App.jsx`
- [Login and roles](https://github.com/farisifakhri/lpmqtashihhub/blob/main/frontend/src/features/auth/AuthContext.jsx): `frontend/src/features/auth/AuthContext.jsx`
- [Registration portal](https://github.com/farisifakhri/lpmqtashihhub/blob/main/frontend/src/features/registrations/PublisherRegistrationsPage.jsx): `frontend/src/features/registrations/PublisherRegistrationsPage.jsx`
- [Verification workspace](https://github.com/farisifakhri/lpmqtashihhub/blob/main/frontend/src/features/verification/VerificationInspectionPage.jsx): `frontend/src/features/verification/VerificationInspectionPage.jsx`
- [Distribution workspace](https://github.com/farisifakhri/lpmqtashihhub/blob/main/frontend/src/features/distribution/DistributorHandoverInboxPage.jsx): `frontend/src/features/distribution/DistributorHandoverInboxPage.jsx`
- [Pentashih workspace](https://github.com/farisifakhri/lpmqtashihhub/blob/main/frontend/src/features/tashih/PentashihWorkspacePage.jsx): `frontend/src/features/tashih/PentashihWorkspacePage.jsx`
- [Signature center](https://github.com/farisifakhri/lpmqtashihhub/blob/main/frontend/src/features/signatures/SignatureCenterPage.jsx): `frontend/src/features/signatures/SignatureCenterPage.jsx`
- [API client](https://github.com/farisifakhri/lpmqtashihhub/blob/main/frontend/src/api/client.js): `frontend/src/api/client.js`

### Intake and verification

- [Registration routes](https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/routes/registration.routes.js): `backend/src/routes/registration.routes.js`
- [Verification routes](https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/routes/verification.routes.js): `backend/src/routes/verification.routes.js`
- [Registration service](https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/services/registration.service.js): `backend/src/services/registration.service.js`
- [Physical intake](https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/services/verification-intake.service.js): `backend/src/services/verification-intake.service.js`
- [Verification review](https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/services/verification-review.service.js): `backend/src/services/verification-review.service.js`
- [Digital signing](https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/services/verification-signing.service.js): `backend/src/services/verification-signing.service.js`

### Payment and fulfillment

- [Workflow routes](https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/routes/workflow.routes.js): `backend/src/routes/workflow.routes.js`
- [Payment service](https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/services/payment.service.js): `backend/src/services/payment.service.js`
- [Distribution service](https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/services/distribution.service.js): `backend/src/services/distribution.service.js`
- [Official documents](https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/services/official-document.service.js): `backend/src/services/official-document.service.js`

### API and platform

- [API router](https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/routes/index.js): `backend/src/routes/index.js`
- [Authentication routes](https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/routes/auth.routes.js): `backend/src/routes/auth.routes.js`
- [Notifications](https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/services/notification.service.js): `backend/src/services/notification.service.js`
- [SLA monitoring](https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/services/sla.service.js): `backend/src/services/sla.service.js`
- [Private file storage](https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/services/storage.service.js): `backend/src/services/storage.service.js`
- [Express API](https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/app.js): `backend/src/app.js`
- [MySQL database](https://github.com/farisifakhri/lpmqtashihhub/blob/main/backend/src/config/database.js): `backend/src/config/database.js`

### Other components

- **Publishers**
- **Internal staff**
- **Email provider**
- **External systems**

## Connections

- Publishers → LPMQ portal: use portal
- Internal staff → LPMQ portal: use portal
- LPMQ portal → Login and roles: provides session
- LPMQ portal → Registration portal: routes users
- LPMQ portal → Verification workspace: routes staff
- LPMQ portal → Distribution workspace: routes staff
- LPMQ portal → Pentashih workspace: routes staff
- LPMQ portal → Signature center: routes staff
- Registration portal → API client: requests data
- Verification workspace → API client: requests data
- Distribution workspace → API client: requests data
- Pentashih workspace → API client: requests data
- Signature center → API client: requests data
- Login and roles → API client: authenticates
- API client → Express API: HTTP requests
- Express API → API router: mounts API
- API router → Authentication routes: dispatches
- API router → Registration routes: dispatches
- API router → Verification routes: dispatches
- API router → Workflow routes: dispatches
- Registration routes → Registration service: invokes
- Verification routes → Physical intake: invokes
- Verification routes → Verification review: invokes
- Verification routes → Digital signing: invokes
- Verification routes → Private file storage: reads files
- Workflow routes → Payment service: invokes
- Workflow routes → Distribution service: invokes
- Workflow routes → Official documents: invokes
- Workflow routes → Notifications: invokes
- Workflow routes → Private file storage: uploads files
- Express API → MySQL database: uses Prisma
- Private file storage → MySQL database: records metadata
- Verification review → MySQL database: updates workflow
- Express API → SLA monitoring: checks overdue work
- Notifications → Email provider: sends messages
- Express API → External systems: syncs status
