# robertsabaumance/roberts-library architecture

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

- Interactive diagram: https://gitdiagram.com/robertsabaumance/roberts-library
- Repository: https://github.com/robertsabaumance/roberts-library

## Overview

This PHP/MySQL library serves a browser-based workflow: users register or log in, search or browse books, reserve available titles, and view or return their reservations. Page handlers own the database operations; shared header and footer provide the common presentation, while a shared table renderer displays book and reservation results. The README documents these capabilities, but only sampled source relationships are shown; the database schema and some files, including CSS, were not inspected.

Main entry points: [`header.php`](https://github.com/robertsabaumance/roberts-library/blob/main/header.php) (Page header), [`reserve.php`](https://github.com/robertsabaumance/roberts-library/blob/main/reserve.php) (Browse and reserve), [`myReservations.php`](https://github.com/robertsabaumance/roberts-library/blob/main/myReservations.php) (My reservations), [`login.php`](https://github.com/robertsabaumance/roberts-library/blob/main/login.php) (Sign in)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Account access"]
  node_homepage["Welcome page<br/>[homepage.php]"]
  node_login["Sign in<br/>[login.php]"]
  node_registration["Registration<br/>[registration.php]"]
  node_logout["Sign out<br/>[logout.php]"]
end

subgraph group_catalog["Book discovery"]
  node_search["Book search<br/>[search.php]"]
end

subgraph group_reservations["Reservations"]
  node_reserve["Browse and reserve<br/>[reserve.php]"]
  node_myreservations["My reservations<br/>[myReservations.php]"]
end

subgraph group_shared["Shared presentation"]
  node_results["Results table"]
  node_header["Page header<br/>[header.php]"]
  node_footer["Page footer<br/>[footer.php]"]
  node_connection["Database connection<br/>[connection.php]"]
end

node_visitor(("Library user"))
node_database[("Book database")]

node_visitor -->|"opens"| node_homepage
node_visitor -->|"signs in"| node_login
node_visitor -->|"registers"| node_registration
node_login -->|"redirects to"| node_homepage
node_registration -->|"redirects to"| node_login
node_logout -->|"redirects to"| node_login
node_search -->|"submits filters"| node_reserve
node_visitor -->|"reserves books"| node_reserve
node_visitor -->|"views or returns"| node_myreservations
node_reserve -->|"queries and updates"| node_database
node_myreservations -->|"queries and updates"| node_database
node_search -->|"loads categories"| node_database
node_connection -->|"connects to"| node_database
node_login -->|"uses"| node_connection
node_registration -->|"uses"| node_connection
node_search -->|"uses"| node_connection
node_reserve -->|"uses"| node_connection
node_myreservations -->|"uses"| node_connection
node_reserve -->|"renders results"| node_results
node_myreservations -->|"renders reservations"| node_results
node_homepage -->|"includes"| node_header
node_login -->|"includes"| node_header
node_registration -->|"includes"| node_header
node_search -->|"includes"| node_header
node_reserve -->|"includes"| node_header
node_myreservations -->|"includes"| node_header
node_homepage -->|"includes"| node_footer
node_login -->|"includes"| node_footer
node_registration -->|"includes"| node_footer
node_search -->|"includes"| node_footer
node_reserve -->|"includes"| node_footer
node_myreservations -->|"includes"| node_footer
node_header -->|"navigates to"| node_homepage
node_header -->|"navigates to"| node_search
node_header -->|"navigates to"| node_reserve
node_header -->|"navigates to"| node_myreservations
node_header -->|"submits logout"| node_logout

click node_homepage "https://github.com/robertsabaumance/roberts-library/blob/main/homepage.php"
click node_login "https://github.com/robertsabaumance/roberts-library/blob/main/login.php"
click node_registration "https://github.com/robertsabaumance/roberts-library/blob/main/registration.php"
click node_logout "https://github.com/robertsabaumance/roberts-library/blob/main/logout.php"
click node_search "https://github.com/robertsabaumance/roberts-library/blob/main/search.php"
click node_reserve "https://github.com/robertsabaumance/roberts-library/blob/main/reserve.php"
click node_myreservations "https://github.com/robertsabaumance/roberts-library/blob/main/myReservations.php"
click node_results "https://github.com/robertsabaumance/roberts-library/blob/main/display_reservations.php"
click node_header "https://github.com/robertsabaumance/roberts-library/blob/main/header.php"
click node_footer "https://github.com/robertsabaumance/roberts-library/blob/main/footer.php"
click node_connection "https://github.com/robertsabaumance/roberts-library/blob/main/connection.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_homepage,node_login,node_registration,node_logout,node_visitor toneBlue
class node_search,node_database toneAmber
class node_reserve,node_myreservations toneMint
class node_results,node_header,node_footer,node_connection toneRose
```

## Components

### Account access

- [Welcome page](https://github.com/robertsabaumance/roberts-library/blob/main/homepage.php): `homepage.php`
- [Sign in](https://github.com/robertsabaumance/roberts-library/blob/main/login.php): `login.php`
- [Registration](https://github.com/robertsabaumance/roberts-library/blob/main/registration.php): `registration.php`
- [Sign out](https://github.com/robertsabaumance/roberts-library/blob/main/logout.php): `logout.php`

### Book discovery

- [Book search](https://github.com/robertsabaumance/roberts-library/blob/main/search.php): `search.php`

### Reservations

- [Browse and reserve](https://github.com/robertsabaumance/roberts-library/blob/main/reserve.php): `reserve.php`
- [My reservations](https://github.com/robertsabaumance/roberts-library/blob/main/myReservations.php): `myReservations.php`

### Shared presentation

- [Results table](https://github.com/robertsabaumance/roberts-library/blob/main/display_reservations.php): `display_reservations.php`
- [Page header](https://github.com/robertsabaumance/roberts-library/blob/main/header.php): `header.php`
- [Page footer](https://github.com/robertsabaumance/roberts-library/blob/main/footer.php): `footer.php`
- [Database connection](https://github.com/robertsabaumance/roberts-library/blob/main/connection.php): `connection.php`

### Other components

- **Library user**
- **Book database**

## Connections

- Library user → Welcome page: opens (evidence: `README.md`)
- Library user → Sign in: signs in (evidence: `README.md`)
- Library user → Registration: registers (evidence: `README.md`)
- Sign in → Welcome page: redirects to (evidence: `login.php`)
- Registration → Sign in: redirects to (evidence: `registration.php`)
- Sign out → Sign in: redirects to (evidence: `logout.php`)
- Book search → Browse and reserve: submits filters (evidence: `search.php`)
- Library user → Browse and reserve: reserves books (evidence: `README.md`)
- Library user → My reservations: views or returns (evidence: `README.md`)
- Browse and reserve → Book database: queries and updates (evidence: `reserve.php`)
- My reservations → Book database: queries and updates (evidence: `myReservations.php`)
- Book search → Book database: loads categories (evidence: `search.php`)
- Database connection → Book database: connects to (evidence: `connection.php`)
- Sign in → Database connection: uses (evidence: `login.php`)
- Registration → Database connection: uses (evidence: `registration.php`)
- Book search → Database connection: uses (evidence: `search.php`)
- Browse and reserve → Database connection: uses (evidence: `reserve.php`)
- My reservations → Database connection: uses (evidence: `myReservations.php`)
- Browse and reserve → Results table: renders results (evidence: `reserve.php`)
- My reservations → Results table: renders reservations (evidence: `myReservations.php`)
- Welcome page → Page header: includes (evidence: `homepage.php`)
- Sign in → Page header: includes (evidence: `login.php`)
- Registration → Page header: includes (evidence: `registration.php`)
- Book search → Page header: includes (evidence: `search.php`)
- Browse and reserve → Page header: includes (evidence: `reserve.php`)
- My reservations → Page header: includes (evidence: `myReservations.php`)
- Welcome page → Page footer: includes (evidence: `homepage.php`)
- Sign in → Page footer: includes (evidence: `login.php`)
- Registration → Page footer: includes (evidence: `registration.php`)
- Book search → Page footer: includes (evidence: `search.php`)
- Browse and reserve → Page footer: includes (evidence: `reserve.php`)
- My reservations → Page footer: includes (evidence: `myReservations.php`)
- Page header → Welcome page: navigates to (evidence: `header.php`)
- Page header → Book search: navigates to (evidence: `header.php`)
- Page header → Browse and reserve: navigates to (evidence: `header.php`)
- Page header → My reservations: navigates to (evidence: `header.php`)
- Page header → Sign out: submits logout (evidence: `header.php`)
