How kiet0407-eng/24ct2-tranthekiet works
AgriMarket is a React storefront with customer shopping, account, messaging and notification screens, plus an admin area for catalog and order management. The main customer flow is browsing products, viewing details, managing a cart and submitting an order; the sampled code shows product and order requests going to a local API. Shared cart and notification state are provided at app startup. The README is only a Vite template description, so product capabilities are inferred from routes and source. Unsampled pages are included where routes establish their role; their internal behavior is not assumed.
Main entry points: App.jsx Route Application · CartContext.jsx Cart State · ProductDetail.jsx Product Detail · Shop.jsx Shop Catalog
Components 24
Storefront
- Route Application
src/App.jsx - Home
src/pages/Home/Home.jsx - Product Data
src/data.js - Product Detail
src/pages/ProductDetail/ProductDetail.jsx - Shop Catalog
src/pages/Shop/Shop.jsx - Store Header
src/components/Layout/Header.jsx - Informational Pages
src/pages
Shopping and Orders
- Cart
src/pages/Cart/Cart.jsx - Checkout
src/pages/Checkout/Checkout.jsx - Order History
src/pages/Orders/OrderHistory.jsx - Cart State
src/store/CartContext.jsx - User API
Customer Services
- Customer Authentication
src/pages/Auth - Profile
src/pages/User/Profile.jsx - Vendor Messages
src/pages/Messages/Messages.jsx - Notifications
src/pages/Notification/NotificationPage.jsx - Notification State
src/store/NotificationContext.jsx
Administration
- Admin Login
src/pages/Admin/Auth/AdminLogin.jsx - Admin Layout
src/pages/Admin/components/AdminLayout.jsx - Admin Dashboard
src/pages/Admin/Dashboard/Dashboard.jsx - Product Management
src/pages/Admin/Products/AdminProducts.jsx - Category Management
src/pages/Admin/Categories/AdminCategories.jsx - Order Management
src/pages/Admin/Orders/AdminOrders.jsx
Other components
- Shopper
Connections 30
- Shopper → Route Application: opens
src/App.jsx - Route Application → Home: routes to
src/App.jsx - Route Application → Product Detail: routes to
src/App.jsx - Route Application → Shop Catalog: routes to
src/App.jsx - Route Application → Cart: routes to
src/App.jsx - Route Application → Checkout: routes to
src/App.jsx - Route Application → Order History: routes to
src/App.jsx - Route Application → Customer Authentication: routes to
src/App.jsx - Route Application → Profile: routes to
src/App.jsx - Route Application → Vendor Messages: routes to
src/App.jsx - Route Application → Notifications: routes to
src/App.jsx - Route Application → Store Header: renders
src/App.jsx - Route Application → Informational Pages: routes to
src/App.jsx - Home → Cart State: uses
src/pages/Home/Home.jsx - Product Detail → Product Data: reads
src/pages/ProductDetail/ProductDetail.jsx - Product Detail → Cart State: uses
src/pages/ProductDetail/ProductDetail.jsx - Shop Catalog → User API: fetches catalog
src/pages/Shop/Shop.jsx - Shop Catalog → Cart State: uses
src/pages/Shop/Shop.jsx - Cart → Cart State: uses
src/pages/Cart/Cart.jsx - Checkout → Cart State: reads and clears
src/pages/Checkout/Checkout.jsx - Checkout → User API: submits order
src/pages/Checkout/Checkout.jsx - Store Header → Cart State: reads count
src/components/Layout/Header.jsx - Store Header → Notification State: reads notifications
src/components/Layout/Header.jsx - Notifications → Notification State: uses
src/pages/Notification/NotificationPage.jsx - Route Application → Admin Login: routes to
src/App.jsx - Route Application → Admin Layout: routes to
src/App.jsx - Route Application → Admin Dashboard: routes to
src/App.jsx - Route Application → Product Management: routes to
src/App.jsx - Route Application → Category Management: routes to
src/App.jsx - Route Application → Order Management: routes to
src/App.jsx