How ngocphu1809/24ct2-holengocphu works
SHOPBOOKS is a Vietnamese book shop with customer storefront, account access, checkout and order tracking, plus separate admin and employee workspaces. The main customer flow is storefront browsing in App, selecting a book, managing the cart, and submitting an order; customer order history is another API-backed view. Admin and employee screens provide catalog, inventory, revenue, and order-management capabilities. The excerpts show frontend component calls and API routes, but not the server implementation or its database wiring, so those backend relationships remain unverified.
Main entry points: App.jsx Storefront · api.js API client · Admin.jsx Admin workspace · main.jsx React entry
Components 17
Storefront
- Storefront
src/App.jsx - Sample books
src/data/books.js - Book details
src/pages/ChiTietSach.jsx
Customer flows
- Shopping cart
src/pages/GioHang.jsx - Checkout
src/pages/DatHang.jsx - Order history
src/pages/DonHang.jsx - Order details
src/pages/ChiTietDonHang.jsx - Registration
src/pages/DangKy.jsx - Sign in
src/pages/DangNhap.jsx
Store operations
- Admin workspace
src/pages/Admin.jsx - Employee workspace
src/pages/NhanVien.jsx
App platform
- API client
src/api.js - HTTP server
server/index.js - Shop database
database/schema.sql - React entry
src/main.jsx - Notifications
src/components/NotificationCenter.jsx
Other components
- Shopper
Connections 21
- Shopper → Storefront: browses
src/App.jsx - Storefront → Sample books: loads defaults
src/App.jsx - Storefront → Book details: renders
src/App.jsx - Storefront → Shopping cart: renders
src/App.jsx - Storefront → Checkout: renders
src/App.jsx - Storefront → Order history: renders
src/App.jsx - Storefront → Registration: renders
src/App.jsx - Storefront → Sign in: renders
src/App.jsx - Storefront → Admin workspace: renders
src/App.jsx - Storefront → Employee workspace: renders
src/App.jsx - Storefront → API client: loads books
src/App.jsx - Admin workspace → API client: manages catalog
src/pages/Admin.jsx - Admin workspace → Sample books: uses defaults
src/pages/Admin.jsx - Employee workspace → API client: requests data
src/pages/NhanVien.jsx - Checkout → API client: creates order
src/pages/DatHang.jsx - Order history → API client: loads orders
src/pages/DonHang.jsx - Registration → API client: registers account
src/pages/DangKy.jsx - Sign in → API client: authenticates
src/pages/DangNhap.jsx - React entry → Storefront: renders
src/main.jsx - React entry → Notifications: renders
src/main.jsx - API client → HTTP server: sends HTTP requests