# cyrildaoust-source/mikadodecov2 architecture

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

- Interactive diagram: https://gitdiagram.com/cyrildaoust-source/mikadodecov2
- Repository: https://github.com/cyrildaoust-source/mikadodecov2

## Overview

Mikado Deco is a server-rendered furniture and home-decor storefront backed by Shopify. A visitor requests a page or API result; Express routes the request, catalog/search services obtain and shape product data, and page rendering injects storefront chrome and navigation. Distinct product areas include category browsing, natural-language search, product detail, brand/family/editorial pages, cart, and forms. The graph reflects the available source excerpts and index references; unsampled route and rendering internals limit some relationship detail.

Main entry points: [`routes/pages.js`](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/routes/pages.js) (Page routes), [`lib/services/search.js`](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/services/search.js) (Search service), [`app.js`](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/app.js) (Express app), [`lib/services/catalog-scope.js`](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/services/catalog-scope.js) (Catalog scope)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["HTTP entry"]
  node_express["Express app<br/>[app.js]"]
  node_page_routes["Page routes<br/>[pages.js]"]
  node_api_routes["API routes<br/>[api.js]"]
  node_cart_routes["Cart routes<br/>[cart.js]"]
  node_form_routes["Form routes<br/>[forms.js]"]
end

subgraph group_catalog["Catalog and search"]
  node_search_service["Search service<br/>[search.js]"]
  node_search_intent["Search intent<br/>[search-intent.js]"]
  node_search_catalog["Search catalog<br/>[search-catalog.js]"]
  node_catalog_service["Catalog service<br/>[catalog.js]"]
  node_catalog_scope["Catalog scope<br/>[catalog-scope.js]"]
  node_catalog_filters["Catalog filters<br/>[catalog-filters.js]"]
  node_chair_catalog["Chair catalog<br/>[chair-catalog.js]"]
  node_shopify_client["Shopify transport<br/>[client.js]"]
  node_product_mapper["Product mapping<br/>[product-mapper.js]"]
end

subgraph group_storefront["Storefront presentation"]
  node_chrome["Chrome rendering<br/>[chrome.js]"]
  node_navigation["Navigation rendering<br/>[navigation.js]"]
end

subgraph group_commerce["Commerce and content"]
  node_product_detail["Product detail<br/>[produit.js]"]
  node_product_listing["Product listings<br/>[produits.js]"]
  node_selection["Curated selection<br/>[selection.js]"]
  node_newsletter["Newsletter handling<br/>[newsletter.js]"]
  node_editorial["Editorial media<br/>[editorial-media.js]"]
  node_family_pages["Family pages<br/>[family-pages.js]"]
end

node_visitor(("Visitor"))
node_shopify[("Shopify Storefront")]

node_visitor -->|"requests"| node_express
node_express -->|"routes pages"| node_page_routes
node_express -->|"routes API"| node_api_routes
node_express -->|"routes cart"| node_cart_routes
node_express -->|"routes forms"| node_form_routes
node_page_routes -->|"injects chrome"| node_chrome
node_page_routes -->|"injects navigation"| node_navigation
node_page_routes -->|"serves detail"| node_product_detail
node_page_routes -.->|"serves listings"| node_product_listing
node_page_routes -.->|"serves selection"| node_selection
node_page_routes -->|"uses media"| node_editorial
node_page_routes -->|"loads family data"| node_family_pages
node_api_routes -->|"requests search"| node_search_service
node_api_routes -->|"requests catalog"| node_catalog_service
node_api_routes -->|"requests scoped catalog"| node_catalog_scope
node_search_service -->|"parses query"| node_search_intent
node_search_service -->|"loads and filters"| node_search_catalog
node_search_service -->|"loads variants"| node_chair_catalog
node_search_service -->|"fetches products"| node_shopify_client
node_search_service -->|"maps products"| node_product_mapper
node_search_catalog -->|"reuses filters"| node_catalog_filters
node_search_catalog -->|"parses search terms"| node_search_intent
node_search_catalog -->|"uses chair data"| node_chair_catalog
node_catalog_service -->|"fetches Shopify data"| node_shopify_client
node_catalog_service -->|"maps products"| node_product_mapper
node_catalog_scope -->|"uses filters"| node_catalog_filters
node_catalog_scope -->|"uses catalog data"| node_catalog_service
node_catalog_scope -->|"fetches products"| node_shopify_client
node_catalog_scope -->|"maps products"| node_product_mapper
node_catalog_filters -->|"variant support"| node_product_detail
node_shopify_client -->|"queries Storefront API"| node_shopify
node_form_routes -->|"handles signup"| node_newsletter

click node_express "https://github.com/cyrildaoust-source/mikadodecov2/blob/main/app.js"
click node_page_routes "https://github.com/cyrildaoust-source/mikadodecov2/blob/main/routes/pages.js"
click node_api_routes "https://github.com/cyrildaoust-source/mikadodecov2/blob/main/routes/api.js"
click node_cart_routes "https://github.com/cyrildaoust-source/mikadodecov2/blob/main/routes/cart.js"
click node_form_routes "https://github.com/cyrildaoust-source/mikadodecov2/blob/main/routes/forms.js"
click node_search_service "https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/services/search.js"
click node_search_intent "https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/search-intent.js"
click node_search_catalog "https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/search-catalog.js"
click node_catalog_service "https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/services/catalog.js"
click node_catalog_scope "https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/services/catalog-scope.js"
click node_catalog_filters "https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/catalog-filters.js"
click node_chair_catalog "https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/chair-catalog.js"
click node_shopify_client "https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/shopify/client.js"
click node_product_mapper "https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/shopify/product-mapper.js"
click node_chrome "https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/render/chrome.js"
click node_navigation "https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/render/navigation.js"
click node_product_detail "https://github.com/cyrildaoust-source/mikadodecov2/blob/main/v3/pages/produit.js"
click node_product_listing "https://github.com/cyrildaoust-source/mikadodecov2/blob/main/v3/pages/produits.js"
click node_selection "https://github.com/cyrildaoust-source/mikadodecov2/blob/main/v3/pages/selection.js"
click node_newsletter "https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/newsletter.js"
click node_editorial "https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/editorial-media.js"
click node_family_pages "https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/family-pages.js"

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_express,node_page_routes,node_api_routes,node_cart_routes,node_form_routes toneBlue
class node_search_service,node_search_intent,node_search_catalog,node_catalog_service,node_catalog_scope,node_catalog_filters,node_chair_catalog,node_shopify_client,node_product_mapper,node_shopify toneAmber
class node_chrome,node_navigation toneMint
class node_product_detail,node_product_listing,node_selection,node_newsletter,node_editorial,node_family_pages toneRose
class node_visitor toneIndigo
```

## Components

### HTTP entry

- [Express app](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/app.js): `app.js`
- [Page routes](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/routes/pages.js): `routes/pages.js`
- [API routes](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/routes/api.js): `routes/api.js`
- [Cart routes](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/routes/cart.js): `routes/cart.js`
- [Form routes](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/routes/forms.js): `routes/forms.js`

### Catalog and search

- [Search service](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/services/search.js): `lib/services/search.js`
- [Search intent](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/search-intent.js): `lib/search-intent.js`
- [Search catalog](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/search-catalog.js): `lib/search-catalog.js`
- [Catalog service](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/services/catalog.js): `lib/services/catalog.js`
- [Catalog scope](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/services/catalog-scope.js): `lib/services/catalog-scope.js`
- [Catalog filters](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/catalog-filters.js): `lib/catalog-filters.js`
- [Chair catalog](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/chair-catalog.js): `lib/chair-catalog.js`
- [Shopify transport](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/shopify/client.js): `lib/shopify/client.js`
- [Product mapping](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/shopify/product-mapper.js): `lib/shopify/product-mapper.js`

### Storefront presentation

- [Chrome rendering](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/render/chrome.js): `lib/render/chrome.js`
- [Navigation rendering](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/render/navigation.js): `lib/render/navigation.js`

### Commerce and content

- [Product detail](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/v3/pages/produit.js): `v3/pages/produit.js`
- [Product listings](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/v3/pages/produits.js): `v3/pages/produits.js`
- [Curated selection](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/v3/pages/selection.js): `v3/pages/selection.js`
- [Newsletter handling](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/newsletter.js): `lib/newsletter.js`
- [Editorial media](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/editorial-media.js): `lib/editorial-media.js`
- [Family pages](https://github.com/cyrildaoust-source/mikadodecov2/blob/main/lib/family-pages.js): `lib/family-pages.js`

### Other components

- **Visitor**
- **Shopify Storefront**

## Connections

- Visitor → Express app: requests (evidence: `app.js`)
- Express app → Page routes: routes pages (evidence: `app.js`)
- Express app → API routes: routes API (evidence: `app.js`)
- Express app → Cart routes: routes cart (evidence: `app.js`)
- Express app → Form routes: routes forms (evidence: `app.js`)
- Page routes → Chrome rendering: injects chrome (evidence: `routes/pages.js`)
- Page routes → Navigation rendering: injects navigation (evidence: `routes/pages.js`)
- Page routes → Product detail: serves detail (evidence: `routes/pages.js`)
- Page routes → Product listings: serves listings
- Page routes → Curated selection: serves selection
- Page routes → Editorial media: uses media (evidence: `routes/pages.js`)
- Page routes → Family pages: loads family data (evidence: `routes/pages.js`)
- API routes → Search service: requests search (evidence: `routes/api.js`)
- API routes → Catalog service: requests catalog (evidence: `routes/api.js`)
- API routes → Catalog scope: requests scoped catalog (evidence: `routes/api.js`)
- Search service → Search intent: parses query (evidence: `lib/services/search.js`)
- Search service → Search catalog: loads and filters (evidence: `lib/services/search.js`)
- Search service → Chair catalog: loads variants (evidence: `lib/services/search.js`)
- Search service → Shopify transport: fetches products (evidence: `lib/services/search.js`)
- Search service → Product mapping: maps products (evidence: `lib/services/search.js`)
- Search catalog → Catalog filters: reuses filters (evidence: `lib/search-catalog.js`)
- Search catalog → Search intent: parses search terms (evidence: `lib/search-catalog.js`)
- Search catalog → Chair catalog: uses chair data (evidence: `lib/search-catalog.js`)
- Catalog service → Shopify transport: fetches Shopify data (evidence: `lib/services/catalog.js`)
- Catalog service → Product mapping: maps products (evidence: `lib/services/catalog.js`)
- Catalog scope → Catalog filters: uses filters (evidence: `lib/services/catalog-scope.js`)
- Catalog scope → Catalog service: uses catalog data (evidence: `lib/services/catalog-scope.js`)
- Catalog scope → Shopify transport: fetches products (evidence: `lib/services/catalog-scope.js`)
- Catalog scope → Product mapping: maps products (evidence: `lib/services/catalog-scope.js`)
- Catalog filters → Product detail: variant support (evidence: `lib/catalog-filters.js`)
- Shopify transport → Shopify Storefront: queries Storefront API (evidence: `lib/shopify/client.js`)
- Form routes → Newsletter handling: handles signup (evidence: `routes/forms.js`)
