# gamal-elagamy/t-3-rose-app architecture

> Architecture diagram of the GitHub repository gamal-elagamy/t-3-rose-app, 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/gamal-elagamy/t-3-rose-app
- Repository: https://github.com/gamal-elagamy/t-3-rose-app

## Overview

Rose App is a multilingual e-commerce storefront with customer account, shopping, checkout, and admin capabilities. The principal customer workflow is browsing and searching products, managing a cart, and proceeding through checkout; accounts, addresses, orders, wishlists, and notifications support that experience. Admin pages cover catalog management and statistics. Sampled API routes and feature modules show selected product, category, occasion, cart-product, review, and statistics relationships. Other branches are represented from the file tree; their internal wiring was not sampled.

Main entry points: [`src/features/products/apis/products.api.ts`](https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/products/apis/products.api.ts) (Product data API), [`src/features/products/hooks/products.hook.ts`](https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/products/hooks/products.hook.ts) (Product query hook), [`src/features/products/hooks/use-add-review.ts`](https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/products/hooks/use-add-review.ts) (Review mutation hook), [`src/features/cart/actions/get-cart-products.ts`](https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/cart/actions/get-cart-products.ts) (Cart product lookup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_home["Home discovery"]
  node_product_browse["Product browsing"]
  node_search["Product search<br/>[search-box.tsx]"]
  node_product_hook["Product query hook<br/>[products.hook.ts]"]
  node_review_form["Review submission<br/>[form-review.tsx]"]
  node_review_hook["Review mutation hook<br/>[use-add-review.ts]"]
end

subgraph group_shopping["Shopping"]
  node_cart["Cart management"]
  node_cart_products_action["Cart product lookup"]
  node_checkout["Checkout and payment"]
  node_orders["Order history"]
  node_wishlist["Wishlist"]
end

subgraph group_customer["Customer accounts"]
  node_account["Account settings"]
  node_addresses["Address management"]
  node_auth["Authentication"]
  node_notifications["Notifications"]
end

subgraph group_catalog["Catalog and admin"]
  node_product_api["Product data API<br/>[products.api.ts]"]
  node_categories["Categories<br/>[categories.api.ts]"]
  node_occasions["Occasions<br/>[occasions.api.ts]"]
  node_review_api["Review API client<br/>[add-review.api.ts]"]
  node_admin_catalog["Catalog administration"]
  node_admin_dashboard["Admin dashboard"]
  node_charts_api["Chart data API<br/>[get-charts.api.ts]"]
  node_admin_api["Admin server API"]
end

subgraph group_platform["Application platform"]
  node_product_route["Products route<br/>[route.ts]"]
  node_categories_route["Categories route<br/>[route.ts]"]
  node_occasions_route["Occasions route<br/>[route.ts]"]
  node_cart_products_route["Cart products route<br/>[route.ts]"]
  node_stats_route["Statistics route<br/>[route.ts]"]
  node_locale["Language routing<br/>[routing.ts]"]
  node_theme["Theme provider<br/>[theme.provider.tsx]"]
end

node_shopper(("Shopper"))

node_shopper -->|"browses"| node_home
node_shopper -->|"shops"| node_product_browse
node_search -->|"queries"| node_product_hook
node_product_hook -->|"fetches products"| node_product_api
node_product_route -->|"calls"| node_product_api
node_categories_route -->|"calls"| node_categories
node_occasions_route -->|"calls"| node_occasions
node_cart_products_route -->|"calls"| node_cart_products_action
node_cart_products_action -->|"uses product data"| node_product_api
node_review_form -->|"submits review"| node_review_hook
node_review_hook -->|"calls"| node_review_api
node_stats_route -->|"calls"| node_charts_api
node_charts_api -->|"uses"| node_admin_api

click node_home "https://github.com/gamal-elagamy/t-3-rose-app/tree/testing/src/features/home"
click node_product_browse "https://github.com/gamal-elagamy/t-3-rose-app/tree/testing/src/features/products"
click node_product_api "https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/products/apis/products.api.ts"
click node_product_route "https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/app/api/products/route.ts"
click node_search "https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/shared/components/search-box.tsx"
click node_product_hook "https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/products/hooks/products.hook.ts"
click node_categories "https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/categories/apis/categories.api.ts"
click node_categories_route "https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/app/api/categories/route.ts"
click node_occasions "https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/occasions/apis/occasions.api.ts"
click node_occasions_route "https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/app/api/occasions/route.ts"
click node_cart "https://github.com/gamal-elagamy/t-3-rose-app/tree/testing/src/features/cart"
click node_cart_products_action "https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/cart/actions/get-cart-products.ts"
click node_cart_products_route "https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/app/api/cart-products/route.ts"
click node_checkout "https://github.com/gamal-elagamy/t-3-rose-app/tree/testing/src/features/checkout"
click node_orders "https://github.com/gamal-elagamy/t-3-rose-app/tree/testing/src/features/order"
click node_wishlist "https://github.com/gamal-elagamy/t-3-rose-app/tree/testing/src/features/wish-list"
click node_review_form "https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/products/components/product/product-reviews/form-review.tsx"
click node_review_hook "https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/products/hooks/use-add-review.ts"
click node_review_api "https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/products/apis/add-review.api.ts"
click node_account "https://github.com/gamal-elagamy/t-3-rose-app/tree/testing/src/features/account-settings"
click node_addresses "https://github.com/gamal-elagamy/t-3-rose-app/tree/testing/src/features/address"
click node_auth "https://github.com/gamal-elagamy/t-3-rose-app/tree/testing/src/features/auth"
click node_notifications "https://github.com/gamal-elagamy/t-3-rose-app/tree/testing/src/features/header/components/authenticated-state/notifications"
click node_admin_catalog "https://github.com/gamal-elagamy/t-3-rose-app/tree/testing/src/features/(admin)/cat-occ-pages"
click node_admin_dashboard "https://github.com/gamal-elagamy/t-3-rose-app/tree/testing/src/features/admin"
click node_stats_route "https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/admin/statistics/route.ts"
click node_charts_api "https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/admin/apis/get-charts.api.ts"
click node_admin_api "https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/admin/apis/admin.server.api.ts"
click node_locale "https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/i18n/routing.ts"
click node_theme "https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/shared/providers/theme.provider.tsx"

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_home,node_product_browse,node_search,node_product_hook,node_review_form,node_review_hook toneBlue
class node_cart,node_cart_products_action,node_checkout,node_orders,node_wishlist toneAmber
class node_account,node_addresses,node_auth,node_notifications toneMint
class node_product_api,node_categories,node_occasions,node_review_api,node_admin_catalog,node_admin_dashboard,node_charts_api,node_admin_api toneRose
class node_product_route,node_categories_route,node_occasions_route,node_cart_products_route,node_stats_route,node_locale,node_theme,node_shopper toneIndigo
```

## Components

### Storefront

- [Home discovery](https://github.com/gamal-elagamy/t-3-rose-app/tree/testing/src/features/home): `src/features/home`
- [Product browsing](https://github.com/gamal-elagamy/t-3-rose-app/tree/testing/src/features/products): `src/features/products`
- [Product search](https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/shared/components/search-box.tsx): `src/shared/components/search-box.tsx`
- [Product query hook](https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/products/hooks/products.hook.ts): `src/features/products/hooks/products.hook.ts`
- [Review submission](https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/products/components/product/product-reviews/form-review.tsx): `src/features/products/components/product/product-reviews/form-review.tsx`
- [Review mutation hook](https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/products/hooks/use-add-review.ts): `src/features/products/hooks/use-add-review.ts`

### Shopping

- [Cart management](https://github.com/gamal-elagamy/t-3-rose-app/tree/testing/src/features/cart): `src/features/cart`
- [Cart product lookup](https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/cart/actions/get-cart-products.ts): `src/features/cart/actions/get-cart-products.ts`
- [Checkout and payment](https://github.com/gamal-elagamy/t-3-rose-app/tree/testing/src/features/checkout): `src/features/checkout`
- [Order history](https://github.com/gamal-elagamy/t-3-rose-app/tree/testing/src/features/order): `src/features/order`
- [Wishlist](https://github.com/gamal-elagamy/t-3-rose-app/tree/testing/src/features/wish-list): `src/features/wish-list`

### Customer accounts

- [Account settings](https://github.com/gamal-elagamy/t-3-rose-app/tree/testing/src/features/account-settings): `src/features/account-settings`
- [Address management](https://github.com/gamal-elagamy/t-3-rose-app/tree/testing/src/features/address): `src/features/address`
- [Authentication](https://github.com/gamal-elagamy/t-3-rose-app/tree/testing/src/features/auth): `src/features/auth`
- [Notifications](https://github.com/gamal-elagamy/t-3-rose-app/tree/testing/src/features/header/components/authenticated-state/notifications): `src/features/header/components/authenticated-state/notifications`

### Catalog and admin

- [Product data API](https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/products/apis/products.api.ts): `src/features/products/apis/products.api.ts`
- [Categories](https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/categories/apis/categories.api.ts): `src/features/categories/apis/categories.api.ts`
- [Occasions](https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/occasions/apis/occasions.api.ts): `src/features/occasions/apis/occasions.api.ts`
- [Review API client](https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/products/apis/add-review.api.ts): `src/features/products/apis/add-review.api.ts`
- [Catalog administration](https://github.com/gamal-elagamy/t-3-rose-app/tree/testing/src/features/(admin)/cat-occ-pages): `src/features/(admin)/cat-occ-pages`
- [Admin dashboard](https://github.com/gamal-elagamy/t-3-rose-app/tree/testing/src/features/admin): `src/features/admin`
- [Chart data API](https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/admin/apis/get-charts.api.ts): `src/features/admin/apis/get-charts.api.ts`
- [Admin server API](https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/admin/apis/admin.server.api.ts): `src/features/admin/apis/admin.server.api.ts`

### Application platform

- [Products route](https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/app/api/products/route.ts): `src/app/api/products/route.ts`
- [Categories route](https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/app/api/categories/route.ts): `src/app/api/categories/route.ts`
- [Occasions route](https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/app/api/occasions/route.ts): `src/app/api/occasions/route.ts`
- [Cart products route](https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/app/api/cart-products/route.ts): `src/app/api/cart-products/route.ts`
- [Statistics route](https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/features/admin/statistics/route.ts): `src/features/admin/statistics/route.ts`
- [Language routing](https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/i18n/routing.ts): `src/i18n/routing.ts`
- [Theme provider](https://github.com/gamal-elagamy/t-3-rose-app/blob/testing/src/shared/providers/theme.provider.tsx): `src/shared/providers/theme.provider.tsx`

### Other components

- **Shopper**

## Connections

- Shopper → Home discovery: browses
- Shopper → Product browsing: shops
- Product search → Product query hook: queries (evidence: `src/shared/components/search-box.tsx`)
- Product query hook → Product data API: fetches products (evidence: `src/features/products/hooks/products.hook.ts`)
- Products route → Product data API: calls (evidence: `src/app/api/products/route.ts`)
- Categories route → Categories: calls (evidence: `src/app/api/categories/route.ts`)
- Occasions route → Occasions: calls (evidence: `src/app/api/occasions/route.ts`)
- Cart products route → Cart product lookup: calls (evidence: `src/app/api/cart-products/route.ts`)
- Cart product lookup → Product data API: uses product data (evidence: `src/features/cart/actions/get-cart-products.ts`)
- Review submission → Review mutation hook: submits review (evidence: `src/features/products/components/product/product-reviews/form-review.tsx`)
- Review mutation hook → Review API client: calls (evidence: `src/features/products/hooks/use-add-review.ts`)
- Statistics route → Chart data API: calls (evidence: `src/features/admin/statistics/route.ts`)
- Chart data API → Admin server API: uses (evidence: `src/features/admin/apis/get-charts.api.ts`)
