# mohamedkhalifa19/nassar-fragrances architecture

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

- Interactive diagram: https://gitdiagram.com/mohamedkhalifa19/nassar-fragrances
- Repository: https://github.com/mohamedkhalifa19/nassar-fragrances

## Overview

Nassar Ruddy Perfumes is an Arabic-first perfume marketplace with public product discovery and a management dashboard. The customer path is browsing or searching the catalog, refining results, and viewing product or offer details; cart state is represented in the app store. Administrators sign in and manage perfume, offer, and news content. The graph preserves these documented capabilities, but several implementations are unsampled, so their links are shown as unverified rather than asserted as source-confirmed calls.

Main entry points: [`app/libs/prisma.ts`](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/libs/prisma.ts) (PostgreSQL database), [`app/data/index.ts`](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/data/index.ts) (Cached content access), [`app/actions/product.actions.ts`](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/actions/product.actions.ts) (Product actions), [`app/(public)/perfumes/page.tsx`](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(public)/perfumes/page.tsx) (Perfume catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Public storefront"]
  node_public_pages["Store pages<br/>[page.tsx]"]
  node_catalog_route["Perfume catalog<br/>[page.tsx]"]
  node_catalog_ui["Catalog search<br/>[PerfumesClient.tsx]"]
  node_filter_ui["Catalog filters"]
  node_perfume_cards["Perfume listing<br/>[Perfumes.tsx]"]
  node_offer_pages["Offer pages<br/>[page.tsx]"]
  node_offer_detail["Offer details<br/>[page.tsx]"]
  node_news_pages["News pages<br/>[page.tsx]"]
  node_cart_state["Cart state<br/>[cart.ts]"]
end

subgraph group_admin["Admin management"]
  node_login["Admin sign-in<br/>[page.tsx]"]
  node_perfume_admin["Perfume management<br/>[page.tsx]"]
  node_offer_admin["Offer management<br/>[page.tsx]"]
  node_news_admin["News management<br/>[page.tsx]"]
  node_perfume_table["Perfume table<br/>[PerfumesTable.tsx]"]
  node_offer_table["Offer table<br/>[OffersTable.tsx]"]
  node_news_table["News table<br/>[NewsTable.tsx]"]
end

subgraph group_content["Content services"]
  node_admin_actions["Admin actions<br/>[admin.actions.ts]"]
  node_product_actions["Product actions<br/>[product.actions.ts]"]
  node_offer_actions["Offer actions<br/>[offer.actions.ts]"]
  node_news_actions["News actions<br/>[news.actions.ts]"]
  node_data_access["Cached content access<br/>[index.ts]"]
end

subgraph group_platform["Shared platform"]
  node_database[("PostgreSQL database<br/>[prisma.ts]")]
  node_image_cleanup["Image cleanup<br/>[delete-image.ts]"]
  node_shared_types["Domain types<br/>[types.ts]"]
end

node_customer(("Customer"))
node_admin_user(("Administrator"))

node_customer -.->|"browses"| node_public_pages
node_customer -.->|"searches"| node_catalog_route
node_catalog_route -->|"renders"| node_catalog_ui
node_catalog_route -->|"queries"| node_database
node_catalog_ui -->|"opens filters"| node_filter_ui
node_catalog_ui -->|"renders results"| node_perfume_cards
node_customer -.->|"views offers"| node_offer_pages
node_offer_pages -->|"queries"| node_database
node_customer -.->|"opens offer"| node_offer_detail
node_offer_detail -->|"queries"| node_database
node_customer -.->|"reads news"| node_news_pages
node_customer -.->|"updates cart"| node_cart_state
node_admin_user -.->|"signs in"| node_login
node_login -->|"calls login"| node_admin_actions
node_admin_user -.->|"manages catalog"| node_perfume_admin
node_perfume_admin -->|"loads records"| node_database
node_perfume_admin -->|"renders"| node_perfume_table
node_admin_user -.->|"manages offers"| node_offer_admin
node_offer_admin -->|"loads records"| node_database
node_offer_admin -->|"renders"| node_offer_table
node_admin_user -.->|"manages news"| node_news_admin
node_news_admin -->|"loads records"| node_database
node_news_admin -->|"renders"| node_news_table
node_offer_table -.->|"edits offers"| node_data_access
node_perfume_table -.->|"edits products"| node_product_actions
node_news_table -.->|"edits news"| node_news_actions
node_data_access -->|"fetches products"| node_product_actions
node_data_access -->|"fetches offers"| node_offer_actions
node_data_access -->|"fetches news"| node_news_actions
node_product_actions -->|"uses Prisma"| node_database
node_offer_actions -->|"uses Prisma"| node_database
node_product_actions -->|"cleans images"| node_image_cleanup
node_offer_actions -->|"cleans images"| node_image_cleanup

click node_public_pages "https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(public)/page.tsx"
click node_catalog_route "https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(public)/perfumes/page.tsx"
click node_catalog_ui "https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/components/PerfumesClient.tsx"
click node_filter_ui "https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/components/FilterationSidebar.tsx"
click node_perfume_cards "https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(dashboard)/components/Perfumes.tsx"
click node_offer_pages "https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(public)/offers/page.tsx"
click node_offer_detail "https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(public)/offers/%5Bid%5D/page.tsx"
click node_news_pages "https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(public)/news/page.tsx"
click node_cart_state "https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/store/features/cart/cart.ts"
click node_login "https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(auth)/auth/login/page.tsx"
click node_perfume_admin "https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(dashboard)/dashboard/perfumes/page.tsx"
click node_offer_admin "https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(dashboard)/dashboard/offers/page.tsx"
click node_news_admin "https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(dashboard)/dashboard/news/page.tsx"
click node_perfume_table "https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(dashboard)/components/PerfumesTable.tsx"
click node_offer_table "https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(dashboard)/components/OffersTable.tsx"
click node_news_table "https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(dashboard)/components/NewsTable.tsx"
click node_admin_actions "https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/actions/admin.actions.ts"
click node_product_actions "https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/actions/product.actions.ts"
click node_offer_actions "https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/actions/offer.actions.ts"
click node_news_actions "https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/actions/news.actions.ts"
click node_data_access "https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/data/index.ts"
click node_database "https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/libs/prisma.ts"
click node_image_cleanup "https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/utils/delete-image.ts"
click node_shared_types "https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/libs/types.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_public_pages,node_catalog_route,node_catalog_ui,node_filter_ui,node_perfume_cards,node_offer_pages,node_offer_detail,node_news_pages,node_cart_state toneBlue
class node_login,node_perfume_admin,node_offer_admin,node_news_admin,node_perfume_table,node_offer_table,node_news_table toneAmber
class node_admin_actions,node_product_actions,node_offer_actions,node_news_actions,node_data_access toneMint
class node_database,node_image_cleanup,node_shared_types toneRose
class node_customer,node_admin_user toneIndigo
```

## Components

### Public storefront

- [Store pages](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(public)/page.tsx): `app/(public)/page.tsx`
- [Perfume catalog](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(public)/perfumes/page.tsx): `app/(public)/perfumes/page.tsx`
- [Catalog search](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/components/PerfumesClient.tsx): `app/components/PerfumesClient.tsx`
- [Catalog filters](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/components/FilterationSidebar.tsx): `app/components/FilterationSidebar.tsx`
- [Perfume listing](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(dashboard)/components/Perfumes.tsx): `app/(dashboard)/components/Perfumes.tsx`
- [Offer pages](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(public)/offers/page.tsx): `app/(public)/offers/page.tsx`
- [Offer details](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(public)/offers/%5Bid%5D/page.tsx): `app/(public)/offers/[id]/page.tsx`
- [News pages](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(public)/news/page.tsx): `app/(public)/news/page.tsx`
- [Cart state](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/store/features/cart/cart.ts): `app/store/features/cart/cart.ts`

### Admin management

- [Admin sign-in](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(auth)/auth/login/page.tsx): `app/(auth)/auth/login/page.tsx`
- [Perfume management](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(dashboard)/dashboard/perfumes/page.tsx): `app/(dashboard)/dashboard/perfumes/page.tsx`
- [Offer management](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(dashboard)/dashboard/offers/page.tsx): `app/(dashboard)/dashboard/offers/page.tsx`
- [News management](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(dashboard)/dashboard/news/page.tsx): `app/(dashboard)/dashboard/news/page.tsx`
- [Perfume table](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(dashboard)/components/PerfumesTable.tsx): `app/(dashboard)/components/PerfumesTable.tsx`
- [Offer table](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(dashboard)/components/OffersTable.tsx): `app/(dashboard)/components/OffersTable.tsx`
- [News table](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/(dashboard)/components/NewsTable.tsx): `app/(dashboard)/components/NewsTable.tsx`

### Content services

- [Admin actions](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/actions/admin.actions.ts): `app/actions/admin.actions.ts`
- [Product actions](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/actions/product.actions.ts): `app/actions/product.actions.ts`
- [Offer actions](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/actions/offer.actions.ts): `app/actions/offer.actions.ts`
- [News actions](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/actions/news.actions.ts): `app/actions/news.actions.ts`
- [Cached content access](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/data/index.ts): `app/data/index.ts`

### Shared platform

- [PostgreSQL database](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/libs/prisma.ts): `app/libs/prisma.ts`
- [Image cleanup](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/utils/delete-image.ts): `app/utils/delete-image.ts`
- [Domain types](https://github.com/mohamedkhalifa19/nassar-fragrances/blob/master/app/libs/types.ts): `app/libs/types.ts`

### Other components

- **Customer**
- **Administrator**

## Connections

- Customer → Store pages: browses
- Customer → Perfume catalog: searches
- Perfume catalog → Catalog search: renders (evidence: `app/(public)/perfumes/page.tsx`)
- Perfume catalog → PostgreSQL database: queries (evidence: `app/(public)/perfumes/page.tsx`)
- Catalog search → Catalog filters: opens filters (evidence: `app/components/PerfumesClient.tsx`)
- Catalog search → Perfume listing: renders results (evidence: `app/components/PerfumesClient.tsx`)
- Customer → Offer pages: views offers
- Offer pages → PostgreSQL database: queries (evidence: `app/(public)/offers/page.tsx`)
- Customer → Offer details: opens offer
- Offer details → PostgreSQL database: queries (evidence: `app/(public)/offers/[id]/page.tsx`)
- Customer → News pages: reads news
- Customer → Cart state: updates cart
- Administrator → Admin sign-in: signs in
- Admin sign-in → Admin actions: calls login (evidence: `app/(auth)/auth/login/page.tsx`)
- Administrator → Perfume management: manages catalog
- Perfume management → PostgreSQL database: loads records (evidence: `app/(dashboard)/dashboard/perfumes/page.tsx`)
- Perfume management → Perfume table: renders (evidence: `app/(dashboard)/dashboard/perfumes/page.tsx`)
- Administrator → Offer management: manages offers
- Offer management → PostgreSQL database: loads records (evidence: `app/(dashboard)/dashboard/offers/page.tsx`)
- Offer management → Offer table: renders (evidence: `app/(dashboard)/dashboard/offers/page.tsx`)
- Administrator → News management: manages news
- News management → PostgreSQL database: loads records (evidence: `app/(dashboard)/dashboard/news/page.tsx`)
- News management → News table: renders (evidence: `app/(dashboard)/dashboard/news/page.tsx`)
- Offer table → Cached content access: edits offers
- Perfume table → Product actions: edits products
- News table → News actions: edits news
- Cached content access → Product actions: fetches products (evidence: `app/data/index.ts`)
- Cached content access → Offer actions: fetches offers (evidence: `app/data/index.ts`)
- Cached content access → News actions: fetches news (evidence: `app/data/index.ts`)
- Product actions → PostgreSQL database: uses Prisma (evidence: `app/actions/product.actions.ts`)
- Offer actions → PostgreSQL database: uses Prisma (evidence: `app/actions/offer.actions.ts`)
- Product actions → Image cleanup: cleans images (evidence: `app/actions/product.actions.ts`)
- Offer actions → Image cleanup: cleans images (evidence: `app/actions/offer.actions.ts`)
