# chana758/system_lms_api architecture

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

- Interactive diagram: https://gitdiagram.com/chana758/system_lms_api
- Repository: https://github.com/chana758/system_lms_api

## Overview

This Laravel application is a library-management system. Its main user workflow is to authenticate, discover catalog items, and borrow or reserve physical books; staff also manage circulation and reporting. Distinct areas include accounts, catalog and reviews, circulation, reservations, digital reading, scanning, and administration. The graph reflects the tree and sampled source: the README describes Laravel rather than this product, so several capabilities are identified by their routes and controllers, while unverified internal interactions are omitted.

Main entry points: [`routes/api.php`](https://github.com/chana758/system_lms_api/blob/main/routes/api.php) (API routes), [`app/Http/Controllers/Api/ReservationController.php`](https://github.com/chana758/system_lms_api/blob/main/app/Http/Controllers/Api/ReservationController.php) (Reservations), [`app/Http/Controllers/Api/BorrowController.php`](https://github.com/chana758/system_lms_api/blob/main/app/Http/Controllers/Api/BorrowController.php) (Borrowing), [`app/Http/Controllers/Api/BookReviewController.php`](https://github.com/chana758/system_lms_api/blob/main/app/Http/Controllers/Api/BookReviewController.php) (Book reviews)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["API entry"]
  node_api["API routes<br/>[api.php]"]
end

subgraph group_accounts["Accounts"]
  node_auth["Authentication<br/>[AuthController.php]"]
  node_users[("User accounts<br/>[User.php]")]
end

subgraph group_library["Library operations"]
  node_catalog["Book catalog<br/>[BookController.php]"]
  node_books[("Book records<br/>[Book.php]")]
  node_copies[("Physical copies<br/>[BookCopy.php]")]
  node_reviews["Book reviews"]
  node_circulation["Borrowing"]
  node_transactions[("Borrow records")]
  node_reservations["Reservations"]
  node_reservation_records[("Reservation records<br/>[Reservation.php]")]
  node_digital["Digital library"]
  node_scanning["Scanning<br/>[ScanController.php]"]
  node_database[("Application database<br/>[database.php]")]
end

subgraph group_insights["Insights and services"]
  node_reports["Reports"]
  node_report_service["Report exports"]
  node_report_records[("Saved reports<br/>[Report.php]")]
  node_chatbot["Chatbot"]
  node_chat_service["Chatbot AI"]
end

node_patron(("Library user"))

node_patron -->|"sends requests"| node_api
node_api -->|"routes auth"| node_auth
node_api -->|"routes catalog"| node_catalog
node_api -->|"routes reviews"| node_reviews
node_api -->|"routes borrowing"| node_circulation
node_api -->|"routes reservations"| node_reservations
node_api -->|"routes ebooks"| node_digital
node_api -->|"routes scans"| node_scanning
node_api -->|"routes reports"| node_reports
node_api -->|"routes chatbot"| node_chatbot
node_auth -->|"reads and updates"| node_users
node_reviews -->|"loads book reviews"| node_books
node_reviews -->|"stores reviews"| node_database
node_circulation -->|"uses copies"| node_copies
node_circulation -->|"creates transactions"| node_transactions
node_circulation -->|"calls reservation logic"| node_reservations
node_reservations -->|"creates and updates"| node_reservation_records
node_reservations -->|"checks availability"| node_copies
node_reservations -->|"loads book"| node_books
node_reports -->|"reads and deletes"| node_report_records
node_reports -->|"requests exports"| node_report_service
node_report_service -->|"exports report data"| node_report_records
node_chatbot -.->|"uses AI service"| node_chat_service

click node_api "https://github.com/chana758/system_lms_api/blob/main/routes/api.php"
click node_auth "https://github.com/chana758/system_lms_api/blob/main/app/Http/Controllers/Api/AuthController.php"
click node_users "https://github.com/chana758/system_lms_api/blob/main/app/Models/User.php"
click node_catalog "https://github.com/chana758/system_lms_api/blob/main/app/Http/Controllers/Api/BookController.php"
click node_books "https://github.com/chana758/system_lms_api/blob/main/app/Models/Book.php"
click node_copies "https://github.com/chana758/system_lms_api/blob/main/app/Models/BookCopy.php"
click node_reviews "https://github.com/chana758/system_lms_api/blob/main/app/Http/Controllers/Api/BookReviewController.php"
click node_circulation "https://github.com/chana758/system_lms_api/blob/main/app/Http/Controllers/Api/BorrowController.php"
click node_transactions "https://github.com/chana758/system_lms_api/blob/main/app/Models/BorrowTransaction.php"
click node_reservations "https://github.com/chana758/system_lms_api/blob/main/app/Http/Controllers/Api/ReservationController.php"
click node_reservation_records "https://github.com/chana758/system_lms_api/blob/main/app/Models/Reservation.php"
click node_digital "https://github.com/chana758/system_lms_api/blob/main/app/Http/Controllers/Api/EbookController.php"
click node_scanning "https://github.com/chana758/system_lms_api/blob/main/app/Http/Controllers/Api/ScanController.php"
click node_reports "https://github.com/chana758/system_lms_api/blob/main/app/Http/Controllers/Api/Reportcontroller.php"
click node_report_service "https://github.com/chana758/system_lms_api/blob/main/app/Services/ReportExportService.php"
click node_report_records "https://github.com/chana758/system_lms_api/blob/main/app/Models/Report.php"
click node_chatbot "https://github.com/chana758/system_lms_api/blob/main/app/Http/Controllers/Api/ChatbotController.php"
click node_chat_service "https://github.com/chana758/system_lms_api/blob/main/app/Services/ChatbotAiService.php"
click node_database "https://github.com/chana758/system_lms_api/blob/main/config/database.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_api,node_patron toneBlue
class node_auth,node_users toneAmber
class node_catalog,node_books,node_copies,node_reviews,node_circulation,node_transactions,node_reservations,node_reservation_records,node_digital,node_scanning,node_database toneMint
class node_reports,node_report_service,node_report_records,node_chatbot,node_chat_service toneRose
```

## Components

### API entry

- [API routes](https://github.com/chana758/system_lms_api/blob/main/routes/api.php): `routes/api.php`

### Accounts

- [Authentication](https://github.com/chana758/system_lms_api/blob/main/app/Http/Controllers/Api/AuthController.php): `app/Http/Controllers/Api/AuthController.php`
- [User accounts](https://github.com/chana758/system_lms_api/blob/main/app/Models/User.php): `app/Models/User.php`

### Library operations

- [Book catalog](https://github.com/chana758/system_lms_api/blob/main/app/Http/Controllers/Api/BookController.php): `app/Http/Controllers/Api/BookController.php`
- [Book records](https://github.com/chana758/system_lms_api/blob/main/app/Models/Book.php): `app/Models/Book.php`
- [Physical copies](https://github.com/chana758/system_lms_api/blob/main/app/Models/BookCopy.php): `app/Models/BookCopy.php`
- [Book reviews](https://github.com/chana758/system_lms_api/blob/main/app/Http/Controllers/Api/BookReviewController.php): `app/Http/Controllers/Api/BookReviewController.php`
- [Borrowing](https://github.com/chana758/system_lms_api/blob/main/app/Http/Controllers/Api/BorrowController.php): `app/Http/Controllers/Api/BorrowController.php`
- [Borrow records](https://github.com/chana758/system_lms_api/blob/main/app/Models/BorrowTransaction.php): `app/Models/BorrowTransaction.php`
- [Reservations](https://github.com/chana758/system_lms_api/blob/main/app/Http/Controllers/Api/ReservationController.php): `app/Http/Controllers/Api/ReservationController.php`
- [Reservation records](https://github.com/chana758/system_lms_api/blob/main/app/Models/Reservation.php): `app/Models/Reservation.php`
- [Digital library](https://github.com/chana758/system_lms_api/blob/main/app/Http/Controllers/Api/EbookController.php): `app/Http/Controllers/Api/EbookController.php`
- [Scanning](https://github.com/chana758/system_lms_api/blob/main/app/Http/Controllers/Api/ScanController.php): `app/Http/Controllers/Api/ScanController.php`
- [Application database](https://github.com/chana758/system_lms_api/blob/main/config/database.php): `config/database.php`

### Insights and services

- [Reports](https://github.com/chana758/system_lms_api/blob/main/app/Http/Controllers/Api/Reportcontroller.php): `app/Http/Controllers/Api/Reportcontroller.php`
- [Report exports](https://github.com/chana758/system_lms_api/blob/main/app/Services/ReportExportService.php): `app/Services/ReportExportService.php`
- [Saved reports](https://github.com/chana758/system_lms_api/blob/main/app/Models/Report.php): `app/Models/Report.php`
- [Chatbot](https://github.com/chana758/system_lms_api/blob/main/app/Http/Controllers/Api/ChatbotController.php): `app/Http/Controllers/Api/ChatbotController.php`
- [Chatbot AI](https://github.com/chana758/system_lms_api/blob/main/app/Services/ChatbotAiService.php): `app/Services/ChatbotAiService.php`

### Other components

- **Library user**

## Connections

- Library user → API routes: sends requests (evidence: `routes/api.php`)
- API routes → Authentication: routes auth (evidence: `routes/api.php`)
- API routes → Book catalog: routes catalog (evidence: `routes/api.php`)
- API routes → Book reviews: routes reviews (evidence: `routes/api.php`)
- API routes → Borrowing: routes borrowing (evidence: `routes/api.php`)
- API routes → Reservations: routes reservations (evidence: `routes/api.php`)
- API routes → Digital library: routes ebooks (evidence: `routes/api.php`)
- API routes → Scanning: routes scans (evidence: `routes/api.php`)
- API routes → Reports: routes reports (evidence: `routes/api.php`)
- API routes → Chatbot: routes chatbot (evidence: `routes/api.php`)
- Authentication → User accounts: reads and updates (evidence: `app/Http/Controllers/Api/AuthController.php`)
- Book reviews → Book records: loads book reviews (evidence: `app/Http/Controllers/Api/BookReviewController.php`)
- Book reviews → Application database: stores reviews (evidence: `app/Http/Controllers/Api/BookReviewController.php`)
- Borrowing → Physical copies: uses copies (evidence: `app/Http/Controllers/Api/BorrowController.php`)
- Borrowing → Borrow records: creates transactions (evidence: `app/Http/Controllers/Api/BorrowController.php`)
- Borrowing → Reservations: calls reservation logic (evidence: `app/Http/Controllers/Api/BorrowController.php`)
- Reservations → Reservation records: creates and updates (evidence: `app/Http/Controllers/Api/ReservationController.php`)
- Reservations → Physical copies: checks availability (evidence: `app/Http/Controllers/Api/ReservationController.php`)
- Reservations → Book records: loads book (evidence: `app/Http/Controllers/Api/ReservationController.php`)
- Reports → Saved reports: reads and deletes (evidence: `app/Http/Controllers/Api/Reportcontroller.php`)
- Reports → Report exports: requests exports (evidence: `app/Http/Controllers/Api/Reportcontroller.php`)
- Report exports → Saved reports: exports report data (evidence: `app/Services/ReportExportService.php`)
- Chatbot → Chatbot AI: uses AI service
