How mhnuc/nguyenminhquoc-24ct1 works
BookVerse is an online bookstore. Shoppers browse and filter the catalog, add books to a persistent cart, and submit orders; signed-in customers can review order history. Separate administration supports book and order management. Authentication, catalog, and order operations use Supabase when configured and local browser storage for fallback behavior. The README provides no capability details, so the map follows sampled imports and calls; unsampled modal behavior is represented only where the app’s wiring establishes it.
Main entry points: App.jsx Storefront App · bookService.js Book Catalog · AuthContext.jsx Authentication · orderService.js Order Operations
Components 21
Storefront
- Storefront App
src/App.jsx - Navigation
src/components/Navbar.jsx - Book Catalog
src/services/bookService.js - Book Views
src/components/BookDetailModal.jsx - Cart Drawer
src/components/CartDrawer.jsx - About Modal
src/components/AboutModal.jsx - Policy Modal
src/components/PolicyModal.jsx - Contact Modal
src/components/ContactModal.jsx
Identity and State
- Cart State
src/context/CartContext.jsx - Sign-in and Registration
src/components/AuthModal.jsx - Authentication
src/context/AuthContext.jsx
Orders
- Checkout
src/components/CheckoutModal.jsx - Order Operations
src/services/orderService.js - Order History
src/components/OrderHistoryModal.jsx
Administration
- Admin Panel
src/components/AdminPanel.jsx
Data Services
- Supabase Config
src/lib/supabase.js - Supabase
- Mock Book Data
src/services/mockData.js - Browser Storage
- Connection Settings
src/components/SupabaseConfigModal.jsx
Other components
- Shopper
Connections 35
- Shopper → Storefront App: uses
- Storefront App → Book Catalog: fetches books
src/App.jsx - Storefront App → Navigation: renders
src/App.jsx - Storefront App → Book Views: renders
src/App.jsx - Storefront App → Cart Drawer: renders
src/App.jsx - Storefront App → Checkout: renders
src/App.jsx - Storefront App → Sign-in and Registration: renders
src/App.jsx - Storefront App → Order History: renders
src/App.jsx - Storefront App → Admin Panel: renders
src/App.jsx - Storefront App → About Modal: renders
src/App.jsx - Storefront App → Policy Modal: renders
src/App.jsx - Storefront App → Contact Modal: renders
src/App.jsx - Navigation → Authentication: reads session
src/components/Navbar.jsx - Navigation → Cart State: reads count
src/components/Navbar.jsx - Book Views → Cart State: adds books
src/components/BookDetailModal.jsx - Cart Drawer → Cart State: updates cart
src/components/CartDrawer.jsx - Sign-in and Registration → Authentication: delegates login
src/components/AuthModal.jsx - Checkout → Cart State: reads and clears
src/components/CheckoutModal.jsx - Checkout → Authentication: reads user
src/components/CheckoutModal.jsx - Checkout → Order Operations: creates order
src/components/CheckoutModal.jsx - Order History → Order Operations: fetches orders
src/components/OrderHistoryModal.jsx - Admin Panel → Book Catalog: manages books
src/components/AdminPanel.jsx - Admin Panel → Order Operations: manages orders
src/components/AdminPanel.jsx - Authentication → Supabase Config: checks connection
src/context/AuthContext.jsx - Book Catalog → Supabase Config: checks connection
src/services/bookService.js - Order Operations → Supabase Config: checks connection
src/services/orderService.js - Authentication → Supabase: auth and profiles
src/context/AuthContext.jsx - Book Catalog → Supabase: queries books
src/services/bookService.js - Order Operations → Supabase: reads and writes orders
src/services/orderService.js - Book Catalog → Mock Book Data: uses fallback data
src/services/bookService.js - Book Catalog → Browser Storage: stores fallback catalog
src/services/bookService.js - Order Operations → Browser Storage: stores fallback orders
src/services/orderService.js - Cart State → Browser Storage: persists cart
src/context/CartContext.jsx - Authentication → Browser Storage: persists mock user
src/context/AuthContext.jsx - Connection Settings → Supabase Config: updates credentials
src/components/SupabaseConfigModal.jsx