# abdelrahmansherif207/meem-market-ecommerce architecture

> Architecture diagram of the GitHub repository abdelrahmansherif207/meem-market-ecommerce, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abdelrahmansherif207/meem-market-ecommerce
- Repository: https://github.com/abdelrahmansherif207/meem-market-ecommerce

## Overview

This is a localized Next.js storefront. Shoppers enter through catalog and search pages, discover products, manage a cart, authenticate, complete checkout and payment, then access account features such as orders, addresses, coupons, and reviews. The tree also shows merchandising, delivery-location, notification, and informational-page capabilities. The graph groups those product domains and includes the shared API layer; several feature implementations were not excerpted, so their connections are omitted or marked unverified rather than inferred as definite calls.

Main entry points: [`src/shared/lib/api.ts`](https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/shared/lib/api.ts) (API client), [`src/features/products/components/ProductDetailsPage.tsx`](https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/products/components/ProductDetailsPage.tsx) (Product details), [`src/features/auth/services/authService.ts`](https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/auth/services/authService.ts) (Authentication), [`src/features/cart/hooks/useCartActions.ts`](https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/cart/hooks/useCartActions.ts) (Cart management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront discovery"]
  node_route["Localized routes<br/>[page.tsx]"]
  node_home["Home merchandising<br/>[HomePage.tsx]"]
  node_catalog["Catalog and categories<br/>[page.tsx]"]
  node_search["Product search<br/>[page.tsx]"]
  node_merch["Promotions and brands"]
  node_product["Product details"]
end

subgraph group_shopping["Shopping and checkout"]
  node_cart["Cart management<br/>[useCartActions.ts]"]
  node_checkout["Checkout flow<br/>[CheckoutPage.tsx]"]
  node_payment["Payment results<br/>[PaymentPage.tsx]"]
  node_delivery["Delivery and pickup"]
end

subgraph group_identity["Identity and account"]
  node_orders["Orders and invoices<br/>[OrdersSection.tsx]"]
  node_auth["Authentication<br/>[authService.ts]"]
  node_session[("Session state<br/>[useAuthStore.ts]")]
  node_profile["Profile and addresses<br/>[ProfilePage.tsx]"]
end

subgraph group_engagement["Customer engagement"]
  node_wishlist["Wishlist"]
  node_coupons["Coupons and vouchers"]
  node_reviews["Product and site reviews"]
  node_notifications["Notifications"]
end

subgraph group_platform["Shared platform"]
  node_api["API client<br/>[api.ts]"]
end

node_shopper(("Shopper"))
node_upstream{{"Commerce API"}}

node_shopper -->|"browses"| node_route
node_route -->|"renders"| node_home
node_shopper -.->|"browses"| node_catalog
node_shopper -->|"searches"| node_search
node_catalog -->|"loads category data"| node_api
node_search -.->|"loads search data"| node_api
node_shopper -.->|"views products"| node_product
node_product -->|"adds items"| node_cart
node_product -->|"updates wishlist"| node_wishlist
node_shopper -.->|"browses offers"| node_merch
node_shopper -.->|"manages cart"| node_cart
node_cart -.->|"starts checkout"| node_checkout
node_checkout -.->|"submits payment"| node_payment
node_shopper -.->|"signs in"| node_auth
node_auth -->|"sends auth requests"| node_api
node_auth -.->|"updates session"| node_session
node_session -->|"logs out through"| node_api
node_shopper -.->|"manages account"| node_profile
node_profile -.->|"views orders"| node_orders
node_shopper -.->|"claims offers"| node_coupons
node_shopper -.->|"submits reviews"| node_reviews
node_shopper -.->|"views updates"| node_notifications
node_shopper -.->|"sets delivery"| node_delivery
node_reviews -->|"sends review requests"| node_api
node_api -->|"requests data"| node_upstream

click node_route "https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/app/%5Blocale%5D/page.tsx"
click node_home "https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/home/HomePage.tsx"
click node_catalog "https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/app/%5Blocale%5D/category/%5Bslug%5D/page.tsx"
click node_search "https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/app/%5Blocale%5D/search/page.tsx"
click node_merch "https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/promotions/components/PromotionDetailPage.tsx"
click node_product "https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/products/components/ProductDetailsPage.tsx"
click node_cart "https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/cart/hooks/useCartActions.ts"
click node_checkout "https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/checkout/components/CheckoutPage.tsx"
click node_payment "https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/payment/components/PaymentPage.tsx"
click node_orders "https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/profile/components/OrdersSection.tsx"
click node_auth "https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/auth/services/authService.ts"
click node_session "https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/auth/store/useAuthStore.ts"
click node_profile "https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/profile/components/ProfilePage.tsx"
click node_wishlist "https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/wishlist/hooks/useWishlistActions.ts"
click node_coupons "https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/coupons/components/CouponsVouchersSection.tsx"
click node_reviews "https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/site-reviews/services/siteReviewService.ts"
click node_notifications "https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/notifications/components/NotificationsPage.tsx"
click node_delivery "https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/location/components/DeliveryLocationSidebar.tsx"
click node_api "https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/shared/lib/api.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_route,node_home,node_catalog,node_search,node_merch,node_product toneBlue
class node_cart,node_checkout,node_payment,node_delivery toneAmber
class node_orders,node_auth,node_session,node_profile,node_upstream toneMint
class node_wishlist,node_coupons,node_reviews,node_notifications toneRose
class node_api,node_shopper toneIndigo
```

## Components

### Storefront discovery

- [Localized routes](https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/app/%5Blocale%5D/page.tsx): `src/app/[locale]/page.tsx`
- [Home merchandising](https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/home/HomePage.tsx): `src/features/home/HomePage.tsx`
- [Catalog and categories](https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/app/%5Blocale%5D/category/%5Bslug%5D/page.tsx): `src/app/[locale]/category/[slug]/page.tsx`
- [Product search](https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/app/%5Blocale%5D/search/page.tsx): `src/app/[locale]/search/page.tsx`
- [Promotions and brands](https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/promotions/components/PromotionDetailPage.tsx): `src/features/promotions/components/PromotionDetailPage.tsx`
- [Product details](https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/products/components/ProductDetailsPage.tsx): `src/features/products/components/ProductDetailsPage.tsx`

### Shopping and checkout

- [Cart management](https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/cart/hooks/useCartActions.ts): `src/features/cart/hooks/useCartActions.ts`
- [Checkout flow](https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/checkout/components/CheckoutPage.tsx): `src/features/checkout/components/CheckoutPage.tsx`
- [Payment results](https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/payment/components/PaymentPage.tsx): `src/features/payment/components/PaymentPage.tsx`
- [Delivery and pickup](https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/location/components/DeliveryLocationSidebar.tsx): `src/features/location/components/DeliveryLocationSidebar.tsx`

### Identity and account

- [Orders and invoices](https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/profile/components/OrdersSection.tsx): `src/features/profile/components/OrdersSection.tsx`
- [Authentication](https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/auth/services/authService.ts): `src/features/auth/services/authService.ts`
- [Session state](https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/auth/store/useAuthStore.ts): `src/features/auth/store/useAuthStore.ts`
- [Profile and addresses](https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/profile/components/ProfilePage.tsx): `src/features/profile/components/ProfilePage.tsx`

### Customer engagement

- [Wishlist](https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/wishlist/hooks/useWishlistActions.ts): `src/features/wishlist/hooks/useWishlistActions.ts`
- [Coupons and vouchers](https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/coupons/components/CouponsVouchersSection.tsx): `src/features/coupons/components/CouponsVouchersSection.tsx`
- [Product and site reviews](https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/site-reviews/services/siteReviewService.ts): `src/features/site-reviews/services/siteReviewService.ts`
- [Notifications](https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/features/notifications/components/NotificationsPage.tsx): `src/features/notifications/components/NotificationsPage.tsx`

### Shared platform

- [API client](https://github.com/abdelrahmansherif207/meem-market-ecommerce/blob/main/src/shared/lib/api.ts): `src/shared/lib/api.ts`

### Other components

- **Shopper**
- **Commerce API**

## Connections

- Shopper → Localized routes: browses
- Localized routes → Home merchandising: renders (evidence: `src/app/[locale]/page.tsx`)
- Shopper → Catalog and categories: browses
- Shopper → Product search: searches (evidence: `src/app/[locale]/search/page.tsx`)
- Catalog and categories → API client: loads category data (evidence: `src/app/[locale]/category/[slug]/page.tsx`)
- Product search → API client: loads search data
- Shopper → Product details: views products
- Product details → Cart management: adds items
- Product details → Wishlist: updates wishlist
- Shopper → Promotions and brands: browses offers
- Shopper → Cart management: manages cart
- Cart management → Checkout flow: starts checkout
- Checkout flow → Payment results: submits payment
- Shopper → Authentication: signs in
- Authentication → API client: sends auth requests (evidence: `src/features/auth/services/authService.ts`)
- Authentication → Session state: updates session
- Session state → API client: logs out through (evidence: `src/features/auth/store/useAuthStore.ts`)
- Shopper → Profile and addresses: manages account
- Profile and addresses → Orders and invoices: views orders
- Shopper → Coupons and vouchers: claims offers
- Shopper → Product and site reviews: submits reviews
- Shopper → Notifications: views updates
- Shopper → Delivery and pickup: sets delivery
- Product and site reviews → API client: sends review requests (evidence: `src/features/site-reviews/services/siteReviewService.ts`)
- API client → Commerce API: requests data (evidence: `src/shared/lib/api.ts`)
