# tbao04092006/dau_cong_nghe_phan_mem architecture

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

- Interactive diagram: https://gitdiagram.com/tbao04092006/dau_cong_nghe_phan_mem
- Repository: https://github.com/tbao04092006/dau_cong_nghe_phan_mem

## Overview

This is a Laravel library-management application, not the Laravel framework described by the boilerplate README. Readers search the catalog, request or manage loans, and handle fines or card renewal; librarians maintain inventory and process borrowing and returns; administrators manage users, policies, proposals, and reporting. Controllers coordinate the domain models and return role-specific views. The graph follows the supplied controller excerpts and SOURCE INDEX references; unsampled route details and integrations are not inferred beyond those references.

Main entry points: [`app/Http/Controllers/LibrarianController.php`](https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Http/Controllers/LibrarianController.php) (Librarian operations), [`app/Http/Controllers/AdminController.php`](https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Http/Controllers/AdminController.php) (Administration), [`app/Http/Controllers/ReaderController.php`](https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Http/Controllers/ReaderController.php) (Reader operations), [`routes/web.php`](https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/routes/web.php) (Web routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_routes["Web routes<br/>[web.php]"]
  node_auth["Authentication<br/>[AuthController.php]"]
  node_reader_ui["Reader portal<br/>[index.blade.php]"]
  node_staff_ui["Librarian portal<br/>[index.blade.php]"]
  node_admin_ui["Admin portal<br/>[index.blade.php]"]
end

subgraph group_circulation["Library operations"]
  node_reader_ops["Reader operations"]
  node_librarian_ops["Librarian operations"]
  node_payments["Payments and renewals"]
end

subgraph group_governance["Administration"]
  node_admin_ops["Administration"]
end

subgraph group_records["Domain records"]
  node_catalog[("Catalog records<br/>[Book.php]")]
  node_loan_records[("Loan records<br/>[BorrowTicket.php]")]
  node_user_records[("User records<br/>[User.php]")]
  node_policy[("Library rules<br/>[SystemRule.php]")]
  node_transactions[("Transactions<br/>[Transaction.php]")]
  node_audit[("Audit logs<br/>[AuditLog.php]")]
  node_proposals[("Purchase proposals")]
  node_categories[("Categories<br/>[Category.php]")]
  node_publishers[("Publishers<br/>[Publisher.php]")]
end

node_reader(("Reader"))
node_librarian(("Librarian"))
node_administrator(("Administrator"))

node_reader -->|"opens"| node_routes
node_librarian -->|"opens"| node_routes
node_administrator -->|"opens"| node_routes
node_routes -->|"routes to"| node_auth
node_routes -->|"routes to"| node_reader_ops
node_routes -->|"routes to"| node_librarian_ops
node_routes -->|"routes to"| node_admin_ops
node_routes -->|"routes to"| node_payments
node_reader_ops -->|"renders"| node_reader_ui
node_librarian_ops -->|"renders"| node_staff_ui
node_admin_ops -->|"renders"| node_admin_ui
node_reader_ops -->|"queries"| node_catalog
node_reader_ops -->|"manages loans"| node_loan_records
node_reader_ops -->|"checks rules"| node_policy
node_reader_ops -->|"reads and updates"| node_user_records
node_reader_ops -->|"reads"| node_transactions
node_reader_ops -->|"writes"| node_audit
node_librarian_ops -->|"maintains"| node_catalog
node_librarian_ops -->|"processes"| node_loan_records
node_librarian_ops -->|"reads"| node_user_records
node_librarian_ops -->|"reads"| node_policy
node_librarian_ops -->|"manages"| node_proposals
node_librarian_ops -->|"reads"| node_transactions
node_librarian_ops -->|"writes"| node_audit
node_librarian_ops -->|"manages"| node_categories
node_librarian_ops -->|"reads"| node_publishers
node_payments -->|"updates"| node_loan_records
node_payments -->|"records payment"| node_transactions
node_payments -->|"checks rules"| node_policy
node_payments -->|"updates"| node_user_records
node_admin_ops -->|"updates"| node_policy
node_admin_ops -->|"manages"| node_user_records
node_admin_ops -->|"reviews"| node_proposals
node_admin_ops -->|"reads"| node_transactions
node_admin_ops -->|"reads and writes"| node_audit
node_admin_ops -->|"queries"| node_catalog
node_admin_ops -->|"reads"| node_categories
node_auth -->|"authenticates"| node_user_records
node_auth -->|"writes"| node_audit
node_catalog -->|"belongs to"| node_categories
node_catalog -->|"belongs to"| node_publishers
node_loan_records -->|"belongs to"| node_user_records
node_loan_records -->|"belongs to"| node_catalog
node_transactions -->|"belongs to"| node_loan_records
node_transactions -->|"belongs to"| node_user_records

click node_routes "https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/routes/web.php"
click node_auth "https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Http/Controllers/AuthController.php"
click node_reader_ui "https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/resources/views/reader/index.blade.php"
click node_staff_ui "https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/resources/views/librarian/index.blade.php"
click node_admin_ui "https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/resources/views/admin/index.blade.php"
click node_reader_ops "https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Http/Controllers/ReaderController.php"
click node_librarian_ops "https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Http/Controllers/LibrarianController.php"
click node_payments "https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Http/Controllers/PaymentController.php"
click node_admin_ops "https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Http/Controllers/AdminController.php"
click node_catalog "https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Models/Book.php"
click node_loan_records "https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Models/BorrowTicket.php"
click node_user_records "https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Models/User.php"
click node_policy "https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Models/SystemRule.php"
click node_transactions "https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Models/Transaction.php"
click node_audit "https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Models/AuditLog.php"
click node_proposals "https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Models/PurchaseProposal.php"
click node_categories "https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Models/Category.php"
click node_publishers "https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Models/Publisher.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_routes,node_auth,node_reader_ui,node_staff_ui,node_admin_ui toneBlue
class node_reader_ops,node_librarian_ops,node_payments toneAmber
class node_admin_ops toneMint
class node_catalog,node_loan_records,node_user_records,node_policy,node_transactions,node_audit,node_proposals,node_categories,node_publishers toneRose
class node_reader,node_librarian,node_administrator toneIndigo
```

## Components

### Web interface

- [Web routes](https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/routes/web.php): `routes/web.php`
- [Authentication](https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Http/Controllers/AuthController.php): `app/Http/Controllers/AuthController.php`
- [Reader portal](https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/resources/views/reader/index.blade.php): `resources/views/reader/index.blade.php`
- [Librarian portal](https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/resources/views/librarian/index.blade.php): `resources/views/librarian/index.blade.php`
- [Admin portal](https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/resources/views/admin/index.blade.php): `resources/views/admin/index.blade.php`

### Library operations

- [Reader operations](https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Http/Controllers/ReaderController.php): `app/Http/Controllers/ReaderController.php`
- [Librarian operations](https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Http/Controllers/LibrarianController.php): `app/Http/Controllers/LibrarianController.php`
- [Payments and renewals](https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Http/Controllers/PaymentController.php): `app/Http/Controllers/PaymentController.php`

### Administration

- [Administration](https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Http/Controllers/AdminController.php): `app/Http/Controllers/AdminController.php`

### Domain records

- [Catalog records](https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Models/Book.php): `app/Models/Book.php`
- [Loan records](https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Models/BorrowTicket.php): `app/Models/BorrowTicket.php`
- [User records](https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Models/User.php): `app/Models/User.php`
- [Library rules](https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Models/SystemRule.php): `app/Models/SystemRule.php`
- [Transactions](https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Models/Transaction.php): `app/Models/Transaction.php`
- [Audit logs](https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Models/AuditLog.php): `app/Models/AuditLog.php`
- [Purchase proposals](https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Models/PurchaseProposal.php): `app/Models/PurchaseProposal.php`
- [Categories](https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Models/Category.php): `app/Models/Category.php`
- [Publishers](https://github.com/tbao04092006/dau_cong_nghe_phan_mem/blob/main/app/Models/Publisher.php): `app/Models/Publisher.php`

### Other components

- **Reader**
- **Librarian**
- **Administrator**

## Connections

- Reader → Web routes: opens (evidence: `routes/web.php`)
- Librarian → Web routes: opens (evidence: `routes/web.php`)
- Administrator → Web routes: opens (evidence: `routes/web.php`)
- Web routes → Authentication: routes to (evidence: `routes/web.php`)
- Web routes → Reader operations: routes to (evidence: `routes/web.php`)
- Web routes → Librarian operations: routes to (evidence: `routes/web.php`)
- Web routes → Administration: routes to (evidence: `routes/web.php`)
- Web routes → Payments and renewals: routes to (evidence: `routes/web.php`)
- Reader operations → Reader portal: renders (evidence: `app/Http/Controllers/ReaderController.php`)
- Librarian operations → Librarian portal: renders (evidence: `app/Http/Controllers/LibrarianController.php`)
- Administration → Admin portal: renders (evidence: `app/Http/Controllers/AdminController.php`)
- Reader operations → Catalog records: queries (evidence: `app/Http/Controllers/ReaderController.php`)
- Reader operations → Loan records: manages loans (evidence: `app/Http/Controllers/ReaderController.php`)
- Reader operations → Library rules: checks rules (evidence: `app/Http/Controllers/ReaderController.php`)
- Reader operations → User records: reads and updates (evidence: `app/Http/Controllers/ReaderController.php`)
- Reader operations → Transactions: reads (evidence: `app/Http/Controllers/ReaderController.php`)
- Reader operations → Audit logs: writes (evidence: `app/Http/Controllers/ReaderController.php`)
- Librarian operations → Catalog records: maintains (evidence: `app/Http/Controllers/LibrarianController.php`)
- Librarian operations → Loan records: processes (evidence: `app/Http/Controllers/LibrarianController.php`)
- Librarian operations → User records: reads (evidence: `app/Http/Controllers/LibrarianController.php`)
- Librarian operations → Library rules: reads (evidence: `app/Http/Controllers/LibrarianController.php`)
- Librarian operations → Purchase proposals: manages (evidence: `app/Http/Controllers/LibrarianController.php`)
- Librarian operations → Transactions: reads (evidence: `app/Http/Controllers/LibrarianController.php`)
- Librarian operations → Audit logs: writes (evidence: `app/Http/Controllers/LibrarianController.php`)
- Librarian operations → Categories: manages (evidence: `app/Http/Controllers/LibrarianController.php`)
- Librarian operations → Publishers: reads (evidence: `app/Http/Controllers/LibrarianController.php`)
- Payments and renewals → Loan records: updates (evidence: `app/Http/Controllers/PaymentController.php`)
- Payments and renewals → Transactions: records payment (evidence: `app/Http/Controllers/PaymentController.php`)
- Payments and renewals → Library rules: checks rules (evidence: `app/Http/Controllers/PaymentController.php`)
- Payments and renewals → User records: updates (evidence: `app/Http/Controllers/PaymentController.php`)
- Administration → Library rules: updates (evidence: `app/Http/Controllers/AdminController.php`)
- Administration → User records: manages (evidence: `app/Http/Controllers/AdminController.php`)
- Administration → Purchase proposals: reviews (evidence: `app/Http/Controllers/AdminController.php`)
- Administration → Transactions: reads (evidence: `app/Http/Controllers/AdminController.php`)
- Administration → Audit logs: reads and writes (evidence: `app/Http/Controllers/AdminController.php`)
- Administration → Catalog records: queries (evidence: `app/Http/Controllers/AdminController.php`)
- Administration → Categories: reads (evidence: `app/Http/Controllers/AdminController.php`)
- Authentication → User records: authenticates (evidence: `app/Http/Controllers/AuthController.php`)
- Authentication → Audit logs: writes (evidence: `app/Http/Controllers/AuthController.php`)
- Catalog records → Categories: belongs to (evidence: `app/Models/Book.php`)
- Catalog records → Publishers: belongs to (evidence: `app/Models/Book.php`)
- Loan records → User records: belongs to (evidence: `app/Models/BorrowTicket.php`)
- Loan records → Catalog records: belongs to (evidence: `app/Models/BorrowTicket.php`)
- Transactions → Loan records: belongs to (evidence: `app/Models/Transaction.php`)
- Transactions → User records: belongs to (evidence: `app/Models/Transaction.php`)
