How rockykj/e-commerce-campus-project works
Trident Fashion is a React storefront: shoppers browse products, inspect details, add items to a persistent cart, and fill out checkout; a separate screen simulates sign-in and account creation. The sampled checkout and authentication code is client-side only: no order, payment, or account service is evidenced. The graph shows routed pages and cart state ownership; UI primitives are grouped as an internal layer. Some page and product relationships are supported only by the SOURCE INDEX rather than full excerpts.
Main entry points: App.tsx App Router · CartContext.tsx Cart State · ProductCard.tsx Product Card · Header.tsx Store Header
Components 16
Storefront
- App Router
src/App.tsx - Store Header
src/components/Header.tsx - Home Page
src/pages/Home.tsx - Product Listing
src/pages/Products.tsx - Product Detail
src/pages/ProductDetail.tsx - Product Card
src/components/ProductCard.tsx
Shopping Flow
- Cart Page
src/pages/Cart.tsx - Cart State
src/contexts/CartContext.tsx - Browser Storage
- Checkout Form
src/pages/Checkout.tsx
Account
- Auth Forms
src/pages/Auth.tsx
UI Layer
- UI Primitives
src/components/ui - Toast State
src/hooks/use-toast.ts - Toast View
src/components/ui/toast.tsx - Class Utilities
src/lib/utils.ts
Other components
- Shopper
Connections 21
- Shopper → App Router: opens storefront
src/App.tsx - App Router → Store Header: renders
src/App.tsx - App Router → Home Page: routes to
src/App.tsx - App Router → Product Listing: routes to
src/App.tsx - App Router → Product Detail: routes to
src/App.tsx - App Router → Cart Page: routes to
src/App.tsx - App Router → Checkout Form: routes to
src/App.tsx - App Router → Auth Forms: routes to
src/App.tsx - Home Page → Product Card: renders
src/pages/Home.tsx - Product Listing → Product Card: renders
src/pages/Products.tsx - Product Card → Cart State: adds item
src/components/ProductCard.tsx - Product Detail → Cart State: uses cart
src/pages/ProductDetail.tsx - Store Header → Cart State: reads count
src/components/Header.tsx - Cart Page → Cart State: manages items
src/pages/Cart.tsx - Checkout Form → Cart State: reads and clears
src/pages/Checkout.tsx - Cart State → Browser Storage: persists cart
src/contexts/CartContext.tsx - Auth Forms → Shopper: simulates sign-in
src/pages/Auth.tsx - App Router → UI Primitives: uses providers
src/App.tsx - App Router → Toast State: mounts toaster
src/App.tsx - Toast State → Toast View: uses toast types
src/hooks/use-toast.ts - UI Primitives → Class Utilities: merges classes
src/components/ui/button.tsx