# kurinji-eswar/library-desk architecture

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

- Interactive diagram: https://gitdiagram.com/kurinji-eswar/library-desk
- Repository: https://github.com/kurinji-eswar/library-desk

## Overview

LIBRARY / DESK is a frontend-only library management workstation. A librarian enters through the desktop workspace, launches a workflow window, and performs catalog, member, circulation, or administrative actions. Screens consume shared state through LibraryContext; useLibraryStore applies business rules and persists records in browser localStorage, with seed data available for initialization and reset. The README documents search, reporting, backup, fines, and reservation notifications; some feature-specific source files were not sampled, so those links are documented rather than inferred from unseen calls.

Main entry points: [`src/context/LibraryContext.jsx`](https://github.com/kurinji-eswar/library-desk/blob/main/src/context/LibraryContext.jsx) (Library Context), [`src/components/Layout/DesktopShell.jsx`](https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Layout/DesktopShell.jsx) (Desktop Shell), [`src/components/Layout/Window.jsx`](https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Layout/Window.jsx) (Window Chrome), [`src/hooks/useLibraryStore.js`](https://github.com/kurinji-eswar/library-desk/blob/main/src/hooks/useLibraryStore.js) (Library Store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Desktop Workspace"]
  node_shell["Desktop Shell<br/>[DesktopShell.jsx]"]
  node_desktop["Desktop Dashboard<br/>[DesktopView.jsx]"]
  node_topbar["Top Bar Search<br/>[TopBar.jsx]"]
end

subgraph group_catalog["Catalog &amp; Members"]
  node_books["Book Catalog<br/>[BooksView.jsx]"]
  node_bookdetails["Book Details<br/>[BookDetails.jsx]"]
  node_bookform["Book Editor<br/>[BookFormModal.jsx]"]
  node_members["Member Directory<br/>[MembersView.jsx]"]
  node_memberprofile["Member Profile<br/>[MemberProfile.jsx]"]
  node_memberform["Member Editor"]
end

subgraph group_circulation["Circulation"]
  node_loans["Loan Management<br/>[LoansView.jsx]"]
  node_loanform["Checkout Form<br/>[NewLoanModal.jsx]"]
  node_returns["Returns &amp; Fines<br/>[ReturnsView.jsx]"]
  node_reservations["Reservations"]
  node_reservationform["Reservation Form"]
end

subgraph group_admin["Administration &amp; Insights"]
  node_categories["Category Manager<br/>[CategoriesView.jsx]"]
  node_reports["Analytics &amp; Reports<br/>[ReportsView.jsx]"]
  node_settings["System Settings<br/>[SettingsView.jsx]"]
end

subgraph group_platform["Shared Platform"]
  node_context["Library Context<br/>[LibraryContext.jsx]"]
  node_store["Library Store<br/>[useLibraryStore.js]"]
  node_seed["Demo Dataset<br/>[seedData.js]"]
  node_storage[("Browser Local Storage")]
  node_window["Window Chrome<br/>[Window.jsx]"]
  node_dateutils["Date Utilities<br/>[dateUtils.js]"]
  node_libraryutils["Persistence Helpers<br/>[libraryUtils.js]"]
end

node_librarian(("Librarian"))

node_librarian -->|"uses"| node_shell
node_shell -->|"renders"| node_desktop
node_shell -->|"renders"| node_topbar
node_shell -->|"routes to"| node_books
node_shell -->|"routes to"| node_members
node_shell -->|"routes to"| node_loans
node_shell -->|"routes to"| node_returns
node_shell -->|"routes to"| node_reservations
node_shell -->|"routes to"| node_categories
node_shell -->|"routes to"| node_reports
node_shell -->|"routes to"| node_settings
node_desktop -->|"reads dashboard state"| node_context
node_topbar -->|"uses shared state"| node_context
node_books -->|"opens details"| node_bookdetails
node_books -.->|"opens editor"| node_bookform
node_members -->|"opens profile"| node_memberprofile
node_members -.->|"opens editor"| node_memberform
node_loans -.->|"opens checkout"| node_loanform
node_reservations -.->|"opens request form"| node_reservationform
node_books -.->|"uses library state"| node_context
node_bookdetails -->|"uses library state"| node_context
node_bookform -->|"uses library state"| node_context
node_members -->|"uses library state"| node_context
node_memberprofile -->|"uses library state"| node_context
node_memberform -.->|"uses library state"| node_context
node_loans -->|"uses library state"| node_context
node_loanform -->|"uses library state"| node_context
node_returns -->|"uses library state"| node_context
node_reservations -->|"uses library state"| node_context
node_reservationform -.->|"uses library state"| node_context
node_categories -->|"uses library state"| node_context
node_reports -->|"uses library state"| node_context
node_settings -->|"uses library state"| node_context
node_context -->|"creates store"| node_store
node_store -->|"reads and writes"| node_storage
node_store -->|"loads or resets from"| node_seed
node_store -->|"persists through"| node_libraryutils
node_store -->|"calculates dates with"| node_dateutils
node_bookdetails -->|"renders in"| node_window
node_memberprofile -->|"renders in"| node_window
node_loans -->|"renders in"| node_window
node_returns -->|"renders in"| node_window
node_reservations -->|"renders in"| node_window
node_categories -->|"renders in"| node_window
node_reports -->|"renders in"| node_window
node_settings -->|"renders in"| node_window
node_librarian -.->|"searches records"| node_topbar
node_returns -.->|"notifies when ready"| node_reservations

click node_shell "https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Layout/DesktopShell.jsx"
click node_desktop "https://github.com/kurinji-eswar/library-desk/blob/main/src/components/DesktopView.jsx"
click node_topbar "https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Layout/TopBar.jsx"
click node_books "https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Books/BooksView.jsx"
click node_bookdetails "https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Books/BookDetails.jsx"
click node_bookform "https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Books/BookFormModal.jsx"
click node_members "https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Members/MembersView.jsx"
click node_memberprofile "https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Members/MemberProfile.jsx"
click node_memberform "https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Members/MemberFormModal.jsx"
click node_loans "https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Loans/LoansView.jsx"
click node_loanform "https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Loans/NewLoanModal.jsx"
click node_returns "https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Returns/ReturnsView.jsx"
click node_reservations "https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Reservations/ReservationsView.jsx"
click node_reservationform "https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Reservations/NewReservationModal.jsx"
click node_categories "https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Categories/CategoriesView.jsx"
click node_reports "https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Reports/ReportsView.jsx"
click node_settings "https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Settings/SettingsView.jsx"
click node_context "https://github.com/kurinji-eswar/library-desk/blob/main/src/context/LibraryContext.jsx"
click node_store "https://github.com/kurinji-eswar/library-desk/blob/main/src/hooks/useLibraryStore.js"
click node_seed "https://github.com/kurinji-eswar/library-desk/blob/main/src/data/seedData.js"
click node_window "https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Layout/Window.jsx"
click node_dateutils "https://github.com/kurinji-eswar/library-desk/blob/main/src/utils/dateUtils.js"
click node_libraryutils "https://github.com/kurinji-eswar/library-desk/blob/main/src/utils/libraryUtils.js"

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_shell,node_desktop,node_topbar toneBlue
class node_books,node_bookdetails,node_bookform,node_members,node_memberprofile,node_memberform toneAmber
class node_loans,node_loanform,node_returns,node_reservations,node_reservationform toneMint
class node_categories,node_reports,node_settings toneRose
class node_context,node_store,node_seed,node_storage,node_window,node_dateutils,node_libraryutils,node_librarian toneIndigo
```

## Components

### Desktop Workspace

- [Desktop Shell](https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Layout/DesktopShell.jsx): `src/components/Layout/DesktopShell.jsx`
- [Desktop Dashboard](https://github.com/kurinji-eswar/library-desk/blob/main/src/components/DesktopView.jsx): `src/components/DesktopView.jsx`
- [Top Bar Search](https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Layout/TopBar.jsx): `src/components/Layout/TopBar.jsx`

### Catalog & Members

- [Book Catalog](https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Books/BooksView.jsx): `src/components/Books/BooksView.jsx`
- [Book Details](https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Books/BookDetails.jsx): `src/components/Books/BookDetails.jsx`
- [Book Editor](https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Books/BookFormModal.jsx): `src/components/Books/BookFormModal.jsx`
- [Member Directory](https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Members/MembersView.jsx): `src/components/Members/MembersView.jsx`
- [Member Profile](https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Members/MemberProfile.jsx): `src/components/Members/MemberProfile.jsx`
- [Member Editor](https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Members/MemberFormModal.jsx): `src/components/Members/MemberFormModal.jsx`

### Circulation

- [Loan Management](https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Loans/LoansView.jsx): `src/components/Loans/LoansView.jsx`
- [Checkout Form](https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Loans/NewLoanModal.jsx): `src/components/Loans/NewLoanModal.jsx`
- [Returns & Fines](https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Returns/ReturnsView.jsx): `src/components/Returns/ReturnsView.jsx`
- [Reservations](https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Reservations/ReservationsView.jsx): `src/components/Reservations/ReservationsView.jsx`
- [Reservation Form](https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Reservations/NewReservationModal.jsx): `src/components/Reservations/NewReservationModal.jsx`

### Administration & Insights

- [Category Manager](https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Categories/CategoriesView.jsx): `src/components/Categories/CategoriesView.jsx`
- [Analytics & Reports](https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Reports/ReportsView.jsx): `src/components/Reports/ReportsView.jsx`
- [System Settings](https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Settings/SettingsView.jsx): `src/components/Settings/SettingsView.jsx`

### Shared Platform

- [Library Context](https://github.com/kurinji-eswar/library-desk/blob/main/src/context/LibraryContext.jsx): `src/context/LibraryContext.jsx`
- [Library Store](https://github.com/kurinji-eswar/library-desk/blob/main/src/hooks/useLibraryStore.js): `src/hooks/useLibraryStore.js`
- [Demo Dataset](https://github.com/kurinji-eswar/library-desk/blob/main/src/data/seedData.js): `src/data/seedData.js`
- **Browser Local Storage**
- [Window Chrome](https://github.com/kurinji-eswar/library-desk/blob/main/src/components/Layout/Window.jsx): `src/components/Layout/Window.jsx`
- [Date Utilities](https://github.com/kurinji-eswar/library-desk/blob/main/src/utils/dateUtils.js): `src/utils/dateUtils.js`
- [Persistence Helpers](https://github.com/kurinji-eswar/library-desk/blob/main/src/utils/libraryUtils.js): `src/utils/libraryUtils.js`

### Other components

- **Librarian**

## Connections

- Librarian → Desktop Shell: uses (evidence: `README.md`)
- Desktop Shell → Desktop Dashboard: renders (evidence: `src/components/Layout/DesktopShell.jsx`)
- Desktop Shell → Top Bar Search: renders (evidence: `src/components/Layout/DesktopShell.jsx`)
- Desktop Shell → Book Catalog: routes to (evidence: `src/components/Layout/DesktopShell.jsx`)
- Desktop Shell → Member Directory: routes to (evidence: `src/components/Layout/DesktopShell.jsx`)
- Desktop Shell → Loan Management: routes to (evidence: `src/components/Layout/DesktopShell.jsx`)
- Desktop Shell → Returns & Fines: routes to (evidence: `src/components/Layout/DesktopShell.jsx`)
- Desktop Shell → Reservations: routes to (evidence: `src/components/Layout/DesktopShell.jsx`)
- Desktop Shell → Category Manager: routes to (evidence: `src/components/Layout/DesktopShell.jsx`)
- Desktop Shell → Analytics & Reports: routes to (evidence: `src/components/Layout/DesktopShell.jsx`)
- Desktop Shell → System Settings: routes to (evidence: `src/components/Layout/DesktopShell.jsx`)
- Desktop Dashboard → Library Context: reads dashboard state (evidence: `src/components/DesktopView.jsx`)
- Top Bar Search → Library Context: uses shared state (evidence: `src/components/Layout/TopBar.jsx`)
- Book Catalog → Book Details: opens details
- Book Catalog → Book Editor: opens editor
- Member Directory → Member Profile: opens profile (evidence: `src/components/Members/MembersView.jsx`)
- Member Directory → Member Editor: opens editor
- Loan Management → Checkout Form: opens checkout
- Reservations → Reservation Form: opens request form
- Book Catalog → Library Context: uses library state
- Book Details → Library Context: uses library state (evidence: `src/components/Books/BookDetails.jsx`)
- Book Editor → Library Context: uses library state (evidence: `src/components/Books/BookFormModal.jsx`)
- Member Directory → Library Context: uses library state (evidence: `src/components/Members/MembersView.jsx`)
- Member Profile → Library Context: uses library state (evidence: `src/components/Members/MemberProfile.jsx`)
- Member Editor → Library Context: uses library state
- Loan Management → Library Context: uses library state (evidence: `src/components/Loans/LoansView.jsx`)
- Checkout Form → Library Context: uses library state (evidence: `src/components/Loans/NewLoanModal.jsx`)
- Returns & Fines → Library Context: uses library state (evidence: `src/components/Returns/ReturnsView.jsx`)
- Reservations → Library Context: uses library state (evidence: `src/components/Reservations/ReservationsView.jsx`)
- Reservation Form → Library Context: uses library state
- Category Manager → Library Context: uses library state (evidence: `src/components/Categories/CategoriesView.jsx`)
- Analytics & Reports → Library Context: uses library state (evidence: `src/components/Reports/ReportsView.jsx`)
- System Settings → Library Context: uses library state (evidence: `src/components/Settings/SettingsView.jsx`)
- Library Context → Library Store: creates store (evidence: `src/context/LibraryContext.jsx`)
- Library Store → Browser Local Storage: reads and writes (evidence: `src/hooks/useLibraryStore.js`)
- Library Store → Demo Dataset: loads or resets from (evidence: `src/hooks/useLibraryStore.js`)
- Library Store → Persistence Helpers: persists through (evidence: `src/hooks/useLibraryStore.js`)
- Library Store → Date Utilities: calculates dates with (evidence: `src/hooks/useLibraryStore.js`)
- Book Details → Window Chrome: renders in (evidence: `src/components/Books/BookDetails.jsx`)
- Member Profile → Window Chrome: renders in (evidence: `src/components/Members/MemberProfile.jsx`)
- Loan Management → Window Chrome: renders in (evidence: `src/components/Loans/LoansView.jsx`)
- Returns & Fines → Window Chrome: renders in (evidence: `src/components/Returns/ReturnsView.jsx`)
- Reservations → Window Chrome: renders in (evidence: `src/components/Reservations/ReservationsView.jsx`)
- Category Manager → Window Chrome: renders in (evidence: `src/components/Categories/CategoriesView.jsx`)
- Analytics & Reports → Window Chrome: renders in (evidence: `src/components/Reports/ReportsView.jsx`)
- System Settings → Window Chrome: renders in (evidence: `src/components/Settings/SettingsView.jsx`)
- Librarian → Top Bar Search: searches records
- Returns & Fines → Reservations: notifies when ready (evidence: `README.md`)
