# chandanprajapat-7568/libraryflow architecture

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

- Interactive diagram: https://gitdiagram.com/chandanprajapat-7568/libraryflow
- Repository: https://github.com/chandanprajapat-7568/libraryflow

## Overview

LibraryFlow is a staff-facing library operations application. Staff sign in, then search and maintain books and members, issue and return loans, and review inventory and lending reports. Authentication, password recovery, and administrator staff controls form a distinct access-management branch; shared bootstrap and database access support the PHP pages. Edges reflect README descriptions and shown source; unsampled modules are included where documented, but their internal call relationships are not inferred.

Main entry points: [`database/libraryflow.sql`](https://github.com/chandanprajapat-7568/libraryflow/blob/main/database/libraryflow.sql) (Library database), [`includes/bootstrap.php`](https://github.com/chandanprajapat-7568/libraryflow/blob/main/includes/bootstrap.php) (Request bootstrap), [`login.php`](https://github.com/chandanprajapat-7568/libraryflow/blob/main/login.php) (Sign in), [`books/index.php`](https://github.com/chandanprajapat-7568/libraryflow/blob/main/books/index.php) (Book catalogue)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Staff access"]
  node_login["Sign in<br/>[login.php]"]
  node_auth["Authentication<br/>[auth.php]"]
  node_password["Password recovery<br/>[password_reset.php]"]
  node_staff_admin["Staff administration<br/>[users.php]"]
  node_account_password["Change password<br/>[password.php]"]
end

subgraph group_catalogue["Records"]
  node_books["Book catalogue<br/>[index.php]"]
  node_book_form["Book editing<br/>[form.php]"]
  node_book_save["Book saving<br/>[save.php]"]
  node_book_delete["Book deletion<br/>[delete.php]"]
  node_members["Member register<br/>[index.php]"]
  node_member_form["Member editing<br/>[form.php]"]
  node_member_save["Member saving<br/>[save.php]"]
  node_member_delete["Member deletion<br/>[delete.php]"]
end

subgraph group_lending["Loan operations"]
  node_issue_create["Issue books<br/>[create.php]"]
  node_issue_register["Loan register<br/>[index.php]"]
  node_return["Return books<br/>[return.php]"]
end

subgraph group_insight["Discovery and reports"]
  node_dashboard["Library dashboard<br/>[index.php]"]
  node_search["Record search<br/>[index.php]"]
  node_reports["Inventory reports<br/>[index.php]"]
end

subgraph group_shared["Application core"]
  node_database[("Library database<br/>[libraryflow.sql]")]
  node_bootstrap["Request bootstrap<br/>[bootstrap.php]"]
  node_db_access["Database connection<br/>[db.php]"]
  node_helpers["Shared helpers<br/>[helpers.php]"]
end

node_staff(("Staff user"))
node_mail["Mail transport"]

node_staff -->|"signs in"| node_login
node_login -->|"loads"| node_bootstrap
node_bootstrap -->|"loads"| node_helpers
node_bootstrap -->|"loads"| node_db_access
node_bootstrap -->|"loads"| node_auth
node_login -->|"checks credentials"| node_auth
node_auth -->|"reads and updates"| node_database
node_db_access -->|"connects"| node_database
node_staff -->|"requests reset"| node_password
node_password -.->|"sends reset link"| node_mail
node_staff -->|"changes password"| node_account_password
node_staff -->|"manages staff"| node_staff_admin
node_staff_admin -->|"manages accounts"| node_database
node_staff -->|"browses catalogue"| node_books
node_books -->|"opens editor"| node_book_form
node_book_form -->|"submits changes"| node_book_save
node_books -->|"requests deletion"| node_book_delete
node_staff -->|"manages members"| node_members
node_members -->|"opens editor"| node_member_form
node_member_form -->|"submits changes"| node_member_save
node_members -->|"requests deletion"| node_member_delete
node_staff -->|"records issue"| node_issue_create
node_issue_create -->|"checks and records"| node_database
node_staff -->|"reviews loans"| node_issue_register
node_staff -->|"records return"| node_return
node_return -->|"updates loan"| node_database
node_staff -->|"views overview"| node_dashboard
node_dashboard -->|"queries totals and loans"| node_database
node_staff -->|"searches records"| node_search
node_search -->|"queries books and members"| node_database
node_staff -->|"views reports"| node_reports
node_reports -->|"calculates summaries"| node_database
node_book_save -.->|"writes books"| node_database
node_book_delete -.->|"deletes books"| node_database
node_member_save -.->|"writes members"| node_database
node_member_delete -.->|"deletes members"| node_database

click node_login "https://github.com/chandanprajapat-7568/libraryflow/blob/main/login.php"
click node_auth "https://github.com/chandanprajapat-7568/libraryflow/blob/main/includes/auth.php"
click node_password "https://github.com/chandanprajapat-7568/libraryflow/blob/main/includes/password_reset.php"
click node_staff_admin "https://github.com/chandanprajapat-7568/libraryflow/blob/main/admin/users.php"
click node_account_password "https://github.com/chandanprajapat-7568/libraryflow/blob/main/account/password.php"
click node_books "https://github.com/chandanprajapat-7568/libraryflow/blob/main/books/index.php"
click node_book_form "https://github.com/chandanprajapat-7568/libraryflow/blob/main/books/form.php"
click node_book_save "https://github.com/chandanprajapat-7568/libraryflow/blob/main/books/save.php"
click node_book_delete "https://github.com/chandanprajapat-7568/libraryflow/blob/main/books/delete.php"
click node_members "https://github.com/chandanprajapat-7568/libraryflow/blob/main/members/index.php"
click node_member_form "https://github.com/chandanprajapat-7568/libraryflow/blob/main/members/form.php"
click node_member_save "https://github.com/chandanprajapat-7568/libraryflow/blob/main/members/save.php"
click node_member_delete "https://github.com/chandanprajapat-7568/libraryflow/blob/main/members/delete.php"
click node_issue_create "https://github.com/chandanprajapat-7568/libraryflow/blob/main/issues/create.php"
click node_issue_register "https://github.com/chandanprajapat-7568/libraryflow/blob/main/issues/index.php"
click node_return "https://github.com/chandanprajapat-7568/libraryflow/blob/main/issues/return.php"
click node_dashboard "https://github.com/chandanprajapat-7568/libraryflow/blob/main/index.php"
click node_search "https://github.com/chandanprajapat-7568/libraryflow/blob/main/search/index.php"
click node_reports "https://github.com/chandanprajapat-7568/libraryflow/blob/main/reports/index.php"
click node_database "https://github.com/chandanprajapat-7568/libraryflow/blob/main/database/libraryflow.sql"
click node_bootstrap "https://github.com/chandanprajapat-7568/libraryflow/blob/main/includes/bootstrap.php"
click node_db_access "https://github.com/chandanprajapat-7568/libraryflow/blob/main/includes/db.php"
click node_helpers "https://github.com/chandanprajapat-7568/libraryflow/blob/main/includes/helpers.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_login,node_auth,node_password,node_staff_admin,node_account_password,node_staff toneBlue
class node_books,node_book_form,node_book_save,node_book_delete,node_members,node_member_form,node_member_save,node_member_delete toneAmber
class node_issue_create,node_issue_register,node_return toneMint
class node_dashboard,node_search,node_reports toneRose
class node_database,node_bootstrap,node_db_access,node_helpers,node_mail toneIndigo
```

## Components

### Staff access

- [Sign in](https://github.com/chandanprajapat-7568/libraryflow/blob/main/login.php): `login.php`
- [Authentication](https://github.com/chandanprajapat-7568/libraryflow/blob/main/includes/auth.php): `includes/auth.php`
- [Password recovery](https://github.com/chandanprajapat-7568/libraryflow/blob/main/includes/password_reset.php): `includes/password_reset.php`
- [Staff administration](https://github.com/chandanprajapat-7568/libraryflow/blob/main/admin/users.php): `admin/users.php`
- [Change password](https://github.com/chandanprajapat-7568/libraryflow/blob/main/account/password.php): `account/password.php`

### Records

- [Book catalogue](https://github.com/chandanprajapat-7568/libraryflow/blob/main/books/index.php): `books/index.php`
- [Book editing](https://github.com/chandanprajapat-7568/libraryflow/blob/main/books/form.php): `books/form.php`
- [Book saving](https://github.com/chandanprajapat-7568/libraryflow/blob/main/books/save.php): `books/save.php`
- [Book deletion](https://github.com/chandanprajapat-7568/libraryflow/blob/main/books/delete.php): `books/delete.php`
- [Member register](https://github.com/chandanprajapat-7568/libraryflow/blob/main/members/index.php): `members/index.php`
- [Member editing](https://github.com/chandanprajapat-7568/libraryflow/blob/main/members/form.php): `members/form.php`
- [Member saving](https://github.com/chandanprajapat-7568/libraryflow/blob/main/members/save.php): `members/save.php`
- [Member deletion](https://github.com/chandanprajapat-7568/libraryflow/blob/main/members/delete.php): `members/delete.php`

### Loan operations

- [Issue books](https://github.com/chandanprajapat-7568/libraryflow/blob/main/issues/create.php): `issues/create.php`
- [Loan register](https://github.com/chandanprajapat-7568/libraryflow/blob/main/issues/index.php): `issues/index.php`
- [Return books](https://github.com/chandanprajapat-7568/libraryflow/blob/main/issues/return.php): `issues/return.php`

### Discovery and reports

- [Library dashboard](https://github.com/chandanprajapat-7568/libraryflow/blob/main/index.php): `index.php`
- [Record search](https://github.com/chandanprajapat-7568/libraryflow/blob/main/search/index.php): `search/index.php`
- [Inventory reports](https://github.com/chandanprajapat-7568/libraryflow/blob/main/reports/index.php): `reports/index.php`

### Application core

- [Library database](https://github.com/chandanprajapat-7568/libraryflow/blob/main/database/libraryflow.sql): `database/libraryflow.sql`
- [Request bootstrap](https://github.com/chandanprajapat-7568/libraryflow/blob/main/includes/bootstrap.php): `includes/bootstrap.php`
- [Database connection](https://github.com/chandanprajapat-7568/libraryflow/blob/main/includes/db.php): `includes/db.php`
- [Shared helpers](https://github.com/chandanprajapat-7568/libraryflow/blob/main/includes/helpers.php): `includes/helpers.php`

### Other components

- **Staff user**
- **Mail transport**

## Connections

- Staff user → Sign in: signs in (evidence: `README.md`)
- Sign in → Request bootstrap: loads (evidence: `login.php`)
- Request bootstrap → Shared helpers: loads (evidence: `includes/bootstrap.php`)
- Request bootstrap → Database connection: loads (evidence: `includes/bootstrap.php`)
- Request bootstrap → Authentication: loads (evidence: `includes/bootstrap.php`)
- Sign in → Authentication: checks credentials (evidence: `login.php`)
- Authentication → Library database: reads and updates (evidence: `includes/auth.php`)
- Database connection → Library database: connects (evidence: `includes/db.php`)
- Staff user → Password recovery: requests reset (evidence: `README.md`)
- Password recovery → Mail transport: sends reset link (evidence: `README.md`)
- Staff user → Change password: changes password (evidence: `README.md`)
- Staff user → Staff administration: manages staff (evidence: `README.md`)
- Staff administration → Library database: manages accounts (evidence: `README.md`)
- Staff user → Book catalogue: browses catalogue (evidence: `README.md`)
- Book catalogue → Book editing: opens editor (evidence: `books/index.php`)
- Book editing → Book saving: submits changes (evidence: `books/form.php`)
- Book catalogue → Book deletion: requests deletion (evidence: `books/index.php`)
- Staff user → Member register: manages members (evidence: `README.md`)
- Member register → Member editing: opens editor (evidence: `members/index.php`)
- Member editing → Member saving: submits changes (evidence: `members/form.php`)
- Member register → Member deletion: requests deletion (evidence: `members/index.php`)
- Staff user → Issue books: records issue (evidence: `README.md`)
- Issue books → Library database: checks and records (evidence: `README.md`)
- Staff user → Loan register: reviews loans (evidence: `README.md`)
- Staff user → Return books: records return (evidence: `README.md`)
- Return books → Library database: updates loan (evidence: `README.md`)
- Staff user → Library dashboard: views overview (evidence: `index.php`)
- Library dashboard → Library database: queries totals and loans (evidence: `index.php`)
- Staff user → Record search: searches records (evidence: `search/index.php`)
- Record search → Library database: queries books and members (evidence: `search/index.php`)
- Staff user → Inventory reports: views reports (evidence: `README.md`)
- Inventory reports → Library database: calculates summaries (evidence: `reports/index.php`)
- Book saving → Library database: writes books
- Book deletion → Library database: deletes books
- Member saving → Library database: writes members
- Member deletion → Library database: deletes members
