# olmedo-ux/bibliotheque-reloaded architecture

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

- Interactive diagram: https://gitdiagram.com/olmedo-ux/bibliotheque-reloaded
- Repository: https://github.com/olmedo-ux/bibliotheque-reloaded

## Overview

Book Sanctuary is a PHP library-catalogue and borrowing application. Readers sign in, browse or search books, inspect a title, add it to their active reading list, return it, and review borrowing history. Administrators manage catalogue entries. The graph reflects the sampled page logic and the capabilities evident from the file tree; source for several action handlers and the database configuration was not sampled, so their internal behavior and uncertain wiring are not expanded.

Main entry points: [`bibliotheque.sql`](https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/bibliotheque.sql) (Library database), [`admin_panel.php`](https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/admin_panel.php) (Catalogue management), [`results.php`](https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/results.php) (Search catalogue), [`index.php`](https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/index.php) (Home and new books)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_reader["Reader experience"]
  node_home["Home and new books<br/>[index.php]"]
  node_search["Search catalogue<br/>[results.php]"]
  node_bookdetail["Book details<br/>[details.php]"]
end

subgraph group_accounts["Accounts"]
  node_signup["Register reader<br/>[inscription.php]"]
  node_login["Sign in<br/>[connexion.php]"]
  node_sessionnav["Session and navigation<br/>[header.php]"]
  node_logout["Sign out<br/>[deconnexion.php]"]
end

subgraph group_borrowing["Borrowing"]
  node_borrow["Add to reading list"]
  node_activelist["Active reading list<br/>[wishlist.php]"]
  node_returnbook["Return book"]
  node_history["Borrowing history<br/>[historique.php]"]
end

subgraph group_catalogue["Catalogue administration"]
  node_admin["Catalogue management<br/>[admin_panel.php]"]
  node_createbook["Create book<br/>[create_book.php]"]
  node_updatebook["Edit book<br/>[update_book.php]"]
  node_deletebook["Delete book<br/>[delete_book.php]"]
end

subgraph group_storage["Persistence"]
  node_database[("Library database<br/>[bibliotheque.sql]")]
  node_dbconfig["Database connection<br/>[config.php]"]
end

node_reader(("Reader"))

node_reader -->|"opens"| node_home
node_reader -->|"searches"| node_search
node_home -->|"reads new books"| node_database
node_home -->|"submits query"| node_search
node_search -->|"searches books"| node_database
node_search -->|"opens title"| node_bookdetail
node_bookdetail -->|"reads book and loan"| node_database
node_bookdetail -->|"submits book"| node_borrow
node_reader -->|"registers"| node_signup
node_signup -->|"creates reader"| node_database
node_reader -->|"signs in"| node_login
node_login -->|"checks credentials"| node_database
node_login -->|"sets session"| node_sessionnav
node_sessionnav -->|"links sign-out"| node_logout
node_reader -->|"views loans"| node_activelist
node_activelist -->|"reads active loans"| node_database
node_activelist -->|"requests return"| node_returnbook
node_returnbook -->|"updates loan"| node_database
node_reader -->|"views history"| node_history
node_history -->|"reads loan history"| node_database
node_reader -->|"opens management"| node_admin
node_admin -->|"reads catalogue"| node_database
node_admin -->|"opens creation"| node_createbook
node_admin -->|"opens edit"| node_updatebook
node_admin -->|"requests deletion"| node_deletebook
node_createbook -->|"inserts book"| node_database
node_updatebook -->|"updates book"| node_database
node_deletebook -->|"deletes book"| node_database
node_dbconfig -->|"connects"| node_database

click node_home "https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/index.php"
click node_search "https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/results.php"
click node_bookdetail "https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/details.php"
click node_signup "https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/inscription.php"
click node_login "https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/connexion.php"
click node_sessionnav "https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/header.php"
click node_logout "https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/deconnexion.php"
click node_borrow "https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/add_to_wishlist.php"
click node_activelist "https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/wishlist.php"
click node_returnbook "https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/remove_from_wishlist.php"
click node_history "https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/historique.php"
click node_admin "https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/admin_panel.php"
click node_createbook "https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/create_book.php"
click node_updatebook "https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/update_book.php"
click node_deletebook "https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/delete_book.php"
click node_database "https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/bibliotheque.sql"
click node_dbconfig "https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/config.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_home,node_search,node_bookdetail toneBlue
class node_signup,node_login,node_sessionnav,node_logout toneAmber
class node_borrow,node_activelist,node_returnbook,node_history toneMint
class node_admin,node_createbook,node_updatebook,node_deletebook toneRose
class node_database,node_dbconfig,node_reader toneIndigo
```

## Components

### Reader experience

- [Home and new books](https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/index.php): `index.php`
- [Search catalogue](https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/results.php): `results.php`
- [Book details](https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/details.php): `details.php`

### Accounts

- [Register reader](https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/inscription.php): `inscription.php`
- [Sign in](https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/connexion.php): `connexion.php`
- [Session and navigation](https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/header.php): `header.php`
- [Sign out](https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/deconnexion.php): `deconnexion.php`

### Borrowing

- [Add to reading list](https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/add_to_wishlist.php): `add_to_wishlist.php`
- [Active reading list](https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/wishlist.php): `wishlist.php`
- [Return book](https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/remove_from_wishlist.php): `remove_from_wishlist.php`
- [Borrowing history](https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/historique.php): `historique.php`

### Catalogue administration

- [Catalogue management](https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/admin_panel.php): `admin_panel.php`
- [Create book](https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/create_book.php): `create_book.php`
- [Edit book](https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/update_book.php): `update_book.php`
- [Delete book](https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/delete_book.php): `delete_book.php`

### Persistence

- [Library database](https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/bibliotheque.sql): `bibliotheque.sql`
- [Database connection](https://github.com/olmedo-ux/bibliotheque-reloaded/blob/main/config.php): `config.php`

### Other components

- **Reader**

## Connections

- Reader → Home and new books: opens
- Reader → Search catalogue: searches
- Home and new books → Library database: reads new books
- Home and new books → Search catalogue: submits query
- Search catalogue → Library database: searches books
- Search catalogue → Book details: opens title
- Book details → Library database: reads book and loan
- Book details → Add to reading list: submits book
- Reader → Register reader: registers
- Register reader → Library database: creates reader
- Reader → Sign in: signs in
- Sign in → Library database: checks credentials
- Sign in → Session and navigation: sets session
- Session and navigation → Sign out: links sign-out
- Reader → Active reading list: views loans
- Active reading list → Library database: reads active loans
- Active reading list → Return book: requests return
- Return book → Library database: updates loan
- Reader → Borrowing history: views history
- Borrowing history → Library database: reads loan history
- Reader → Catalogue management: opens management
- Catalogue management → Library database: reads catalogue
- Catalogue management → Create book: opens creation
- Catalogue management → Edit book: opens edit
- Catalogue management → Delete book: requests deletion
- Create book → Library database: inserts book
- Edit book → Library database: updates book
- Delete book → Library database: deletes book
- Database connection → Library database: connects
