How abdelrahmanrefaat20/techmart works
TechMart is a Next.js storefront backed by the Route Ecommerce API. The main journey is browsing the catalog, managing a cart and wishlist, signing in, checking out, and reviewing orders; account recovery and product reviews are additional capabilities. The source index and excerpts substantiate shared services, state, authentication, wishlist, and review links. Page-level implementations not sampled are represented by their exact tree paths or enclosing directories, and those links rely on README documentation rather than inspected page code.
Main entry points: apiServices.ts API services · cartSlice.ts Cart state · GetReview.tsx Product reviews · CreateReview.tsx Review mutations
Components 28
Storefront and discovery
- Home discovery
src/app/page.tsx - Product catalog
src/app/(pages)/products - Product details
src/app/(pages)/products/[productId]/page.tsx - Category browsing
src/app/(pages)/categories - Brand browsing
src/app/(pages)/brands - Product presentation
src/components/layout/Product
Accounts and identity
- Sign in
src/app/(pages)/auth/signin/page.tsx - Registration
src/app/(pages)/auth/signup/page.tsx - Credentials sessions
src/lib/authOptions.ts - NextAuth route
src/app/api/auth/[...nextauth]/route.ts - Account management
src/app/(pages)/profile/page.tsx - Password recovery
src/app/(pages)/auth
Cart and orders
- Cart management
src/components/cart/CartContents.tsx - Cart state
src/redux/slices/cartSlice.ts - Cart synchronization
src/contexts/CartSync.tsx - Checkout
src/app/(pages)/checkout/[cartId]/page.tsx - Order history
src/app/(pages)/allorders/page.tsx
Wishlist and reviews
- Wishlist
src/contexts/WishlistContext.tsx - Product reviews
src/components/Review/GetReview.tsx - Review mutations
src/components/Review/CreateReview.tsx
Shared runtime
- App providers
src/providers/MainProvider.tsx - Redux store
src/redux/store.ts - API services
src/services/apiServices.ts - Session token hook
src/hooks/useAuthToken.ts - Product and order types
src/interfaces/product.ts - Review types
src/interfaces/review.ts
Other components
- Shopper
- Route Ecommerce API
Connections 38
- Shopper → Home discovery: browses
README.md - Shopper → Product catalog: browses
README.md - Shopper → Category browsing: filters by category
README.md - Shopper → Brand browsing: filters by brand
README.md - Shopper → Product details: views details
README.md - Home discovery → API services: loads products
src/app/page.tsx - Category browsing → API services: loads categories
src/app/(pages)/categories/page.tsx - Brand browsing → API services: loads brands
src/app/(pages)/brands/page.tsx - Product details → Product reviews: shows reviews
- Shopper → Sign in: signs in
README.md - Shopper → Registration: registers
README.md - Sign in → NextAuth route: submits credentials
src/app/api/auth/[...nextauth]/route.ts - NextAuth route → Credentials sessions: uses options
src/app/api/auth/[...nextauth]/route.ts - Credentials sessions → API services: authenticates via
src/lib/authOptions.ts - Registration → API services: registers account
src/app/(pages)/auth/signup/page.tsx - Shopper → Account management: manages account
README.md - Shopper → Password recovery: recovers access
README.md - Shopper → Cart management: manages cart
README.md - Cart management → Cart state: updates state
src/components/cart/CartContents.tsx - Cart state → API services: fetches cart
src/redux/slices/cartSlice.ts - Cart synchronization → Cart state: synchronizes count
src/contexts/CartSync.tsx - Shopper → Checkout: submits shipping
README.md - Checkout → API services: places order
src/app/(pages)/checkout/[cartId]/page.tsx - Shopper → Order history: views history
README.md - Order history → API services: loads orders
src/app/(pages)/allorders/page.tsx - Shopper → Wishlist: saves products
README.md - Wishlist → API services: reads and updates
src/contexts/WishlistContext.tsx - Product reviews → Review mutations: renders forms
src/components/Review/GetReview.tsx - Review mutations → API services: submits review
src/components/Review/CreateReview.tsx - App providers → Wishlist: provides context
src/providers/MainProvider.tsx - App providers → Redux store: provides store
src/providers/MainProvider.tsx - Redux store → Cart state: registers reducer
src/redux/store.ts - Product reviews → Session token hook: checks session
src/components/Review/GetReview.tsx - Review mutations → Session token hook: checks session
src/components/Review/CreateReview.tsx - API services → Route Ecommerce API: sends requests
src/services/apiServices.ts - Product and order types → API services: types responses
src/services/apiServices.ts - Review types → API services: types reviews
src/services/apiServices.ts - Product catalog → Product presentation: presents products