# vanvanvan17/24ct2_tranvanviet_cnpm architecture

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

- Interactive diagram: https://gitdiagram.com/vanvanvan17/24ct2_tranvanviet_cnpm
- Repository: https://github.com/vanvanvan17/24ct2_tranvanviet_cnpm

## Overview

VNLibrary is a Vietnamese-language library-management website documented as a Next.js/TypeScript application backed by MySQL. The documented user-facing capabilities cover account access, catalog and inventory management, circulation, purchases, fines, notifications, reporting, and settings. The repository tree contains no application source files, so this map reflects README-documented capabilities rather than verified code modules or call structure; relationships are included only where the README states them.

Main entry points: [`database.sql`](https://github.com/vanvanvan17/24ct2_tranvanviet_cnpm/blob/main/database.sql) (MySQL database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Accounts &amp; access"]
  node_accounts["Account access"]
  node_user_admin["User administration"]
end

subgraph group_library["Catalog &amp; circulation"]
  node_catalog["Book catalog"]
  node_inventory["Inventory"]
  node_readers["Reader records"]
  node_circulation["Borrow and return"]
  node_reservations["Reservations"]
  node_notifications["Due notifications"]
end

subgraph group_commerce["Sales &amp; finance"]
  node_purchases["Book purchases"]
  node_payments["Payment recording"]
  node_fines["Overdue fines"]
end

subgraph group_oversight["Administration"]
  node_dashboard["Dashboard statistics"]
  node_reports["Chart reports"]
  node_settings["System settings"]
end

node_user(("Library user"))
node_website["VNLibrary website"]
node_database[("MySQL database<br/>[database.sql]")]

node_user -->|"uses"| node_website
node_website -->|"provides access"| node_accounts
node_website -->|"provides management"| node_catalog
node_website -->|"manages readers"| node_readers
node_website -->|"supports circulation"| node_circulation
node_website -->|"supports reservations"| node_reservations
node_website -->|"supports purchases"| node_purchases
node_website -->|"records payments"| node_payments
node_website -->|"provides notifications"| node_notifications
node_website -->|"shows statistics"| node_dashboard
node_website -->|"provides reports"| node_reports
node_website -->|"manages accounts"| node_user_admin
node_website -->|"provides settings"| node_settings
node_purchases -->|"reduces stock"| node_inventory
node_circulation -->|"calculates overdue fines"| node_fines
node_payments -->|"records fine payment"| node_fines
node_website -->|"uses MySQL"| node_database

click node_database "https://github.com/vanvanvan17/24ct2_tranvanviet_cnpm/blob/main/database.sql"

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_accounts,node_user_admin,node_user toneBlue
class node_catalog,node_inventory,node_readers,node_circulation,node_reservations,node_notifications,node_database toneAmber
class node_purchases,node_payments,node_fines toneMint
class node_dashboard,node_reports,node_settings toneRose
class node_website toneIndigo
```

## Components

### Accounts & access

- **Account access**
- **User administration**

### Catalog & circulation

- **Book catalog**
- **Inventory**
- **Reader records**
- **Borrow and return**
- **Reservations**
- **Due notifications**

### Sales & finance

- **Book purchases**
- **Payment recording**
- **Overdue fines**

### Administration

- **Dashboard statistics**
- **Chart reports**
- **System settings**

### Other components

- **Library user**
- **VNLibrary website**
- [MySQL database](https://github.com/vanvanvan17/24ct2_tranvanviet_cnpm/blob/main/database.sql): `database.sql`

## Connections

- Library user → VNLibrary website: uses (evidence: `README.md`)
- VNLibrary website → Account access: provides access (evidence: `README.md`)
- VNLibrary website → Book catalog: provides management (evidence: `README.md`)
- VNLibrary website → Reader records: manages readers (evidence: `README.md`)
- VNLibrary website → Borrow and return: supports circulation (evidence: `README.md`)
- VNLibrary website → Reservations: supports reservations (evidence: `README.md`)
- VNLibrary website → Book purchases: supports purchases (evidence: `README.md`)
- VNLibrary website → Payment recording: records payments (evidence: `README.md`)
- VNLibrary website → Due notifications: provides notifications (evidence: `README.md`)
- VNLibrary website → Dashboard statistics: shows statistics (evidence: `README.md`)
- VNLibrary website → Chart reports: provides reports (evidence: `README.md`)
- VNLibrary website → User administration: manages accounts (evidence: `README.md`)
- VNLibrary website → System settings: provides settings (evidence: `README.md`)
- Book purchases → Inventory: reduces stock (evidence: `README.md`)
- Borrow and return → Overdue fines: calculates overdue fines (evidence: `README.md`)
- Payment recording → Overdue fines: records fine payment (evidence: `README.md`)
- VNLibrary website → MySQL database: uses MySQL (evidence: `README.md`)
