# devsayagroup/aromabiji architecture

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

- Interactive diagram: https://gitdiagram.com/devsayagroup/aromabiji
- Repository: https://github.com/devsayagroup/aromabiji

## Overview

Aroma Biji is a Next.js storefront and brand-content site for Indonesian coffee and single-origin chocolate. Visitors browse collections and product details, learn about origins and brewing, and can build a client-side cart; the documented FAQ also describes offline and WhatsApp ordering. Routes render page components, with product catalogs supplying collection/detail data. The shared client layout hosts navigation, cart, and analytics. Source excerpts are incomplete, so unsampled capability links are omitted rather than inferred.

Main entry points: [`app/layout-client.tsx`](https://github.com/devsayagroup/aromabiji/blob/main/app/layout-client.tsx) (Client layout), [`components/ecommerce/CartContext.tsx`](https://github.com/devsayagroup/aromabiji/blob/main/components/ecommerce/CartContext.tsx) (Cart state), [`components/pages/ChocolateDetailPage.tsx`](https://github.com/devsayagroup/aromabiji/blob/main/components/pages/ChocolateDetailPage.tsx) (Chocolate detail), [`app/journal`](https://github.com/devsayagroup/aromabiji/tree/main/app/journal) (Journal routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_home["Home page<br/>[page.tsx]"]
  node_home_sections["Home sections"]
  node_coffee_collection["Coffee collection<br/>[ProductPage.tsx]"]
  node_coffee_detail["Coffee detail"]
  node_coffee_catalog["Coffee catalog<br/>[products.ts]"]
  node_chocolate_collection["Chocolate collection<br/>[ChocolatePage.tsx]"]
  node_chocolate_detail["Chocolate detail"]
  node_chocolate_catalog["Chocolate catalog"]
end

subgraph group_content["Brand content"]
  node_content_pages["Brand and help pages"]
  node_brewing["Brewing guide"]
  node_journal_routes["Journal routes"]
  node_journal_render["Journal rendering<br/>[mdx.ts]"]
  node_locations["Location pages<br/>[LocationPage.tsx]"]
  node_location_data["Location data<br/>[locations.ts]"]
end

subgraph group_commerce["Cart experience"]
  node_cart_state["Cart state<br/>[CartContext.tsx]"]
  node_cart_drawer["Cart drawer<br/>[CartDrawer.tsx]"]
  node_add_button["Add to cart"]
end

subgraph group_shared["Shared services"]
  node_client_layout["Client layout<br/>[layout-client.tsx]"]
  node_header["Navigation<br/>[Header.tsx]"]
  node_footer["Footer<br/>[Footer.tsx]"]
  node_analytics["Route analytics<br/>[RouteTracker.tsx]"]
  node_analytics_lib["Analytics helpers<br/>[analytics.ts]"]
end

node_visitor(("Visitor"))

node_visitor -->|"visits"| node_home
node_visitor -->|"browses"| node_coffee_collection
node_visitor -->|"browses"| node_chocolate_collection
node_home -->|"renders"| node_home_sections
node_coffee_collection -->|"reads"| node_coffee_catalog
node_coffee_detail -->|"reads"| node_coffee_catalog
node_chocolate_collection -->|"reads"| node_chocolate_catalog
node_chocolate_detail -->|"reads"| node_chocolate_catalog
node_chocolate_detail -->|"renders"| node_add_button
node_journal_routes -->|"uses"| node_journal_render
node_journal_routes -->|"renders index"| node_content_pages
node_locations -->|"reads"| node_location_data
node_client_layout -->|"renders"| node_header
node_client_layout -->|"renders"| node_footer
node_client_layout -->|"provides state"| node_cart_state
node_client_layout -->|"renders"| node_cart_drawer
node_client_layout -->|"renders"| node_analytics
node_cart_drawer -->|"reads state"| node_cart_state
node_add_button -.->|"updates cart"| node_cart_state
node_analytics -->|"uses"| node_analytics_lib

click node_home "https://github.com/devsayagroup/aromabiji/blob/main/app/page.tsx"
click node_home_sections "https://github.com/devsayagroup/aromabiji/tree/main/components/section"
click node_coffee_collection "https://github.com/devsayagroup/aromabiji/blob/main/components/pages/ProductPage.tsx"
click node_coffee_detail "https://github.com/devsayagroup/aromabiji/blob/main/components/pages/ProductDetailPage.tsx"
click node_coffee_catalog "https://github.com/devsayagroup/aromabiji/blob/main/lib/products.ts"
click node_chocolate_collection "https://github.com/devsayagroup/aromabiji/blob/main/components/pages/ChocolatePage.tsx"
click node_chocolate_detail "https://github.com/devsayagroup/aromabiji/blob/main/components/pages/ChocolateDetailPage.tsx"
click node_chocolate_catalog "https://github.com/devsayagroup/aromabiji/blob/main/lib/products-chocolate.ts"
click node_content_pages "https://github.com/devsayagroup/aromabiji/tree/main/components/pages"
click node_brewing "https://github.com/devsayagroup/aromabiji/blob/main/components/pages/BrewingMethodsPage.tsx"
click node_journal_routes "https://github.com/devsayagroup/aromabiji/tree/main/app/journal"
click node_journal_render "https://github.com/devsayagroup/aromabiji/blob/main/lib/mdx.ts"
click node_locations "https://github.com/devsayagroup/aromabiji/blob/main/components/pages/LocationPage.tsx"
click node_location_data "https://github.com/devsayagroup/aromabiji/blob/main/lib/locations.ts"
click node_client_layout "https://github.com/devsayagroup/aromabiji/blob/main/app/layout-client.tsx"
click node_header "https://github.com/devsayagroup/aromabiji/blob/main/components/layout/Header.tsx"
click node_footer "https://github.com/devsayagroup/aromabiji/blob/main/components/layout/Footer.tsx"
click node_cart_state "https://github.com/devsayagroup/aromabiji/blob/main/components/ecommerce/CartContext.tsx"
click node_cart_drawer "https://github.com/devsayagroup/aromabiji/blob/main/components/ecommerce/CartDrawer.tsx"
click node_add_button "https://github.com/devsayagroup/aromabiji/blob/main/components/ecommerce/AddToCartButton.tsx"
click node_analytics "https://github.com/devsayagroup/aromabiji/blob/main/components/analytics/RouteTracker.tsx"
click node_analytics_lib "https://github.com/devsayagroup/aromabiji/blob/main/lib/analytics.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_home,node_home_sections,node_coffee_collection,node_coffee_detail,node_coffee_catalog,node_chocolate_collection,node_chocolate_detail,node_chocolate_catalog toneBlue
class node_content_pages,node_brewing,node_journal_routes,node_journal_render,node_locations,node_location_data toneAmber
class node_cart_state,node_cart_drawer,node_add_button toneMint
class node_client_layout,node_header,node_footer,node_analytics,node_analytics_lib toneRose
class node_visitor toneIndigo
```

## Components

### Storefront

- [Home page](https://github.com/devsayagroup/aromabiji/blob/main/app/page.tsx): `app/page.tsx`
- [Home sections](https://github.com/devsayagroup/aromabiji/tree/main/components/section): `components/section`
- [Coffee collection](https://github.com/devsayagroup/aromabiji/blob/main/components/pages/ProductPage.tsx): `components/pages/ProductPage.tsx`
- [Coffee detail](https://github.com/devsayagroup/aromabiji/blob/main/components/pages/ProductDetailPage.tsx): `components/pages/ProductDetailPage.tsx`
- [Coffee catalog](https://github.com/devsayagroup/aromabiji/blob/main/lib/products.ts): `lib/products.ts`
- [Chocolate collection](https://github.com/devsayagroup/aromabiji/blob/main/components/pages/ChocolatePage.tsx): `components/pages/ChocolatePage.tsx`
- [Chocolate detail](https://github.com/devsayagroup/aromabiji/blob/main/components/pages/ChocolateDetailPage.tsx): `components/pages/ChocolateDetailPage.tsx`
- [Chocolate catalog](https://github.com/devsayagroup/aromabiji/blob/main/lib/products-chocolate.ts): `lib/products-chocolate.ts`

### Brand content

- [Brand and help pages](https://github.com/devsayagroup/aromabiji/tree/main/components/pages): `components/pages`
- [Brewing guide](https://github.com/devsayagroup/aromabiji/blob/main/components/pages/BrewingMethodsPage.tsx): `components/pages/BrewingMethodsPage.tsx`
- [Journal routes](https://github.com/devsayagroup/aromabiji/tree/main/app/journal): `app/journal`
- [Journal rendering](https://github.com/devsayagroup/aromabiji/blob/main/lib/mdx.ts): `lib/mdx.ts`
- [Location pages](https://github.com/devsayagroup/aromabiji/blob/main/components/pages/LocationPage.tsx): `components/pages/LocationPage.tsx`
- [Location data](https://github.com/devsayagroup/aromabiji/blob/main/lib/locations.ts): `lib/locations.ts`

### Cart experience

- [Cart state](https://github.com/devsayagroup/aromabiji/blob/main/components/ecommerce/CartContext.tsx): `components/ecommerce/CartContext.tsx`
- [Cart drawer](https://github.com/devsayagroup/aromabiji/blob/main/components/ecommerce/CartDrawer.tsx): `components/ecommerce/CartDrawer.tsx`
- [Add to cart](https://github.com/devsayagroup/aromabiji/blob/main/components/ecommerce/AddToCartButton.tsx): `components/ecommerce/AddToCartButton.tsx`

### Shared services

- [Client layout](https://github.com/devsayagroup/aromabiji/blob/main/app/layout-client.tsx): `app/layout-client.tsx`
- [Navigation](https://github.com/devsayagroup/aromabiji/blob/main/components/layout/Header.tsx): `components/layout/Header.tsx`
- [Footer](https://github.com/devsayagroup/aromabiji/blob/main/components/layout/Footer.tsx): `components/layout/Footer.tsx`
- [Route analytics](https://github.com/devsayagroup/aromabiji/blob/main/components/analytics/RouteTracker.tsx): `components/analytics/RouteTracker.tsx`
- [Analytics helpers](https://github.com/devsayagroup/aromabiji/blob/main/lib/analytics.ts): `lib/analytics.ts`

### Other components

- **Visitor**

## Connections

- Visitor → Home page: visits (evidence: `app/page.tsx`)
- Visitor → Coffee collection: browses
- Visitor → Chocolate collection: browses
- Home page → Home sections: renders (evidence: `app/page.tsx`)
- Coffee collection → Coffee catalog: reads (evidence: `app/coffee/page.tsx`)
- Coffee detail → Coffee catalog: reads (evidence: `app/coffee/[id]/page.tsx`)
- Chocolate collection → Chocolate catalog: reads (evidence: `app/chocolate/page.tsx`)
- Chocolate detail → Chocolate catalog: reads (evidence: `app/chocolate/[id]/page.tsx`)
- Chocolate detail → Add to cart: renders (evidence: `components/pages/ChocolateDetailPage.tsx`)
- Journal routes → Journal rendering: uses (evidence: `app/journal/[slug]/page.tsx`)
- Journal routes → Brand and help pages: renders index (evidence: `app/journal/page.tsx`)
- Location pages → Location data: reads (evidence: `app/locations/[slug]/page.tsx`)
- Client layout → Navigation: renders (evidence: `app/layout-client.tsx`)
- Client layout → Footer: renders (evidence: `app/layout-client.tsx`)
- Client layout → Cart state: provides state (evidence: `app/layout-client.tsx`)
- Client layout → Cart drawer: renders (evidence: `app/layout-client.tsx`)
- Client layout → Route analytics: renders (evidence: `app/layout-client.tsx`)
- Cart drawer → Cart state: reads state (evidence: `components/ecommerce/CartDrawer.tsx`)
- Add to cart → Cart state: updates cart
- Route analytics → Analytics helpers: uses (evidence: `components/analytics/RouteTracker.tsx`)
