How chinnamnaidu592/nexcart_e-commerce works
NexCart is a Next.js storefront with customer accounts, persistent shopping state, checkout, and an admin console. The main customer journey is catalog discovery → product selection → cart → checkout and order history; separate branches cover authentication, wishlist, and admin operations. The graph combines sampled service/context behavior with README-documented product capabilities. Some page-to-component wiring and unsampled subsystems are documented only at a feature level, so those links are dashed where implementation calls were not shown.
Main entry points: orderService.js Order service · userService.js User service · productService.js Product service · CartContext.jsx Cart state
Components 24
Storefront & Catalog
- Home & collections
src/app/page.jsx - Product discovery
src/app/products/page.jsx - Product details
src/app/products/[id]/page.jsx - Product card
src/components/products/ProductCard.jsx
Accounts & Purchasing
- Shopping cart
src/app/cart/page.jsx - Saved wishlist
src/app/wishlist/page.jsx - Checkout
src/app/checkout/page.jsx - Profile & history
src/app/profile/page.jsx
Admin Console
- Executive dashboard
src/app/admin/page.jsx - Product management
src/app/admin/products/page.jsx - Order management
src/app/admin/orders/page.jsx - Customer management
src/app/admin/customers/page.jsx - Sales analytics
src/services/analyticsService.js
Application Services
- Catalog hook
src/hooks/useProducts.js - Product service
src/services/productService.js - Cart state
src/context/CartContext.jsx - Browser storage
src/utils/storage.js - Authentication state
src/context/AuthContext.jsx - User service
src/services/userService.js - Auth route
src/app/api/auth/[action]/route.js - Order service
src/services/orderService.js - API client
src/services/apiClient.js
Other components
- Shopper
- DummyJSON API
Connections 26
- Shopper → Home & collections: browses
README.md - Shopper → Product discovery: searches & filters
README.md - Product discovery → Catalog hook: loads catalog
- Catalog hook → Product service: fetches products
src/hooks/useProducts.js - Product service → API client: requests data
src/services/productService.js - API client → DummyJSON API: calls
- Shopper → Product details: selects product
README.md - Product details → Cart state: adds item
- Product card → Cart state: adds item
src/components/products/ProductCard.jsx - Product card → Saved wishlist: bookmarks item
- Shopper → Shopping cart: reviews cart
README.md - Cart state → Browser storage: persists cart
src/context/CartContext.jsx - Shopper → Authentication state: signs in or registers
README.md - Authentication state → User service: authenticates
src/context/AuthContext.jsx - User service → Browser storage: stores session
src/services/userService.js - User service → Auth route: posts credentials
src/services/userService.js - Shopper → Checkout: places order
README.md - Checkout → Order service: submits order
src/app/checkout/page.jsx - Order service → Browser storage: stores orders
src/services/orderService.js - Profile & history → Order service: loads history
src/app/profile/page.jsx - Shopper → Profile & history: views account
README.md - Executive dashboard → Sales analytics: loads metrics
- Executive dashboard → Order service: shows recent orders
- Product management → Product service: manages catalog
README.md - Order management → Order service: updates status
README.md - Customer management → User service: loads customers
README.md