# aurum0124/dtmsxpaperlessngx architecture

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

## Overview

This is a staff-facing document tracking and management system backed by PaperlessNGX, with a public tracking interface. Staff retrieve and filter office documents, route or release them, record review actions, and archive copies in digital cabinets; the public can look up tracking status. The graph preserves documented routing modes, endorsements, barcode, AI suggestions, search, and archiving as product capabilities. Sampled source confirms key fetch, transfer, Paperless proxy/sync, and statistics integrations; unsampled feature wiring is represented only where documented, without asserting unverified calls.

Main entry points: [`frontend/src/services/api.js`](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/services/api.js) (API client), [`backend/routes/api.php`](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/backend/routes/api.php) (API routes), [`frontend/src/App.jsx`](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/App.jsx) (App routing), [`frontend/src/pages/DepartmentDashboard.jsx`](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/pages/DepartmentDashboard.jsx) (Office dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["User interfaces"]
  node_app["App routing<br/>[App.jsx]"]
  node_public_tracker["Public tracker<br/>[PublicTracker.jsx]"]
  node_dashboard["Office dashboard"]
  node_doc_state["Document retrieval"]
  node_search["Search and filters<br/>[useSearchState.js]"]
  node_document_list["Document lists<br/>[DocumentList.jsx]"]
  node_viewer["Document viewer"]
  node_api["API client<br/>[api.js]"]
end

subgraph group_workflow["Document workflow"]
  node_upload["Upload and suggestions<br/>[UploadModal.jsx]"]
  node_release_receive["Release and receive<br/>[ReleaseModal.jsx]"]
  node_route_templates["Route templates"]
end

subgraph group_archive["Archive and oversight"]
  node_archive_ui["Digital cabinets<br/>[CabinetsView.jsx]"]
  node_stats_ui["Dashboard analytics<br/>[DashboardView.jsx]"]
  node_admin_ui["Administration<br/>[Admin.jsx]"]
end

subgraph group_backend["API services"]
  node_routes["API routes<br/>[api.php]"]
  node_transfer["Transfer workflow"]
  node_status["Status and review"]
  node_archive_api["Archive management"]
  node_tracker_api["Public tracking"]
  node_stats_api["Statistics"]
  node_preview["Preview proxy"]
  node_transfer_model[("Transfer records")]
  node_archive_model[("Archive records<br/>[ArchiveCabinet.php]")]
end

node_citizen(("Public user"))
node_staff(("Office staff"))
node_paperless["PaperlessNGX"]
node_database[("Application database")]

node_citizen -->|"opens tracker"| node_app
node_staff -->|"opens workspace"| node_app
node_app -->|"routes"| node_public_tracker
node_app -->|"routes"| node_dashboard
node_dashboard -->|"loads documents"| node_doc_state
node_doc_state -->|"requests data"| node_api
node_search -->|"filters results"| node_document_list
node_dashboard -->|"renders"| node_document_list
node_staff -->|"submits documents"| node_upload
node_staff -->|"routes documents"| node_release_receive
node_staff -->|"reviews documents"| node_viewer
node_route_templates -->|"manages routes"| node_api
node_release_receive -->|"records transfer"| node_api
node_viewer -->|"records actions"| node_api
node_archive_ui -->|"manages placements"| node_api
node_stats_ui -->|"requests metrics"| node_api
node_admin_ui -->|"manages offices"| node_api
node_public_tracker -->|"looks up status"| node_api
node_api -->|"sends requests"| node_routes
node_routes -->|"dispatches transfers"| node_transfer
node_routes -->|"dispatches review"| node_status
node_routes -->|"dispatches archive"| node_archive_api
node_routes -->|"dispatches lookup"| node_tracker_api
node_routes -->|"dispatches metrics"| node_stats_api
node_routes -->|"dispatches preview"| node_preview
node_transfer -->|"reads and writes"| node_transfer_model
node_transfer -->|"syncs tags and fields"| node_paperless
node_archive_api -->|"reads and writes"| node_archive_model
node_stats_api -->|"reads activity records"| node_database
node_stats_api -->|"queries documents"| node_paperless
node_preview -->|"fetches previews"| node_paperless
node_tracker_api -->|"looks up documents"| node_paperless
node_viewer -.->|"loads preview"| node_preview

click node_app "https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/App.jsx"
click node_public_tracker "https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/pages/PublicTracker.jsx"
click node_dashboard "https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/pages/DepartmentDashboard.jsx"
click node_doc_state "https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/hooks/useDocumentState.js"
click node_search "https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/hooks/useSearchState.js"
click node_document_list "https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/components/document/DocumentList.jsx"
click node_viewer "https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/components/modals/DocumentViewerModal.jsx"
click node_upload "https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/components/modals/UploadModal.jsx"
click node_release_receive "https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/components/modals/ReleaseModal.jsx"
click node_route_templates "https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/components/RouteTemplatesView.jsx"
click node_archive_ui "https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/components/CabinetsView.jsx"
click node_stats_ui "https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/components/document/DashboardView.jsx"
click node_admin_ui "https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/pages/Admin.jsx"
click node_api "https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/services/api.js"
click node_routes "https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/backend/routes/api.php"
click node_transfer "https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/backend/app/Http/Controllers/DocumentTransferController.php"
click node_status "https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/backend/app/Http/Controllers/DocumentStatusController.php"
click node_archive_api "https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/backend/app/Http/Controllers/ArchiveCabinetController.php"
click node_tracker_api "https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/backend/app/Http/Controllers/TrackerController.php"
click node_stats_api "https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/backend/app/Http/Controllers/AdminStatsController.php"
click node_preview "https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/backend/app/Http/Controllers/PreviewProxyController.php"
click node_transfer_model "https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/backend/app/Models/DocumentTransfer.php"
click node_archive_model "https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/backend/app/Models/ArchiveCabinet.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_app,node_public_tracker,node_dashboard,node_doc_state,node_search,node_document_list,node_viewer,node_api,node_citizen toneBlue
class node_upload,node_release_receive,node_route_templates,node_database toneAmber
class node_archive_ui,node_stats_ui,node_admin_ui toneMint
class node_routes,node_transfer,node_status,node_archive_api,node_tracker_api,node_stats_api,node_preview,node_transfer_model,node_archive_model toneRose
class node_staff,node_paperless toneIndigo
```

## Components

### User interfaces

- [App routing](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Public tracker](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/pages/PublicTracker.jsx): `frontend/src/pages/PublicTracker.jsx`
- [Office dashboard](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/pages/DepartmentDashboard.jsx): `frontend/src/pages/DepartmentDashboard.jsx`
- [Document retrieval](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/hooks/useDocumentState.js): `frontend/src/hooks/useDocumentState.js`
- [Search and filters](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/hooks/useSearchState.js): `frontend/src/hooks/useSearchState.js`
- [Document lists](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/components/document/DocumentList.jsx): `frontend/src/components/document/DocumentList.jsx`
- [Document viewer](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/components/modals/DocumentViewerModal.jsx): `frontend/src/components/modals/DocumentViewerModal.jsx`
- [API client](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### Document workflow

- [Upload and suggestions](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/components/modals/UploadModal.jsx): `frontend/src/components/modals/UploadModal.jsx`
- [Release and receive](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/components/modals/ReleaseModal.jsx): `frontend/src/components/modals/ReleaseModal.jsx`
- [Route templates](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/components/RouteTemplatesView.jsx): `frontend/src/components/RouteTemplatesView.jsx`

### Archive and oversight

- [Digital cabinets](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/components/CabinetsView.jsx): `frontend/src/components/CabinetsView.jsx`
- [Dashboard analytics](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/components/document/DashboardView.jsx): `frontend/src/components/document/DashboardView.jsx`
- [Administration](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/frontend/src/pages/Admin.jsx): `frontend/src/pages/Admin.jsx`

### API services

- [API routes](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/backend/routes/api.php): `backend/routes/api.php`
- [Transfer workflow](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/backend/app/Http/Controllers/DocumentTransferController.php): `backend/app/Http/Controllers/DocumentTransferController.php`
- [Status and review](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/backend/app/Http/Controllers/DocumentStatusController.php): `backend/app/Http/Controllers/DocumentStatusController.php`
- [Archive management](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/backend/app/Http/Controllers/ArchiveCabinetController.php): `backend/app/Http/Controllers/ArchiveCabinetController.php`
- [Public tracking](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/backend/app/Http/Controllers/TrackerController.php): `backend/app/Http/Controllers/TrackerController.php`
- [Statistics](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/backend/app/Http/Controllers/AdminStatsController.php): `backend/app/Http/Controllers/AdminStatsController.php`
- [Preview proxy](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/backend/app/Http/Controllers/PreviewProxyController.php): `backend/app/Http/Controllers/PreviewProxyController.php`
- [Transfer records](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/backend/app/Models/DocumentTransfer.php): `backend/app/Models/DocumentTransfer.php`
- [Archive records](https://github.com/aurum0124/dtmsxpaperlessngx/blob/main/backend/app/Models/ArchiveCabinet.php): `backend/app/Models/ArchiveCabinet.php`

### Other components

- **Public user**
- **Office staff**
- **PaperlessNGX**
- **Application database**

## Connections

- Public user → App routing: opens tracker
- Office staff → App routing: opens workspace
- App routing → Public tracker: routes
- App routing → Office dashboard: routes
- Office dashboard → Document retrieval: loads documents
- Document retrieval → API client: requests data
- Search and filters → Document lists: filters results
- Office dashboard → Document lists: renders
- Office staff → Upload and suggestions: submits documents
- Office staff → Release and receive: routes documents
- Office staff → Document viewer: reviews documents
- Route templates → API client: manages routes
- Release and receive → API client: records transfer
- Document viewer → API client: records actions
- Digital cabinets → API client: manages placements
- Dashboard analytics → API client: requests metrics
- Administration → API client: manages offices
- Public tracker → API client: looks up status
- API client → API routes: sends requests
- API routes → Transfer workflow: dispatches transfers
- API routes → Status and review: dispatches review
- API routes → Archive management: dispatches archive
- API routes → Public tracking: dispatches lookup
- API routes → Statistics: dispatches metrics
- API routes → Preview proxy: dispatches preview
- Transfer workflow → Transfer records: reads and writes
- Transfer workflow → PaperlessNGX: syncs tags and fields
- Archive management → Archive records: reads and writes
- Statistics → Application database: reads activity records
- Statistics → PaperlessNGX: queries documents
- Preview proxy → PaperlessNGX: fetches previews
- Public tracking → PaperlessNGX: looks up documents
- Document viewer → Preview proxy: loads preview
