# meryemmanar/bibliotheque-usmba architecture

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

- Interactive diagram: https://gitdiagram.com/meryemmanar/bibliotheque-usmba
- Repository: https://github.com/meryemmanar/bibliotheque-usmba

## Overview

This is a French-language university library management web app. Visitors and students browse the catalog, scan or open book details, and submit loan requests; librarians handle pickup, active loans, returns, overdue items, messages, and settings. The shared LibraryContext coordinates domain state and browser-local persistence. The README is empty, so capabilities are drawn from the source index and shown excerpts; edges are limited to documented imports, rendered views, and explicitly shown storage behavior.

Main entry points: [`src/App.tsx`](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/App.tsx) (App navigation), [`src/context/LibraryContext.tsx`](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/context/LibraryContext.tsx) (Library domain state), [`src/components/BooksView.tsx`](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/BooksView.tsx) (Book catalog), [`src/components/LibrarianCounterPickupView.tsx`](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/LibrarianCounterPickupView.tsx) (Counter pickup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_entry["React entry<br/>[main.tsx]"]
  node_shell["App navigation<br/>[App.tsx]"]
  node_navbar["Role navigation<br/>[Navbar.tsx]"]
end

subgraph group_student["Student services"]
  node_auth["Authentication<br/>[AuthModal.tsx]"]
  node_home["Home and scan<br/>[HomeView.tsx]"]
  node_catalog["Book catalog<br/>[BooksView.tsx]"]
  node_bookdetail["Book details<br/>[BookModal.tsx]"]
  node_loanrequest["Loan request"]
  node_studentloans["Student loans"]
  node_studentnotices["Student notifications"]
  node_profile["Student profile"]
end

subgraph group_circulation["Library circulation"]
  node_bookscan["Book QR scan"]
  node_cardscan["Student card scan"]
  node_camerascanner["Camera scanner"]
  node_pickup["Counter pickup"]
  node_librarianloans["Loan management"]
  node_returns["Returns"]
  node_overdue["Overdue loans"]
  node_topickup["Pickup queue"]
  node_qrcodeexport["Book QR export<br/>[bookQrExport.ts]"]
  node_scanfeedback["Scan validation feedback<br/>[qrScanFeedback.ts]"]
  node_qrtranslations["QR translations<br/>[qrTranslations.ts]"]
  node_globalscan["Global card scan"]
  node_returnmodal["Return dialog<br/>[ReturnModal.tsx]"]
end

subgraph group_admin["Librarian operations"]
  node_librarianmessages["Librarian messages"]
  node_systemnotices["System notifications"]
  node_dashboard["Librarian dashboard<br/>[DashboardView.tsx]"]
  node_labels["QR labels"]
  node_settings["Library settings"]
end

subgraph group_state["Library state"]
  node_context["Library domain state<br/>[LibraryContext.tsx]"]
  node_mockdata["Initial library data<br/>[mockData.ts]"]
  node_types["Library domain types<br/>[library.ts]"]
  node_browserstore[("Browser local storage")]
end

node_visitor(("Visitor or member"))

node_visitor -.->|"opens app"| node_entry
node_entry -->|"renders"| node_shell
node_shell -->|"renders"| node_navbar
node_shell -->|"renders"| node_auth
node_shell -->|"routes to"| node_home
node_shell -->|"routes to"| node_catalog
node_shell -->|"routes to"| node_studentloans
node_shell -->|"routes to"| node_studentnotices
node_shell -->|"routes to"| node_profile
node_shell -->|"routes to"| node_librarianloans
node_shell -->|"routes to"| node_topickup
node_shell -->|"routes to"| node_pickup
node_shell -->|"routes to"| node_librarianmessages
node_shell -->|"routes to"| node_systemnotices
node_shell -->|"routes to"| node_labels
node_catalog -.->|"opens details"| node_bookdetail
node_home -->|"opens scanner"| node_bookscan
node_catalog -.->|"starts request"| node_loanrequest
node_catalog -->|"exports QR"| node_qrcodeexport
node_catalog -->|"loads labels"| node_qrtranslations
node_bookscan -->|"loads labels"| node_qrtranslations
node_pickup -.->|"uses validation"| node_scanfeedback
node_topickup -->|"uses scanner"| node_camerascanner
node_globalscan -->|"renders"| node_camerascanner
node_shell -.->|"routes to"| node_returns
node_shell -.->|"routes to"| node_overdue
node_shell -.->|"routes to"| node_dashboard
node_shell -.->|"routes to"| node_settings
node_shell -.->|"opens scanner"| node_globalscan
node_shell -.->|"opens dialog"| node_returnmodal
node_auth -->|"calls auth actions"| node_context
node_catalog -->|"reads and updates"| node_context
node_bookdetail -->|"uses library state"| node_context
node_loanrequest -->|"uses library state"| node_context
node_studentloans -->|"uses library state"| node_context
node_studentnotices -->|"uses library state"| node_context
node_profile -->|"uses library state"| node_context
node_pickup -->|"uses library state"| node_context
node_librarianloans -->|"uses library state"| node_context
node_returns -->|"uses library state"| node_context
node_overdue -->|"uses library state"| node_context
node_topickup -->|"uses library state"| node_context
node_librarianmessages -->|"uses library state"| node_context
node_systemnotices -->|"uses library state"| node_context
node_dashboard -->|"uses library state"| node_context
node_labels -->|"uses library state"| node_context
node_settings -->|"uses library state"| node_context
node_context -->|"loads defaults"| node_mockdata

click node_entry "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/main.tsx"
click node_shell "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/App.tsx"
click node_navbar "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/Navbar.tsx"
click node_auth "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/AuthModal.tsx"
click node_home "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/HomeView.tsx"
click node_catalog "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/BooksView.tsx"
click node_bookdetail "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/BookModal.tsx"
click node_loanrequest "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/StudentLoanRequestModal.tsx"
click node_studentloans "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/StudentLoansView.tsx"
click node_studentnotices "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/StudentNotificationsView.tsx"
click node_profile "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/StudentProfileView.tsx"
click node_bookscan "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/BookQrScanModal.tsx"
click node_cardscan "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/StudentCardScanModal.tsx"
click node_camerascanner "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/CardCameraScanner.tsx"
click node_pickup "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/LibrarianCounterPickupView.tsx"
click node_librarianloans "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/LibrarianLoansView.tsx"
click node_returns "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/LibrarianReturnsView.tsx"
click node_overdue "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/LibrarianOverdueView.tsx"
click node_topickup "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/LibrarianToPickupView.tsx"
click node_librarianmessages "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/LibrarianNotificationsView.tsx"
click node_systemnotices "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/LibrarianSystemNotificationsView.tsx"
click node_dashboard "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/DashboardView.tsx"
click node_labels "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/LibrarianQrLabelsView.tsx"
click node_settings "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/LibrarianSettingsView.tsx"
click node_context "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/context/LibraryContext.tsx"
click node_mockdata "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/data/mockData.ts"
click node_types "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/types/library.ts"
click node_qrcodeexport "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/utils/bookQrExport.ts"
click node_scanfeedback "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/utils/qrScanFeedback.ts"
click node_qrtranslations "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/utils/qrTranslations.ts"
click node_globalscan "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/GlobalScanCardModal.tsx"
click node_returnmodal "https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/ReturnModal.tsx"

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_entry,node_shell,node_navbar toneBlue
class node_auth,node_home,node_catalog,node_bookdetail,node_loanrequest,node_studentloans,node_studentnotices,node_profile toneAmber
class node_bookscan,node_cardscan,node_camerascanner,node_pickup,node_librarianloans,node_returns,node_overdue,node_topickup,node_qrcodeexport,node_scanfeedback,node_qrtranslations,node_globalscan,node_returnmodal toneMint
class node_librarianmessages,node_systemnotices,node_dashboard,node_labels,node_settings toneRose
class node_context,node_mockdata,node_types,node_browserstore,node_visitor toneIndigo
```

## Components

### Application shell

- [React entry](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/main.tsx): `src/main.tsx`
- [App navigation](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/App.tsx): `src/App.tsx`
- [Role navigation](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/Navbar.tsx): `src/components/Navbar.tsx`

### Student services

- [Authentication](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/AuthModal.tsx): `src/components/AuthModal.tsx`
- [Home and scan](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/HomeView.tsx): `src/components/HomeView.tsx`
- [Book catalog](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/BooksView.tsx): `src/components/BooksView.tsx`
- [Book details](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/BookModal.tsx): `src/components/BookModal.tsx`
- [Loan request](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/StudentLoanRequestModal.tsx): `src/components/StudentLoanRequestModal.tsx`
- [Student loans](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/StudentLoansView.tsx): `src/components/StudentLoansView.tsx`
- [Student notifications](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/StudentNotificationsView.tsx): `src/components/StudentNotificationsView.tsx`
- [Student profile](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/StudentProfileView.tsx): `src/components/StudentProfileView.tsx`

### Library circulation

- [Book QR scan](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/BookQrScanModal.tsx): `src/components/BookQrScanModal.tsx`
- [Student card scan](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/StudentCardScanModal.tsx): `src/components/StudentCardScanModal.tsx`
- [Camera scanner](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/CardCameraScanner.tsx): `src/components/CardCameraScanner.tsx`
- [Counter pickup](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/LibrarianCounterPickupView.tsx): `src/components/LibrarianCounterPickupView.tsx`
- [Loan management](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/LibrarianLoansView.tsx): `src/components/LibrarianLoansView.tsx`
- [Returns](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/LibrarianReturnsView.tsx): `src/components/LibrarianReturnsView.tsx`
- [Overdue loans](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/LibrarianOverdueView.tsx): `src/components/LibrarianOverdueView.tsx`
- [Pickup queue](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/LibrarianToPickupView.tsx): `src/components/LibrarianToPickupView.tsx`
- [Book QR export](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/utils/bookQrExport.ts): `src/utils/bookQrExport.ts`
- [Scan validation feedback](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/utils/qrScanFeedback.ts): `src/utils/qrScanFeedback.ts`
- [QR translations](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/utils/qrTranslations.ts): `src/utils/qrTranslations.ts`
- [Global card scan](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/GlobalScanCardModal.tsx): `src/components/GlobalScanCardModal.tsx`
- [Return dialog](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/ReturnModal.tsx): `src/components/ReturnModal.tsx`

### Librarian operations

- [Librarian messages](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/LibrarianNotificationsView.tsx): `src/components/LibrarianNotificationsView.tsx`
- [System notifications](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/LibrarianSystemNotificationsView.tsx): `src/components/LibrarianSystemNotificationsView.tsx`
- [Librarian dashboard](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/DashboardView.tsx): `src/components/DashboardView.tsx`
- [QR labels](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/LibrarianQrLabelsView.tsx): `src/components/LibrarianQrLabelsView.tsx`
- [Library settings](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/components/LibrarianSettingsView.tsx): `src/components/LibrarianSettingsView.tsx`

### Library state

- [Library domain state](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/context/LibraryContext.tsx): `src/context/LibraryContext.tsx`
- [Initial library data](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/data/mockData.ts): `src/data/mockData.ts`
- [Library domain types](https://github.com/meryemmanar/bibliotheque-usmba/blob/main/src/types/library.ts): `src/types/library.ts`
- **Browser local storage**

### Other components

- **Visitor or member**

## Connections

- Visitor or member → React entry: opens app
- React entry → App navigation: renders (evidence: `src/main.tsx`)
- App navigation → Role navigation: renders (evidence: `src/App.tsx`)
- App navigation → Authentication: renders (evidence: `src/App.tsx`)
- App navigation → Home and scan: routes to (evidence: `src/App.tsx`)
- App navigation → Book catalog: routes to (evidence: `src/App.tsx`)
- App navigation → Student loans: routes to (evidence: `src/App.tsx`)
- App navigation → Student notifications: routes to (evidence: `src/App.tsx`)
- App navigation → Student profile: routes to (evidence: `src/App.tsx`)
- App navigation → Loan management: routes to (evidence: `src/App.tsx`)
- App navigation → Pickup queue: routes to (evidence: `src/App.tsx`)
- App navigation → Counter pickup: routes to (evidence: `src/App.tsx`)
- App navigation → Librarian messages: routes to (evidence: `src/App.tsx`)
- App navigation → System notifications: routes to (evidence: `src/App.tsx`)
- App navigation → QR labels: routes to (evidence: `src/App.tsx`)
- Book catalog → Book details: opens details
- Home and scan → Book QR scan: opens scanner (evidence: `src/components/HomeView.tsx`)
- Book catalog → Loan request: starts request
- Book catalog → Book QR export: exports QR (evidence: `src/components/BooksView.tsx`)
- Book catalog → QR translations: loads labels (evidence: `src/components/BooksView.tsx`)
- Book QR scan → QR translations: loads labels (evidence: `src/components/BookQrScanModal.tsx`)
- Counter pickup → Scan validation feedback: uses validation (evidence: `src/components/LibrarianCounterPickupView.tsx`)
- Pickup queue → Camera scanner: uses scanner (evidence: `src/components/LibrarianToPickupView.tsx`)
- Global card scan → Camera scanner: renders (evidence: `src/components/GlobalScanCardModal.tsx`)
- App navigation → Returns: routes to (evidence: `src/App.tsx`)
- App navigation → Overdue loans: routes to (evidence: `src/App.tsx`)
- App navigation → Librarian dashboard: routes to (evidence: `src/App.tsx`)
- App navigation → Library settings: routes to (evidence: `src/App.tsx`)
- App navigation → Global card scan: opens scanner (evidence: `src/App.tsx`)
- App navigation → Return dialog: opens dialog (evidence: `src/App.tsx`)
- Authentication → Library domain state: calls auth actions (evidence: `src/components/AuthModal.tsx`)
- Book catalog → Library domain state: reads and updates (evidence: `src/components/BooksView.tsx`)
- Book details → Library domain state: uses library state (evidence: `src/components/BookModal.tsx`)
- Loan request → Library domain state: uses library state (evidence: `src/components/StudentLoanRequestModal.tsx`)
- Student loans → Library domain state: uses library state (evidence: `src/components/StudentLoansView.tsx`)
- Student notifications → Library domain state: uses library state (evidence: `src/components/StudentNotificationsView.tsx`)
- Student profile → Library domain state: uses library state (evidence: `src/components/StudentProfileView.tsx`)
- Counter pickup → Library domain state: uses library state (evidence: `src/components/LibrarianCounterPickupView.tsx`)
- Loan management → Library domain state: uses library state (evidence: `src/components/LibrarianLoansView.tsx`)
- Returns → Library domain state: uses library state (evidence: `src/components/LibrarianReturnsView.tsx`)
- Overdue loans → Library domain state: uses library state (evidence: `src/components/LibrarianOverdueView.tsx`)
- Pickup queue → Library domain state: uses library state (evidence: `src/components/LibrarianToPickupView.tsx`)
- Librarian messages → Library domain state: uses library state (evidence: `src/components/LibrarianNotificationsView.tsx`)
- System notifications → Library domain state: uses library state (evidence: `src/components/LibrarianSystemNotificationsView.tsx`)
- Librarian dashboard → Library domain state: uses library state (evidence: `src/components/DashboardView.tsx`)
- QR labels → Library domain state: uses library state (evidence: `src/components/LibrarianQrLabelsView.tsx`)
- Library settings → Library domain state: uses library state (evidence: `src/components/LibrarianSettingsView.tsx`)
- Library domain state → Initial library data: loads defaults (evidence: `src/context/LibraryContext.tsx`)
