How nimnaka98/linear-six-book-library works
This is a React book-library application for browsing and managing a collection. The main workflow is: users search or browse books, open the add/edit form or request deletion, and the application updates shared state through its API service, then displays the resulting collection and feedback. Grid/list presentation, ratings, a featured carousel, and an About page are additional product capabilities. The principal wiring is supported by excerpts and the SOURCE INDEX; the README documents JSON Server and its db.json data source.
Main entry points: BookGrid.jsx Book display and actions · App.jsx App routes and shell · Home.jsx Home page · BookForm.jsx Book edit form
Components 23
Application shell
- App routes and shell
src/App.jsx - Home page
src/components/Home.jsx - About page
src/components/About.jsx - Navigation and search
src/components/Header.jsx - Footer
src/components/Footer.jsx - Featured carousel
src/components/HeroCarousel.jsx
Book catalog
- Book display and actions
src/components/BookGrid.jsx - Grid book card
src/components/BookCard.jsx - List book item
src/components/BookListItem.jsx - Book edit form
src/components/BookForm.jsx - Search box
src/components/UI/SearchBox.jsx
State and persistence
- Book state and actions
src/contexts/BookContext.jsx - Book API client
src/services/bookAPI.js - Fallback book data
src/data/mockData.js - JSON Server API
- Book records
db.json
Reusable interface
- Star rating
src/components/UI/Rating.jsx - Modal dialog
src/components/UI/Modal.jsx - Confirmation dialog
src/components/UI/ConfirmDialog.jsx - Button
src/components/UI/Button.jsx - Error feedback
src/components/UI/ErrorToast.jsx - Success feedback
src/components/UI/SuccessToast.jsx
Other components
- Library user
Connections 26
- Library user → App routes and shell: uses
README.md - App routes and shell → Home page: routes to
src/App.jsx - App routes and shell → About page: routes to
src/App.jsx - App routes and shell → Navigation and search: renders
src/App.jsx - App routes and shell → Footer: renders
src/App.jsx - Home page → Featured carousel: renders
src/components/Home.jsx - Home page → Book display and actions: renders
src/components/Home.jsx - Navigation and search → Search box: renders
src/components/Header.jsx - Search box → Book display and actions: dispatches search
src/components/UI/SearchBox.jsx - Book display and actions → Book state and actions: requests actions
src/components/BookGrid.jsx - Book display and actions → Grid book card: renders grid
src/components/BookGrid.jsx - Book display and actions → List book item: renders list
src/components/BookGrid.jsx - Book display and actions → Book edit form: renders form
src/components/BookGrid.jsx - Book display and actions → Modal dialog: opens form in
src/components/BookGrid.jsx - Book display and actions → Confirmation dialog: confirms deletion
src/components/BookGrid.jsx - Book display and actions → Error feedback: shows errors
src/components/BookGrid.jsx - Book display and actions → Success feedback: shows success
src/components/BookGrid.jsx - Book edit form → Confirmation dialog: confirms discard
src/components/BookForm.jsx - Book edit form → Button: uses
src/components/BookForm.jsx - Confirmation dialog → Button: uses
src/components/UI/ConfirmDialog.jsx - Grid book card → Star rating: renders rating
src/components/BookCard.jsx - List book item → Star rating: renders rating
src/components/BookListItem.jsx - Book state and actions → Book API client: performs CRUD
src/contexts/BookContext.jsx - Book state and actions → Fallback book data: falls back to
src/contexts/BookContext.jsx - Book API client → JSON Server API: sends REST requests
src/services/bookAPI.js - JSON Server API → Book records: reads and writes
README.md