# zzjoennzz/erms-app architecture

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

- Interactive diagram: https://gitdiagram.com/zzjoennzz/erms-app
- Repository: https://github.com/zzjoennzz/erms-app

## Overview

eRMS is a web-based records management system. Staff use the React interface to authenticate and work with records and their disposition schedules; backend APIs handle submission, approval, transfers, borrowing, disposal, reporting, and audit history against relational models. The README also documents search, access control, audit trails, secure storage, and responsive access. API route declarations and sampled controller/model references support the main links; unsampled frontend and API subsystems are represented at their exact tree paths, without asserting internal call sequences.

Main entry points: [`routes/api.php`](https://github.com/zzjoennzz/erms-app/blob/main/routes/api.php) (API routes), [`app/Http/Controllers/api/RDSRecordController.php`](https://github.com/zzjoennzz/erms-app/blob/main/app/Http/Controllers/api/RDSRecordController.php) (Record submission), [`app/Models/RDSRecord.php`](https://github.com/zzjoennzz/erms-app/blob/main/app/Models/RDSRecord.php) (Records and boxes), [`app/Http/Controllers/api/DisposalController.php`](https://github.com/zzjoennzz/erms-app/blob/main/app/Http/Controllers/api/DisposalController.php) (Disposal workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Staff interface"]
  node_spa["React application<br/>[app.jsx]"]
  node_record_ui["Record workspace<br/>[RDSRecord.jsx]"]
  node_report_ui["Reports interface<br/>[Report.jsx]"]
  node_auth_ui["Login interface<br/>[Login.jsx]"]
end

subgraph group_identity["Identity and access"]
  node_api_routes["API routes<br/>[api.php]"]
  node_auth_api["Passport authentication"]
  node_users["Users and roles<br/>[User.php]"]
  node_branch_admin["Branch administration"]
end

subgraph group_records["Records lifecycle"]
  node_record_api["Record submission"]
  node_record_model["Records and boxes<br/>[RDSRecord.php]"]
  node_documents["Record documents"]
  node_rds_admin["Disposition schedules<br/>[RDSController.php]"]
  node_schedules[("Schedule data")]
end

subgraph group_operations["Movement and disposition"]
  node_transactions["Record transactions"]
  node_transaction_data[("Transaction items")]
  node_borrowing["Borrow and transfer"]
  node_disposal["Disposal workflow"]
  node_disposal_data[("Disposal records<br/>[RecordDisposal.php]")]
  node_turnover["Turnover workflow"]
end

subgraph group_oversight["Reporting and audit"]
  node_misc_api["Search and dashboards<br/>[MiscController.php]"]
  node_activity["Activity log"]
  node_document_history[("Document audit history")]
  node_record_history[("Record history")]
end

node_staff(("Staff user"))
node_database[("Relational database")]

node_staff -->|"uses"| node_spa
node_spa -->|"renders"| node_auth_ui
node_spa -.->|"renders"| node_record_ui
node_spa -.->|"renders"| node_report_ui
node_auth_ui -.->|"authenticates"| node_auth_api
node_record_ui -.->|"requests APIs"| node_api_routes
node_report_ui -.->|"requests reports"| node_api_routes
node_api_routes -->|"routes to"| node_auth_api
node_api_routes -->|"routes to"| node_record_api
node_api_routes -->|"routes to"| node_branch_admin
node_api_routes -->|"routes to"| node_rds_admin
node_api_routes -->|"routes to"| node_transactions
node_api_routes -->|"routes to"| node_borrowing
node_api_routes -->|"routes to"| node_disposal
node_api_routes -->|"routes to"| node_turnover
node_api_routes -->|"routes to"| node_misc_api
node_api_routes -->|"routes to"| node_activity
node_auth_api -->|"reads and writes"| node_users
node_record_api -->|"reads and writes"| node_record_model
node_record_api -->|"reads and writes"| node_documents
node_record_api -->|"writes history"| node_document_history
node_record_api -->|"writes history"| node_record_history
node_record_api -->|"uses schedule"| node_schedules
node_rds_admin -->|"queries records"| node_record_model
node_rds_admin -->|"manages schedules"| node_schedules
node_transactions -->|"updates records"| node_record_model
node_transactions -->|"creates items"| node_transaction_data
node_borrowing -->|"updates documents"| node_documents
node_borrowing -->|"writes history"| node_document_history
node_disposal -->|"queries records"| node_record_model
node_disposal -->|"updates documents"| node_documents
node_disposal -->|"records disposal"| node_disposal_data
node_disposal -->|"writes history"| node_record_history
node_misc_api -->|"searches records"| node_record_model
node_misc_api -->|"queries activity"| node_document_history
node_activity -->|"reads users"| node_users
node_users -.->|"persists"| node_database
node_record_model -.->|"persists"| node_database
node_documents -.->|"persists"| node_database
node_schedules -.->|"persists"| node_database
node_transaction_data -.->|"persists"| node_database
node_disposal_data -.->|"persists"| node_database
node_document_history -.->|"persists"| node_database
node_record_history -.->|"persists"| node_database

click node_spa "https://github.com/zzjoennzz/erms-app/blob/main/resources/js/app.jsx"
click node_record_ui "https://github.com/zzjoennzz/erms-app/blob/main/resources/js/pages/RDSRecord.jsx"
click node_report_ui "https://github.com/zzjoennzz/erms-app/blob/main/resources/js/pages/Report.jsx"
click node_auth_ui "https://github.com/zzjoennzz/erms-app/blob/main/resources/js/pages/Login.jsx"
click node_api_routes "https://github.com/zzjoennzz/erms-app/blob/main/routes/api.php"
click node_auth_api "https://github.com/zzjoennzz/erms-app/blob/main/app/Http/Controllers/api/PassportAuthController.php"
click node_users "https://github.com/zzjoennzz/erms-app/blob/main/app/Models/User.php"
click node_branch_admin "https://github.com/zzjoennzz/erms-app/blob/main/app/Http/Controllers/api/BranchController.php"
click node_record_api "https://github.com/zzjoennzz/erms-app/blob/main/app/Http/Controllers/api/RDSRecordController.php"
click node_record_model "https://github.com/zzjoennzz/erms-app/blob/main/app/Models/RDSRecord.php"
click node_documents "https://github.com/zzjoennzz/erms-app/blob/main/app/Models/RDSRecordDocument.php"
click node_rds_admin "https://github.com/zzjoennzz/erms-app/blob/main/app/Http/Controllers/api/RDSController.php"
click node_schedules "https://github.com/zzjoennzz/erms-app/blob/main/app/Models/RecordsDispositionSchedule.php"
click node_transactions "https://github.com/zzjoennzz/erms-app/blob/main/app/Http/Controllers/api/TransactionController.php"
click node_transaction_data "https://github.com/zzjoennzz/erms-app/blob/main/app/Models/RDSTransactionItem.php"
click node_borrowing "https://github.com/zzjoennzz/erms-app/blob/main/app/Http/Controllers/api/BorrowTransferController.php"
click node_disposal "https://github.com/zzjoennzz/erms-app/blob/main/app/Http/Controllers/api/DisposalController.php"
click node_disposal_data "https://github.com/zzjoennzz/erms-app/blob/main/app/Models/RecordDisposal.php"
click node_turnover "https://github.com/zzjoennzz/erms-app/blob/main/app/Http/Controllers/api/TurnoverController.php"
click node_misc_api "https://github.com/zzjoennzz/erms-app/blob/main/app/Http/Controllers/api/MiscController.php"
click node_activity "https://github.com/zzjoennzz/erms-app/blob/main/app/Http/Controllers/api/ActivityLogController.php"
click node_document_history "https://github.com/zzjoennzz/erms-app/blob/main/app/Models/RDSRecordDocumentHistory.php"
click node_record_history "https://github.com/zzjoennzz/erms-app/blob/main/app/Models/RDSRecordHistory.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_spa,node_record_ui,node_report_ui,node_auth_ui,node_staff toneBlue
class node_api_routes,node_auth_api,node_users,node_branch_admin,node_database toneAmber
class node_record_api,node_record_model,node_documents,node_rds_admin,node_schedules toneMint
class node_transactions,node_transaction_data,node_borrowing,node_disposal,node_disposal_data,node_turnover toneRose
class node_misc_api,node_activity,node_document_history,node_record_history toneIndigo
```

## Components

### Staff interface

- [React application](https://github.com/zzjoennzz/erms-app/blob/main/resources/js/app.jsx): `resources/js/app.jsx`
- [Record workspace](https://github.com/zzjoennzz/erms-app/blob/main/resources/js/pages/RDSRecord.jsx): `resources/js/pages/RDSRecord.jsx`
- [Reports interface](https://github.com/zzjoennzz/erms-app/blob/main/resources/js/pages/Report.jsx): `resources/js/pages/Report.jsx`
- [Login interface](https://github.com/zzjoennzz/erms-app/blob/main/resources/js/pages/Login.jsx): `resources/js/pages/Login.jsx`

### Identity and access

- [API routes](https://github.com/zzjoennzz/erms-app/blob/main/routes/api.php): `routes/api.php`
- [Passport authentication](https://github.com/zzjoennzz/erms-app/blob/main/app/Http/Controllers/api/PassportAuthController.php): `app/Http/Controllers/api/PassportAuthController.php`
- [Users and roles](https://github.com/zzjoennzz/erms-app/blob/main/app/Models/User.php): `app/Models/User.php`
- [Branch administration](https://github.com/zzjoennzz/erms-app/blob/main/app/Http/Controllers/api/BranchController.php): `app/Http/Controllers/api/BranchController.php`

### Records lifecycle

- [Record submission](https://github.com/zzjoennzz/erms-app/blob/main/app/Http/Controllers/api/RDSRecordController.php): `app/Http/Controllers/api/RDSRecordController.php`
- [Records and boxes](https://github.com/zzjoennzz/erms-app/blob/main/app/Models/RDSRecord.php): `app/Models/RDSRecord.php`
- [Record documents](https://github.com/zzjoennzz/erms-app/blob/main/app/Models/RDSRecordDocument.php): `app/Models/RDSRecordDocument.php`
- [Disposition schedules](https://github.com/zzjoennzz/erms-app/blob/main/app/Http/Controllers/api/RDSController.php): `app/Http/Controllers/api/RDSController.php`
- [Schedule data](https://github.com/zzjoennzz/erms-app/blob/main/app/Models/RecordsDispositionSchedule.php): `app/Models/RecordsDispositionSchedule.php`

### Movement and disposition

- [Record transactions](https://github.com/zzjoennzz/erms-app/blob/main/app/Http/Controllers/api/TransactionController.php): `app/Http/Controllers/api/TransactionController.php`
- [Transaction items](https://github.com/zzjoennzz/erms-app/blob/main/app/Models/RDSTransactionItem.php): `app/Models/RDSTransactionItem.php`
- [Borrow and transfer](https://github.com/zzjoennzz/erms-app/blob/main/app/Http/Controllers/api/BorrowTransferController.php): `app/Http/Controllers/api/BorrowTransferController.php`
- [Disposal workflow](https://github.com/zzjoennzz/erms-app/blob/main/app/Http/Controllers/api/DisposalController.php): `app/Http/Controllers/api/DisposalController.php`
- [Disposal records](https://github.com/zzjoennzz/erms-app/blob/main/app/Models/RecordDisposal.php): `app/Models/RecordDisposal.php`
- [Turnover workflow](https://github.com/zzjoennzz/erms-app/blob/main/app/Http/Controllers/api/TurnoverController.php): `app/Http/Controllers/api/TurnoverController.php`

### Reporting and audit

- [Search and dashboards](https://github.com/zzjoennzz/erms-app/blob/main/app/Http/Controllers/api/MiscController.php): `app/Http/Controllers/api/MiscController.php`
- [Activity log](https://github.com/zzjoennzz/erms-app/blob/main/app/Http/Controllers/api/ActivityLogController.php): `app/Http/Controllers/api/ActivityLogController.php`
- [Document audit history](https://github.com/zzjoennzz/erms-app/blob/main/app/Models/RDSRecordDocumentHistory.php): `app/Models/RDSRecordDocumentHistory.php`
- [Record history](https://github.com/zzjoennzz/erms-app/blob/main/app/Models/RDSRecordHistory.php): `app/Models/RDSRecordHistory.php`

### Other components

- **Staff user**
- **Relational database**

## Connections

- Staff user → React application: uses
- React application → Login interface: renders (evidence: `resources/js/app.jsx`)
- React application → Record workspace: renders
- React application → Reports interface: renders
- Login interface → Passport authentication: authenticates
- Record workspace → API routes: requests APIs
- Reports interface → API routes: requests reports
- API routes → Passport authentication: routes to (evidence: `routes/api.php`)
- API routes → Record submission: routes to (evidence: `routes/api.php`)
- API routes → Branch administration: routes to (evidence: `routes/api.php`)
- API routes → Disposition schedules: routes to (evidence: `routes/api.php`)
- API routes → Record transactions: routes to (evidence: `routes/api.php`)
- API routes → Borrow and transfer: routes to (evidence: `routes/api.php`)
- API routes → Disposal workflow: routes to (evidence: `routes/api.php`)
- API routes → Turnover workflow: routes to (evidence: `routes/api.php`)
- API routes → Search and dashboards: routes to (evidence: `routes/api.php`)
- API routes → Activity log: routes to (evidence: `routes/api.php`)
- Passport authentication → Users and roles: reads and writes (evidence: `app/Http/Controllers/api/PassportAuthController.php`)
- Record submission → Records and boxes: reads and writes (evidence: `app/Http/Controllers/api/RDSRecordController.php`)
- Record submission → Record documents: reads and writes (evidence: `app/Http/Controllers/api/RDSRecordController.php`)
- Record submission → Document audit history: writes history (evidence: `app/Http/Controllers/api/RDSRecordController.php`)
- Record submission → Record history: writes history (evidence: `app/Http/Controllers/api/RDSRecordController.php`)
- Record submission → Schedule data: uses schedule (evidence: `app/Http/Controllers/api/RDSRecordController.php`)
- Disposition schedules → Records and boxes: queries records (evidence: `app/Http/Controllers/api/RDSController.php`)
- Disposition schedules → Schedule data: manages schedules (evidence: `app/Http/Controllers/api/RDSController.php`)
- Record transactions → Records and boxes: updates records (evidence: `app/Http/Controllers/api/TransactionController.php`)
- Record transactions → Transaction items: creates items (evidence: `app/Http/Controllers/api/TransactionController.php`)
- Borrow and transfer → Record documents: updates documents (evidence: `app/Http/Controllers/api/BorrowTransferController.php`)
- Borrow and transfer → Document audit history: writes history (evidence: `app/Http/Controllers/api/BorrowTransferController.php`)
- Disposal workflow → Records and boxes: queries records (evidence: `app/Http/Controllers/api/DisposalController.php`)
- Disposal workflow → Record documents: updates documents (evidence: `app/Http/Controllers/api/DisposalController.php`)
- Disposal workflow → Disposal records: records disposal (evidence: `app/Http/Controllers/api/DisposalController.php`)
- Disposal workflow → Record history: writes history (evidence: `app/Http/Controllers/api/DisposalController.php`)
- Search and dashboards → Records and boxes: searches records (evidence: `app/Http/Controllers/api/MiscController.php`)
- Search and dashboards → Document audit history: queries activity (evidence: `app/Http/Controllers/api/MiscController.php`)
- Activity log → Users and roles: reads users (evidence: `app/Http/Controllers/api/ActivityLogController.php`)
- Users and roles → Relational database: persists
- Records and boxes → Relational database: persists
- Record documents → Relational database: persists
- Schedule data → Relational database: persists
- Transaction items → Relational database: persists
- Disposal records → Relational database: persists
- Document audit history → Relational database: persists
- Record history → Relational database: persists
