How mohamedosama1907/fresh-cart-e-commerce- works
FreshCart is a consumer e-commerce storefront. Shoppers browse and search products, manage a cart and wishlist, authenticate, place cash-on-delivery orders, and manage their account. The graph separates storefront discovery, identity/account, and purchase flows from shared client state and API access. Some page implementations and feature modules were not sampled; where the index or README does not establish a connection, the graph leaves it out.
Main entry points: apiClient.ts API client · SearchScreen.tsx Product search · CartScreen.tsx Cart management · Navbar.tsx Navigation
Components 21
Storefront discovery
- Home page
src/app/page.tsx - Catalog pages
src/features/shop - Product search
src/features/search/components/SearchScreen.tsx - Product details
src/features/products/components/ProductDetails - Categories
src/features/categories - Brands
src/features/brands/components/brands.screen.tsx - Subcategories
src/features/subcategories
Identity and account
- Authentication
src/features/auth - Profile and addresses
src/features/profile - Customer support
src/features/support
Cart and orders
- Cart management
src/features/cart/components/CartScreen.tsx - Checkout
src/features/checkout/components/CheckoutScreen.tsx - Order placement
src/features/checkout/server/checkout.actions.ts - Order history
src/features/orders - Wishlist
src/features/wishlist/components/whishlist.screen.tsx
Client infrastructure
- Navigation
src/components/layout/Navbar.tsx - Redux auth state
src/store/store.ts - Auth reducer
src/features/auth/slices/auth.slice.ts - API client
src/services/apiClient.ts
Other components
- Shopper
- Commerce API
Connections 26
- Shopper → Home page: visits
- Shopper → Catalog pages: browses
- Shopper → Product search: searches
- Shopper → Product details: views
- Shopper → Cart management: manages
- Shopper → Checkout: checks out
- Shopper → Authentication: signs in
- Shopper → Wishlist: manages
- Shopper → Order history: views
- Shopper → Profile and addresses: manages
- Shopper → Customer support: contacts
- Product search → Brands: loads brands
src/features/search/components/SearchScreen.tsx - Product search → Categories: loads categories
src/features/search/components/SearchScreen.tsx - Product search → Product details: renders cards
src/features/search/components/SearchScreen.tsx - Navigation → Authentication: deletes token
src/components/layout/Navbar.tsx - Navigation → Cart management: loads cart
src/components/layout/Navbar.tsx - Navigation → Wishlist: loads wishlist
src/components/layout/Navbar.tsx - Redux auth state → Auth reducer: registers reducer
src/store/store.ts - Cart management → API client: requests cart actions
- Authentication → API client: uses API client
src/features/auth/server/auth.actions.ts - Wishlist → API client: updates wishlist
- Checkout → Cart management: reads cart
src/features/checkout/components/CheckoutScreen.tsx - Checkout → Order placement: submits order
- Order placement → API client: creates cash order
- Order history → API client: loads order history
src/features/orders/server/orders.actions.ts - API client → Commerce API: sends requests
src/services/apiClient.ts