# yassinhmiti1/mylibrary architecture

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

- Interactive diagram: https://gitdiagram.com/yassinhmiti1/mylibrary
- Repository: https://github.com/yassinhmiti1/mylibrary

## Overview

MyLibrary is a PHP library-management web application. A member authenticates, browses and filters the catalogue, opens book details, submits a borrowing request, then monitors or returns loans; members can also maintain favorites and profiles. Librarians administer books, users, authors, publishers, themes, and loans through the dashboard. The graph separates access, discovery, circulation, personal features, and administration. Relationships are based on sampled PHP handlers, embedded forms, redirects, SQL, and the dashboard’s table-fetching script; unsampled internals are kept at their exact endpoint paths.

Main entry points: [`config.php`](https://github.com/yassinhmiti1/mylibrary/blob/main/config.php) (Library Database), [`home.php`](https://github.com/yassinhmiti1/mylibrary/blob/main/home.php) (Book Catalogue), [`Index.php`](https://github.com/yassinhmiti1/mylibrary/blob/main/Index.php) (Authentication), [`get_book_details.php`](https://github.com/yassinhmiti1/mylibrary/blob/main/get_book_details.php) (Book Details)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access"]
  node_index_auth["Authentication<br/>[Index.php]"]
  node_welcome["Member Landing<br/>[welcome.php]"]
  node_logout["Logout<br/>[logout.php]"]
end

subgraph group_catalog["Book Discovery"]
  node_library_db[("Library Database<br/>[config.php]")]
  node_catalog_home["Book Catalogue<br/>[home.php]"]
  node_book_details["Book Details"]
  node_book_images["Book Images<br/>[getimage.php]"]
end

subgraph group_circulation["Circulation"]
  node_borrow_form["Borrowing Form<br/>[emprunter.php]"]
  node_my_loans["My Loans<br/>[mes_emprunts.php]"]
  node_loan_status["Return Processing<br/>[update_status.php]"]
end

subgraph group_personal["Member Features"]
  node_favorites_action["Favorite Actions<br/>[add_favorite.php]"]
  node_my_favorites["Favorite Books<br/>[my_favorites.php]"]
  node_profile["User Profile<br/>[editpro.php]"]
end

subgraph group_admin["Administration"]
  node_admin_dashboard["Admin Dashboard<br/>[dashboardbibio.php]"]
  node_admin_client["Admin Table Client<br/>[script.js]"]
  node_admin_tables["Admin Table API<br/>[get_table_data.php]"]
end

node_member(("Member"))
node_librarian(("Librarian"))

node_member -->|"submits credentials"| node_index_auth
node_index_auth -->|"reads and writes"| node_library_db
node_index_auth -->|"redirects after login"| node_welcome
node_member -->|"browses books"| node_catalog_home
node_catalog_home -->|"reads catalogue"| node_library_db
node_catalog_home -->|"loads details"| node_book_details
node_book_details -->|"reads book data"| node_library_db
node_catalog_home -->|"loads covers"| node_book_images
node_book_details -->|"loads cover"| node_book_images
node_member -->|"requests loan"| node_borrow_form
node_borrow_form -->|"creates loan"| node_library_db
node_member -->|"views loans"| node_my_loans
node_my_loans -->|"reads loans"| node_library_db
node_my_loans -->|"submits return"| node_loan_status
node_loan_status -->|"updates status"| node_library_db
node_catalog_home -->|"adds favorite"| node_favorites_action
node_favorites_action -->|"writes favorite"| node_library_db
node_member -->|"views favorites"| node_my_favorites
node_my_favorites -->|"reads favorites"| node_library_db
node_my_favorites -->|"loads covers"| node_book_images
node_member -->|"edits profile"| node_profile
node_profile -->|"reads and writes"| node_library_db
node_librarian -->|"manages library"| node_admin_dashboard
node_admin_dashboard -->|"manages records"| node_library_db
node_admin_dashboard -->|"loads table UI"| node_admin_client
node_admin_client -->|"fetches tables"| node_admin_tables
node_admin_tables -->|"reads records"| node_library_db
node_member -->|"ends session"| node_logout
node_logout -->|"redirects to login"| node_index_auth

click node_index_auth "https://github.com/yassinhmiti1/mylibrary/blob/main/Index.php"
click node_welcome "https://github.com/yassinhmiti1/mylibrary/blob/main/welcome.php"
click node_library_db "https://github.com/yassinhmiti1/mylibrary/blob/main/config.php"
click node_catalog_home "https://github.com/yassinhmiti1/mylibrary/blob/main/home.php"
click node_book_details "https://github.com/yassinhmiti1/mylibrary/blob/main/get_book_details.php"
click node_book_images "https://github.com/yassinhmiti1/mylibrary/blob/main/getimage.php"
click node_borrow_form "https://github.com/yassinhmiti1/mylibrary/blob/main/emprunter.php"
click node_my_loans "https://github.com/yassinhmiti1/mylibrary/blob/main/mes_emprunts.php"
click node_loan_status "https://github.com/yassinhmiti1/mylibrary/blob/main/update_status.php"
click node_favorites_action "https://github.com/yassinhmiti1/mylibrary/blob/main/add_favorite.php"
click node_my_favorites "https://github.com/yassinhmiti1/mylibrary/blob/main/my_favorites.php"
click node_profile "https://github.com/yassinhmiti1/mylibrary/blob/main/editpro.php"
click node_admin_dashboard "https://github.com/yassinhmiti1/mylibrary/blob/main/dashboardbibio.php"
click node_admin_client "https://github.com/yassinhmiti1/mylibrary/blob/main/script.js"
click node_admin_tables "https://github.com/yassinhmiti1/mylibrary/blob/main/get_table_data.php"
click node_logout "https://github.com/yassinhmiti1/mylibrary/blob/main/logout.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_index_auth,node_welcome,node_logout toneBlue
class node_library_db,node_catalog_home,node_book_details,node_book_images toneAmber
class node_borrow_form,node_my_loans,node_loan_status toneMint
class node_favorites_action,node_my_favorites,node_profile toneRose
class node_admin_dashboard,node_admin_client,node_admin_tables,node_member,node_librarian toneIndigo
```

## Components

### Access

- [Authentication](https://github.com/yassinhmiti1/mylibrary/blob/main/Index.php): `Index.php`
- [Member Landing](https://github.com/yassinhmiti1/mylibrary/blob/main/welcome.php): `welcome.php`
- [Logout](https://github.com/yassinhmiti1/mylibrary/blob/main/logout.php): `logout.php`

### Book Discovery

- [Library Database](https://github.com/yassinhmiti1/mylibrary/blob/main/config.php): `config.php`
- [Book Catalogue](https://github.com/yassinhmiti1/mylibrary/blob/main/home.php): `home.php`
- [Book Details](https://github.com/yassinhmiti1/mylibrary/blob/main/get_book_details.php): `get_book_details.php`
- [Book Images](https://github.com/yassinhmiti1/mylibrary/blob/main/getimage.php): `getimage.php`

### Circulation

- [Borrowing Form](https://github.com/yassinhmiti1/mylibrary/blob/main/emprunter.php): `emprunter.php`
- [My Loans](https://github.com/yassinhmiti1/mylibrary/blob/main/mes_emprunts.php): `mes_emprunts.php`
- [Return Processing](https://github.com/yassinhmiti1/mylibrary/blob/main/update_status.php): `update_status.php`

### Member Features

- [Favorite Actions](https://github.com/yassinhmiti1/mylibrary/blob/main/add_favorite.php): `add_favorite.php`
- [Favorite Books](https://github.com/yassinhmiti1/mylibrary/blob/main/my_favorites.php): `my_favorites.php`
- [User Profile](https://github.com/yassinhmiti1/mylibrary/blob/main/editpro.php): `editpro.php`

### Administration

- [Admin Dashboard](https://github.com/yassinhmiti1/mylibrary/blob/main/dashboardbibio.php): `dashboardbibio.php`
- [Admin Table Client](https://github.com/yassinhmiti1/mylibrary/blob/main/script.js): `script.js`
- [Admin Table API](https://github.com/yassinhmiti1/mylibrary/blob/main/get_table_data.php): `get_table_data.php`

### Other components

- **Member**
- **Librarian**

## Connections

- Member → Authentication: submits credentials
- Authentication → Library Database: reads and writes
- Authentication → Member Landing: redirects after login
- Member → Book Catalogue: browses books
- Book Catalogue → Library Database: reads catalogue
- Book Catalogue → Book Details: loads details
- Book Details → Library Database: reads book data
- Book Catalogue → Book Images: loads covers
- Book Details → Book Images: loads cover
- Member → Borrowing Form: requests loan
- Borrowing Form → Library Database: creates loan
- Member → My Loans: views loans
- My Loans → Library Database: reads loans
- My Loans → Return Processing: submits return
- Return Processing → Library Database: updates status
- Book Catalogue → Favorite Actions: adds favorite
- Favorite Actions → Library Database: writes favorite
- Member → Favorite Books: views favorites
- Favorite Books → Library Database: reads favorites
- Favorite Books → Book Images: loads covers
- Member → User Profile: edits profile
- User Profile → Library Database: reads and writes
- Librarian → Admin Dashboard: manages library
- Admin Dashboard → Library Database: manages records
- Admin Dashboard → Admin Table Client: loads table UI
- Admin Table Client → Admin Table API: fetches tables
- Admin Table API → Library Database: reads records
- Member → Logout: ends session
- Logout → Authentication: redirects to login
