How rifat-2010/programming-hero-assignment-11__client-side- works
BookCourier is a React client for browsing library books, requesting delivery, and managing orders through customer, librarian, and administrator dashboards. The main route flow is browsing the catalog, viewing a book, initiating a purchase/request, then monitoring the order; the README also describes wishlist and review capabilities. The server is external to this tree. Edges are limited to route declarations, shown imports/calls, or README-documented capabilities; unsampled feature implementations are represented at their existing page paths.
Main entry points: router.jsx Route dispatch · MyOrders.jsx Customer orders · BookDetailsPage.jsx Book details · Books.jsx Book catalog
Components 24
Reader experience
- Route dispatch
src/routes/router.jsx - Home discovery
src/pages/HomePage.jsx - Book catalog
src/pages/Books.jsx - Book cards
src/components/BookCart.jsx - Book details
src/pages/BookDetailsPage.jsx - Book reviews
src/components/ReviewForm.jsx - Wishlist
src/pages/Dashboard/Customer/MyWishlist.jsx
Identity and access
- Auth provider
src/context/AuthProvider.jsx - Firebase auth
src/firebase/firebase.config.js - Auth access hook
src/hooks/useAuth.jsx - Role lookup
src/hooks/useRole.jsx - Secure HTTP client
src/hooks/useAxiosSecure.jsx - Sign in
src/pages/SignIn.jsx - Sign up
src/pages/SignUp.jsx
Orders and delivery
- Purchase request
src/components/Modal/PurchaseModal.jsx - Customer orders
src/pages/Dashboard/Customer/MyOrders.jsx - Payment return
src/pages/Payment/PaymentSuccess.jsx - BookCourier API
Library operations
- Inventory management
src/pages/Dashboard/Seller/MyBooks.jsx - Add book
src/components/Form/AddBookCart.jsx - Order processing
src/pages/Dashboard/Seller/ManageOrders.jsx - User administration
src/pages/Dashboard/Admin/ManageUsers.jsx - Role statistics
src/pages/Dashboard/Common/Statistics.jsx
Other components
- Reader
Connections 38
- Reader → Route dispatch: opens
src/routes/router.jsx - Route dispatch → Home discovery: routes to
src/routes/router.jsx - Route dispatch → Book catalog: routes to
src/routes/router.jsx - Route dispatch → Book details: routes to
src/routes/router.jsx - Route dispatch → Customer orders: routes to
src/routes/router.jsx - Route dispatch → Sign in: routes to
src/routes/router.jsx - Route dispatch → Sign up: routes to
src/routes/router.jsx - Route dispatch → Wishlist: routes to
src/routes/router.jsx - Route dispatch → Inventory management: routes to
src/routes/router.jsx - Route dispatch → Order processing: routes to
src/routes/router.jsx - Route dispatch → User administration: routes to
src/routes/router.jsx - Route dispatch → Role statistics: routes to
src/routes/router.jsx - Route dispatch → Payment return: routes to
src/routes/router.jsx - Home discovery → Book cards: renders
src/pages/HomePage.jsx - Book catalog → Book cards: renders
src/pages/Books.jsx - Book details → Book reviews: renders
src/pages/BookDetailsPage.jsx - Reader → Book catalog: browses
README.md - Book details → Purchase request: initiates request
src/pages/BookDetailsPage.jsx - Purchase request → BookCourier API: submits request
README.md - Reader → Wishlist: manages books
README.md - Reader → Book reviews: writes review
src/components/ReviewForm.jsx - Book reviews → BookCourier API: posts review
src/components/ReviewForm.jsx - Customer orders → BookCourier API: reads and updates
src/pages/Dashboard/Customer/MyOrders.jsx - Customer orders → Payment return: starts checkout
README.md - Customer orders → BookCourier API: creates checkout
src/pages/Dashboard/Customer/MyOrders.jsx - BookCourier API → Reader: tracks delivery
README.md - Auth provider → Firebase auth: observes auth
src/context/AuthProvider.jsx - Sign in → Firebase auth: authenticates
README.md - Sign up → Firebase auth: registers account
src/pages/SignUp.jsx - Auth access hook → Auth provider: reads context
src/hooks/useAuth.jsx - Role lookup → Auth access hook: gets user
src/hooks/useRole.jsx - Role lookup → Secure HTTP client: queries role
src/hooks/useRole.jsx - Secure HTTP client → BookCourier API: sends authenticated requests
src/hooks/useAxiosSecure.jsx - Inventory management → BookCourier API: manages inventory
README.md - Add book → BookCourier API: adds inventory
README.md - Order processing → BookCourier API: processes orders
README.md - User administration → BookCourier API: manages users
README.md - Role statistics → BookCourier API: loads analytics
README.md