# anzar-g/feyd-store architecture

> Architecture diagram of the GitHub repository anzar-g/feyd-store, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/anzar-g/feyd-store
- Repository: https://github.com/anzar-g/feyd-store

## Overview

This is a client-side Indonesian storefront for Quran and book products, with a separate wakaf (donation) program. Visitors browse the landing page or product details, add books to a browser-persisted cart, then submit an order from the cart; the app also offers quick-order, customer-service, admin, and wakaf routes. The sampled code shows cart persistence and order submission, but not the order API implementation or wakaf form submission. Connections for unsampled pages are limited to imports and routes documented in the source index or App excerpt.

Main entry points: [`src/App.tsx`](https://github.com/anzar-g/feyd-store/blob/main/src/App.tsx) (App Router), [`src/pages/CartPage.tsx`](https://github.com/anzar-g/feyd-store/blob/main/src/pages/CartPage.tsx) (Cart and Checkout), [`src/pages/LandingPage.tsx`](https://github.com/anzar-g/feyd-store/blob/main/src/pages/LandingPage.tsx) (Landing Page), [`src/data/constants.ts`](https://github.com/anzar-g/feyd-store/blob/main/src/data/constants.ts) (Product and Contact Data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_app["App Router<br/>[App.tsx]"]
  node_landing["Landing Page<br/>[LandingPage.tsx]"]
  node_product["Product Details<br/>[ProductPage.tsx]"]
  node_quickorder["Quick Quran Order"]
end

subgraph group_commerce["Shopping"]
  node_cartpage["Cart and Checkout<br/>[CartPage.tsx]"]
  node_cartstate["Cart State Hook<br/>[useCart.ts]"]
  node_cartstorage[("Cart Storage<br/>[cart.ts]")]
  node_orderapi["Order API<br/>[order.ts]"]
end

subgraph group_wakaf["Wakaf Program"]
  node_wakafpage["Wakaf Program<br/>[WakafPage.tsx]"]
  node_gallery["Distribution Gallery"]
end

subgraph group_shared["Shared UI and Data"]
  node_constants["Product and Contact Data<br/>[constants.ts]"]
  node_testimonials["Testimonials<br/>[testimonials.ts]"]
  node_helpers["Commerce Helpers<br/>[helpers.ts]"]
  node_responsive["Responsive Images"]
  node_ratings["Rating Display<br/>[RatingStars.tsx]"]
  node_pricing["Quran Pricing Section"]
end

subgraph group_operations["Operations"]
  node_admin["Admin Page<br/>[AdminPage.tsx]"]
  node_chat["Customer Service Chat"]
  node_livefeed["Live Order Feed<br/>[LiveOrderFeed.tsx]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_app
node_app -->|"routes to"| node_landing
node_app -->|"routes to"| node_product
node_app -->|"routes to"| node_cartpage
node_app -->|"routes to"| node_quickorder
node_app -->|"routes to"| node_wakafpage
node_app -->|"routes to"| node_gallery
node_app -->|"routes to"| node_admin
node_app -->|"uses"| node_cartstate
node_app -->|"renders"| node_chat
node_app -->|"renders"| node_livefeed
node_landing -->|"uses"| node_cartstate
node_landing -->|"displays"| node_testimonials
node_landing -->|"renders"| node_pricing
node_product -->|"reads product data"| node_constants
node_product -->|"renders"| node_responsive
node_cartpage -->|"uses"| node_cartstate
node_cartpage -->|"posts order"| node_orderapi
node_cartpage -->|"formats checkout"| node_helpers
node_cartstate -->|"reads and writes"| node_cartstorage
node_cartpage -->|"reads prices"| node_constants
node_quickorder -->|"reads product data"| node_constants
node_quickorder -->|"uses"| node_helpers
node_wakafpage -->|"renders"| node_ratings
node_gallery -->|"renders"| node_responsive
node_admin -->|"reads admin data"| node_constants
node_chat -->|"reads contacts"| node_constants
node_chat -->|"reads UTM data"| node_helpers
node_livefeed -.->|"shows order activity"| node_visitor
node_visitor -->|"browses"| node_landing

click node_app "https://github.com/anzar-g/feyd-store/blob/main/src/App.tsx"
click node_landing "https://github.com/anzar-g/feyd-store/blob/main/src/pages/LandingPage.tsx"
click node_product "https://github.com/anzar-g/feyd-store/blob/main/src/pages/ProductPage.tsx"
click node_quickorder "https://github.com/anzar-g/feyd-store/blob/main/src/pages/QuickOrderQuranPage.tsx"
click node_cartpage "https://github.com/anzar-g/feyd-store/blob/main/src/pages/CartPage.tsx"
click node_cartstate "https://github.com/anzar-g/feyd-store/blob/main/src/hooks/useCart.ts"
click node_cartstorage "https://github.com/anzar-g/feyd-store/blob/main/src/utils/cart.ts"
click node_orderapi "https://github.com/anzar-g/feyd-store/blob/main/api/order.ts"
click node_wakafpage "https://github.com/anzar-g/feyd-store/blob/main/src/pages/WakafPage.tsx"
click node_gallery "https://github.com/anzar-g/feyd-store/blob/main/src/pages/GaleriWakafPage.tsx"
click node_admin "https://github.com/anzar-g/feyd-store/blob/main/src/pages/AdminPage.tsx"
click node_chat "https://github.com/anzar-g/feyd-store/blob/main/src/components/CustomerServiceChat.tsx"
click node_livefeed "https://github.com/anzar-g/feyd-store/blob/main/src/components/LiveOrderFeed.tsx"
click node_constants "https://github.com/anzar-g/feyd-store/blob/main/src/data/constants.ts"
click node_testimonials "https://github.com/anzar-g/feyd-store/blob/main/src/data/testimonials.ts"
click node_helpers "https://github.com/anzar-g/feyd-store/blob/main/src/utils/helpers.ts"
click node_responsive "https://github.com/anzar-g/feyd-store/blob/main/src/components/ResponsiveImage.tsx"
click node_ratings "https://github.com/anzar-g/feyd-store/blob/main/src/components/RatingStars.tsx"
click node_pricing "https://github.com/anzar-g/feyd-store/blob/main/src/components/QuranPricingSection.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_app,node_landing,node_product,node_quickorder toneBlue
class node_cartpage,node_cartstate,node_cartstorage,node_orderapi toneAmber
class node_wakafpage,node_gallery toneMint
class node_constants,node_testimonials,node_helpers,node_responsive,node_ratings,node_pricing toneRose
class node_admin,node_chat,node_livefeed,node_visitor toneIndigo
```

## Components

### Storefront

- [App Router](https://github.com/anzar-g/feyd-store/blob/main/src/App.tsx): `src/App.tsx`
- [Landing Page](https://github.com/anzar-g/feyd-store/blob/main/src/pages/LandingPage.tsx): `src/pages/LandingPage.tsx`
- [Product Details](https://github.com/anzar-g/feyd-store/blob/main/src/pages/ProductPage.tsx): `src/pages/ProductPage.tsx`
- [Quick Quran Order](https://github.com/anzar-g/feyd-store/blob/main/src/pages/QuickOrderQuranPage.tsx): `src/pages/QuickOrderQuranPage.tsx`

### Shopping

- [Cart and Checkout](https://github.com/anzar-g/feyd-store/blob/main/src/pages/CartPage.tsx): `src/pages/CartPage.tsx`
- [Cart State Hook](https://github.com/anzar-g/feyd-store/blob/main/src/hooks/useCart.ts): `src/hooks/useCart.ts`
- [Cart Storage](https://github.com/anzar-g/feyd-store/blob/main/src/utils/cart.ts): `src/utils/cart.ts`
- [Order API](https://github.com/anzar-g/feyd-store/blob/main/api/order.ts): `api/order.ts`

### Wakaf Program

- [Wakaf Program](https://github.com/anzar-g/feyd-store/blob/main/src/pages/WakafPage.tsx): `src/pages/WakafPage.tsx`
- [Distribution Gallery](https://github.com/anzar-g/feyd-store/blob/main/src/pages/GaleriWakafPage.tsx): `src/pages/GaleriWakafPage.tsx`

### Shared UI and Data

- [Product and Contact Data](https://github.com/anzar-g/feyd-store/blob/main/src/data/constants.ts): `src/data/constants.ts`
- [Testimonials](https://github.com/anzar-g/feyd-store/blob/main/src/data/testimonials.ts): `src/data/testimonials.ts`
- [Commerce Helpers](https://github.com/anzar-g/feyd-store/blob/main/src/utils/helpers.ts): `src/utils/helpers.ts`
- [Responsive Images](https://github.com/anzar-g/feyd-store/blob/main/src/components/ResponsiveImage.tsx): `src/components/ResponsiveImage.tsx`
- [Rating Display](https://github.com/anzar-g/feyd-store/blob/main/src/components/RatingStars.tsx): `src/components/RatingStars.tsx`
- [Quran Pricing Section](https://github.com/anzar-g/feyd-store/blob/main/src/components/QuranPricingSection.tsx): `src/components/QuranPricingSection.tsx`

### Operations

- [Admin Page](https://github.com/anzar-g/feyd-store/blob/main/src/pages/AdminPage.tsx): `src/pages/AdminPage.tsx`
- [Customer Service Chat](https://github.com/anzar-g/feyd-store/blob/main/src/components/CustomerServiceChat.tsx): `src/components/CustomerServiceChat.tsx`
- [Live Order Feed](https://github.com/anzar-g/feyd-store/blob/main/src/components/LiveOrderFeed.tsx): `src/components/LiveOrderFeed.tsx`

### Other components

- **Visitor**

## Connections

- Visitor → App Router: opens
- App Router → Landing Page: routes to (evidence: `src/App.tsx`)
- App Router → Product Details: routes to (evidence: `src/App.tsx`)
- App Router → Cart and Checkout: routes to (evidence: `src/App.tsx`)
- App Router → Quick Quran Order: routes to (evidence: `src/App.tsx`)
- App Router → Wakaf Program: routes to (evidence: `src/App.tsx`)
- App Router → Distribution Gallery: routes to (evidence: `src/App.tsx`)
- App Router → Admin Page: routes to (evidence: `src/App.tsx`)
- App Router → Cart State Hook: uses (evidence: `src/App.tsx`)
- App Router → Customer Service Chat: renders (evidence: `src/App.tsx`)
- App Router → Live Order Feed: renders (evidence: `src/App.tsx`)
- Landing Page → Cart State Hook: uses (evidence: `src/pages/LandingPage.tsx`)
- Landing Page → Testimonials: displays (evidence: `src/pages/LandingPage.tsx`)
- Landing Page → Quran Pricing Section: renders (evidence: `src/pages/LandingPage.tsx`)
- Product Details → Product and Contact Data: reads product data (evidence: `src/pages/ProductPage.tsx`)
- Product Details → Responsive Images: renders (evidence: `src/pages/ProductPage.tsx`)
- Cart and Checkout → Cart State Hook: uses (evidence: `src/pages/CartPage.tsx`)
- Cart and Checkout → Order API: posts order (evidence: `src/pages/CartPage.tsx`)
- Cart and Checkout → Commerce Helpers: formats checkout (evidence: `src/pages/CartPage.tsx`)
- Cart State Hook → Cart Storage: reads and writes (evidence: `src/hooks/useCart.ts`)
- Cart and Checkout → Product and Contact Data: reads prices (evidence: `src/pages/CartPage.tsx`)
- Quick Quran Order → Product and Contact Data: reads product data (evidence: `src/pages/QuickOrderQuranPage.tsx`)
- Quick Quran Order → Commerce Helpers: uses (evidence: `src/pages/QuickOrderQuranPage.tsx`)
- Wakaf Program → Rating Display: renders (evidence: `src/pages/WakafPage.tsx`)
- Distribution Gallery → Responsive Images: renders (evidence: `src/pages/GaleriWakafPage.tsx`)
- Admin Page → Product and Contact Data: reads admin data (evidence: `src/pages/AdminPage.tsx`)
- Customer Service Chat → Product and Contact Data: reads contacts (evidence: `src/components/CustomerServiceChat.tsx`)
- Customer Service Chat → Commerce Helpers: reads UTM data (evidence: `src/components/CustomerServiceChat.tsx`)
- Live Order Feed → Visitor: shows order activity
- Visitor → Landing Page: browses
