How hanan-alkahwaji/front-end works
This is a React library-management frontend, not the backend: staff can browse and manage books, create borrowing records, and manage active loans by editing return dates or returning books. The browser entry mounts the routed application; book and borrower pages call a localhost HTTP API, whose server implementation is outside this repository. The graph reflects imports and calls shown in the source index and excerpts; it does not infer backend storage or unsampled behavior.
Main entry points: BookPage.jsx Books page · BorrowPage.jsx Current borrowers · App.jsx Route dispatch · api.js HTTP API client
Components 18
Application shell
- React entry
src/main.jsx - Route dispatch
src/App.jsx - App layout
src/components/layout/AppLayout.jsx - Navigation bar
src/components/layout/Navbar.jsx - HTTP API client
src/services/api.js
Book management
- Books page
src/pages/BookPage.jsx - Book form
src/components/BookForm.jsx - Form modal
src/components/FormModal.jsx - Confirm modal
src/components/ConfirmModal.jsx - Status filter
src/components/StatusFilter.jsx
Borrowing management
- Current borrowers
src/pages/BorrowPage.jsx
Shared interface
- Page header
src/components/layout/PageHeader.jsx - Content card
src/components/ui/Card.jsx - Status badge
src/components/ui/StatusBadge.jsx - Error alert
src/components/ui/AlertError.jsx - Action buttons
src/components/ui/ActionButtons.jsx
Other components
- Library user
- Library API server
Connections 23
- Library user → React entry: uses
- React entry → Route dispatch: mounts
src/main.jsx - Route dispatch → Books page: routes
src/App.jsx - Route dispatch → Current borrowers: routes
src/App.jsx - Route dispatch → App layout: wraps routes
src/App.jsx - App layout → Navigation bar: renders
src/components/layout/AppLayout.jsx - Books page → HTTP API client: loads and mutates
src/pages/BookPage.jsx - Current borrowers → HTTP API client: loads and updates
src/pages/BorrowPage.jsx - HTTP API client → Library API server: HTTP requests
src/services/api.js - Books page → Book form: renders
src/pages/BookPage.jsx - Books page → Form modal: renders
src/pages/BookPage.jsx - Books page → Confirm modal: renders
src/pages/BookPage.jsx - Books page → Status filter: renders
src/pages/BookPage.jsx - Book form → Error alert: renders
src/components/BookForm.jsx - Books page → Page header: renders
src/pages/BookPage.jsx - Books page → Content card: renders
src/pages/BookPage.jsx - Books page → Status badge: renders
src/pages/BookPage.jsx - Books page → Error alert: renders
src/pages/BookPage.jsx - Books page → Action buttons: uses
src/pages/BookPage.jsx - Current borrowers → Page header: renders
src/pages/BorrowPage.jsx - Current borrowers → Content card: renders
src/pages/BorrowPage.jsx - Current borrowers → Status badge: renders
src/pages/BorrowPage.jsx - Current borrowers → Error alert: renders
src/pages/BorrowPage.jsx