# mohammed-23-ham/mido-store architecture

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

- Interactive diagram: https://gitdiagram.com/mohammed-23-ham/mido-store
- Repository: https://github.com/mohammed-23-ham/mido-store

## Overview

Mido Store is a storefront for a fictional skincare product. Visitors browse the home and shop pages, add items to a persistent cart, review the cart, and reach a demo checkout that explicitly does not process payments or place orders. Currency selection and rate refresh support localized pricing; FAQ, story, and contact pages provide supporting store content. The README documents EmailJS for contact messages, but the contact implementation was not shown, so that integration is represented as optional. Some UI component relationships are omitted where source evidence was unavailable.

Main entry points: [`components/providers/currency-provider.tsx`](https://github.com/mohammed-23-ham/mido-store/blob/main/components/providers/currency-provider.tsx) (Currency provider), [`components/Header.tsx`](https://github.com/mohammed-23-ham/mido-store/blob/main/components/Header.tsx) (Navigation header), [`app/(main)/page.tsx`](https://github.com/mohammed-23-ham/mido-store/blob/main/app/(main)/page.tsx) (Home product page), [`components/CartDrawer.tsx`](https://github.com/mohammed-23-ham/mido-store/blob/main/components/CartDrawer.tsx) (Cart drawer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_home["Home product page<br/>[page.tsx]"]
  node_shop["Product shop<br/>[page.tsx]"]
  node_header["Navigation header<br/>[Header.tsx]"]
  node_marquee["Announcement marquee<br/>[marquee-05.tsx]"]
  node_marquee_animation["Marquee animation<br/>[marquee.tsx]"]
end

subgraph group_cart_checkout["Cart &amp; Checkout"]
  node_cart_drawer["Cart drawer<br/>[CartDrawer.tsx]"]
  node_cart_store[("Persistent cart state<br/>[cart-store.ts]")]
  node_checkout["Checkout page<br/>[page.tsx]"]
  node_demo_dialog["Demo purchase dialog"]
end

subgraph group_currency["Currency"]
  node_price["Price display<br/>[price.tsx]"]
  node_currency_provider["Currency provider"]
  node_currency_config["Currency definitions<br/>[config.ts]"]
  node_currency_format["Currency formatting<br/>[format.ts]"]
  node_rates["Rate retrieval<br/>[rates.ts]"]
  node_rates_api["Rates API route<br/>[route.ts]"]
  node_rate_service["Exchange-rate service"]
end

subgraph group_content_contact["Content &amp; Contact"]
  node_faq["FAQ page<br/>[page.tsx]"]
  node_faq_accordion["FAQ accordion<br/>[accordion-07.tsx]"]
  node_story["Brand story page<br/>[page.tsx]"]
  node_contact["Contact page<br/>[page.tsx]"]
  node_emailjs["EmailJS service"]
end

subgraph group_shared_ui["Shared UI"]
  node_ui_dialog["Dialog primitives<br/>[dialog.tsx]"]
  node_ui_accordion["Accordion primitives<br/>[accordion.tsx]"]
  node_ui_button["Button primitive<br/>[button.tsx]"]
  node_ui_dropdown["Dropdown primitives<br/>[dropdown-menu.tsx]"]
  node_ui_select["Select primitives<br/>[select.tsx]"]
  node_ui_sheet["Sheet primitives<br/>[sheet.tsx]"]
end

node_visitor(("Store visitor"))

node_visitor -->|"browses"| node_home
node_visitor -->|"browses"| node_shop
node_home -->|"links to"| node_shop
node_shop -->|"adds items"| node_cart_store
node_home -->|"uses cart"| node_cart_store
node_header -->|"renders"| node_cart_drawer
node_cart_drawer -->|"reads and updates"| node_cart_store
node_cart_drawer -->|"links to"| node_checkout
node_checkout -->|"reads cart"| node_cart_store
node_checkout -->|"opens demo"| node_demo_dialog
node_demo_dialog -->|"uses primitives"| node_ui_dialog
node_home -->|"displays price"| node_price
node_shop -->|"displays price"| node_price
node_header -->|"sets currency"| node_currency_provider
node_price -->|"formats amount"| node_currency_provider
node_checkout -->|"formats totals"| node_currency_provider
node_currency_provider -->|"uses definitions"| node_currency_config
node_currency_provider -->|"formats and converts"| node_currency_format
node_currency_provider -->|"fetches rates"| node_rates_api
node_rates_api -->|"gets rates"| node_rates
node_rates -->|"uses fallback data"| node_currency_config
node_rates -->|"requests rates"| node_rate_service
node_faq -->|"renders"| node_faq_accordion
node_faq_accordion -->|"uses primitives"| node_ui_accordion
node_faq_accordion -->|"formats threshold"| node_currency_provider
node_header -->|"renders"| node_marquee
node_marquee -->|"uses animation"| node_marquee_animation
node_contact -.->|"sends messages"| node_emailjs
node_cart_drawer -->|"uses primitives"| node_ui_sheet
node_header -->|"uses primitives"| node_ui_select
node_header -->|"uses primitives"| node_ui_dropdown

click node_home "https://github.com/mohammed-23-ham/mido-store/blob/main/app/(main)/page.tsx"
click node_shop "https://github.com/mohammed-23-ham/mido-store/blob/main/app/(main)/shop/page.tsx"
click node_header "https://github.com/mohammed-23-ham/mido-store/blob/main/components/Header.tsx"
click node_cart_drawer "https://github.com/mohammed-23-ham/mido-store/blob/main/components/CartDrawer.tsx"
click node_cart_store "https://github.com/mohammed-23-ham/mido-store/blob/main/lib/cart-store.ts"
click node_checkout "https://github.com/mohammed-23-ham/mido-store/blob/main/app/(main)/checkout/page.tsx"
click node_demo_dialog "https://github.com/mohammed-23-ham/mido-store/blob/main/components/demo-purchase-dialog.tsx"
click node_price "https://github.com/mohammed-23-ham/mido-store/blob/main/components/price.tsx"
click node_currency_provider "https://github.com/mohammed-23-ham/mido-store/blob/main/components/providers/currency-provider.tsx"
click node_currency_config "https://github.com/mohammed-23-ham/mido-store/blob/main/lib/currency/config.ts"
click node_currency_format "https://github.com/mohammed-23-ham/mido-store/blob/main/lib/currency/format.ts"
click node_rates "https://github.com/mohammed-23-ham/mido-store/blob/main/lib/currency/rates.ts"
click node_rates_api "https://github.com/mohammed-23-ham/mido-store/blob/main/app/api/rates/route.ts"
click node_faq "https://github.com/mohammed-23-ham/mido-store/blob/main/app/(main)/faq/page.tsx"
click node_faq_accordion "https://github.com/mohammed-23-ham/mido-store/blob/main/components/shadcn-space/accordion/accordion-07.tsx"
click node_story "https://github.com/mohammed-23-ham/mido-store/blob/main/app/(main)/story/page.tsx"
click node_contact "https://github.com/mohammed-23-ham/mido-store/blob/main/app/(main)/contact/page.tsx"
click node_marquee "https://github.com/mohammed-23-ham/mido-store/blob/main/components/shadcn-space/marquee/marquee-05.tsx"
click node_marquee_animation "https://github.com/mohammed-23-ham/mido-store/blob/main/components/shadcn-space/animations/marquee.tsx"
click node_ui_dialog "https://github.com/mohammed-23-ham/mido-store/blob/main/components/ui/dialog.tsx"
click node_ui_accordion "https://github.com/mohammed-23-ham/mido-store/blob/main/components/ui/accordion.tsx"
click node_ui_button "https://github.com/mohammed-23-ham/mido-store/blob/main/components/ui/button.tsx"
click node_ui_dropdown "https://github.com/mohammed-23-ham/mido-store/blob/main/components/ui/dropdown-menu.tsx"
click node_ui_select "https://github.com/mohammed-23-ham/mido-store/blob/main/components/ui/select.tsx"
click node_ui_sheet "https://github.com/mohammed-23-ham/mido-store/blob/main/components/ui/sheet.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_shop,node_header,node_marquee,node_marquee_animation toneBlue
class node_cart_drawer,node_cart_store,node_checkout,node_demo_dialog toneAmber
class node_price,node_currency_provider,node_currency_config,node_currency_format,node_rates,node_rates_api,node_rate_service toneMint
class node_faq,node_faq_accordion,node_story,node_contact,node_emailjs toneRose
class node_ui_dialog,node_ui_accordion,node_ui_button,node_ui_dropdown,node_ui_select,node_ui_sheet,node_visitor toneIndigo
```

## Components

### Storefront

- [Home product page](https://github.com/mohammed-23-ham/mido-store/blob/main/app/(main)/page.tsx): `app/(main)/page.tsx`
- [Product shop](https://github.com/mohammed-23-ham/mido-store/blob/main/app/(main)/shop/page.tsx): `app/(main)/shop/page.tsx`
- [Navigation header](https://github.com/mohammed-23-ham/mido-store/blob/main/components/Header.tsx): `components/Header.tsx`
- [Announcement marquee](https://github.com/mohammed-23-ham/mido-store/blob/main/components/shadcn-space/marquee/marquee-05.tsx): `components/shadcn-space/marquee/marquee-05.tsx`
- [Marquee animation](https://github.com/mohammed-23-ham/mido-store/blob/main/components/shadcn-space/animations/marquee.tsx): `components/shadcn-space/animations/marquee.tsx`

### Cart & Checkout

- [Cart drawer](https://github.com/mohammed-23-ham/mido-store/blob/main/components/CartDrawer.tsx): `components/CartDrawer.tsx`
- [Persistent cart state](https://github.com/mohammed-23-ham/mido-store/blob/main/lib/cart-store.ts): `lib/cart-store.ts`
- [Checkout page](https://github.com/mohammed-23-ham/mido-store/blob/main/app/(main)/checkout/page.tsx): `app/(main)/checkout/page.tsx`
- [Demo purchase dialog](https://github.com/mohammed-23-ham/mido-store/blob/main/components/demo-purchase-dialog.tsx): `components/demo-purchase-dialog.tsx`

### Currency

- [Price display](https://github.com/mohammed-23-ham/mido-store/blob/main/components/price.tsx): `components/price.tsx`
- [Currency provider](https://github.com/mohammed-23-ham/mido-store/blob/main/components/providers/currency-provider.tsx): `components/providers/currency-provider.tsx`
- [Currency definitions](https://github.com/mohammed-23-ham/mido-store/blob/main/lib/currency/config.ts): `lib/currency/config.ts`
- [Currency formatting](https://github.com/mohammed-23-ham/mido-store/blob/main/lib/currency/format.ts): `lib/currency/format.ts`
- [Rate retrieval](https://github.com/mohammed-23-ham/mido-store/blob/main/lib/currency/rates.ts): `lib/currency/rates.ts`
- [Rates API route](https://github.com/mohammed-23-ham/mido-store/blob/main/app/api/rates/route.ts): `app/api/rates/route.ts`
- **Exchange-rate service**

### Content & Contact

- [FAQ page](https://github.com/mohammed-23-ham/mido-store/blob/main/app/(main)/faq/page.tsx): `app/(main)/faq/page.tsx`
- [FAQ accordion](https://github.com/mohammed-23-ham/mido-store/blob/main/components/shadcn-space/accordion/accordion-07.tsx): `components/shadcn-space/accordion/accordion-07.tsx`
- [Brand story page](https://github.com/mohammed-23-ham/mido-store/blob/main/app/(main)/story/page.tsx): `app/(main)/story/page.tsx`
- [Contact page](https://github.com/mohammed-23-ham/mido-store/blob/main/app/(main)/contact/page.tsx): `app/(main)/contact/page.tsx`
- **EmailJS service**

### Shared UI

- [Dialog primitives](https://github.com/mohammed-23-ham/mido-store/blob/main/components/ui/dialog.tsx): `components/ui/dialog.tsx`
- [Accordion primitives](https://github.com/mohammed-23-ham/mido-store/blob/main/components/ui/accordion.tsx): `components/ui/accordion.tsx`
- [Button primitive](https://github.com/mohammed-23-ham/mido-store/blob/main/components/ui/button.tsx): `components/ui/button.tsx`
- [Dropdown primitives](https://github.com/mohammed-23-ham/mido-store/blob/main/components/ui/dropdown-menu.tsx): `components/ui/dropdown-menu.tsx`
- [Select primitives](https://github.com/mohammed-23-ham/mido-store/blob/main/components/ui/select.tsx): `components/ui/select.tsx`
- [Sheet primitives](https://github.com/mohammed-23-ham/mido-store/blob/main/components/ui/sheet.tsx): `components/ui/sheet.tsx`

### Other components

- **Store visitor**

## Connections

- Store visitor → Home product page: browses
- Store visitor → Product shop: browses
- Home product page → Product shop: links to (evidence: `app/(main)/page.tsx`)
- Product shop → Persistent cart state: adds items (evidence: `app/(main)/shop/page.tsx`)
- Home product page → Persistent cart state: uses cart (evidence: `app/(main)/page.tsx`)
- Navigation header → Cart drawer: renders (evidence: `components/Header.tsx`)
- Cart drawer → Persistent cart state: reads and updates (evidence: `components/CartDrawer.tsx`)
- Cart drawer → Checkout page: links to (evidence: `components/CartDrawer.tsx`)
- Checkout page → Persistent cart state: reads cart (evidence: `app/(main)/checkout/page.tsx`)
- Checkout page → Demo purchase dialog: opens demo (evidence: `app/(main)/checkout/page.tsx`)
- Demo purchase dialog → Dialog primitives: uses primitives (evidence: `components/demo-purchase-dialog.tsx`)
- Home product page → Price display: displays price (evidence: `app/(main)/page.tsx`)
- Product shop → Price display: displays price (evidence: `app/(main)/shop/page.tsx`)
- Navigation header → Currency provider: sets currency (evidence: `components/Header.tsx`)
- Price display → Currency provider: formats amount (evidence: `components/price.tsx`)
- Checkout page → Currency provider: formats totals (evidence: `app/(main)/checkout/page.tsx`)
- Currency provider → Currency definitions: uses definitions (evidence: `components/providers/currency-provider.tsx`)
- Currency provider → Currency formatting: formats and converts (evidence: `components/providers/currency-provider.tsx`)
- Currency provider → Rates API route: fetches rates (evidence: `components/providers/currency-provider.tsx`)
- Rates API route → Rate retrieval: gets rates (evidence: `app/api/rates/route.ts`)
- Rate retrieval → Currency definitions: uses fallback data (evidence: `lib/currency/rates.ts`)
- Rate retrieval → Exchange-rate service: requests rates (evidence: `lib/currency/rates.ts`)
- FAQ page → FAQ accordion: renders (evidence: `app/(main)/faq/page.tsx`)
- FAQ accordion → Accordion primitives: uses primitives (evidence: `components/shadcn-space/accordion/accordion-07.tsx`)
- FAQ accordion → Currency provider: formats threshold (evidence: `components/shadcn-space/accordion/accordion-07.tsx`)
- Navigation header → Announcement marquee: renders (evidence: `components/Header.tsx`)
- Announcement marquee → Marquee animation: uses animation (evidence: `components/shadcn-space/marquee/marquee-05.tsx`)
- Contact page → EmailJS service: sends messages (evidence: `README.md`)
- Cart drawer → Sheet primitives: uses primitives (evidence: `components/CartDrawer.tsx`)
- Navigation header → Select primitives: uses primitives (evidence: `components/Header.tsx`)
- Navigation header → Dropdown primitives: uses primitives (evidence: `components/Header.tsx`)
