# yaonkey/new-kws architecture

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

- Interactive diagram: https://gitdiagram.com/yaonkey/new-kws
- Repository: https://github.com/yaonkey/new-kws

## Overview

Kofworkshop is a bilingual Nuxt storefront for handmade products and digital patterns. Visitors browse or search the CRM-backed catalog, open product details, add physical items or PDF patterns to a persistent cart, and prepare an order for Telegram. The homepage also presents markets and retail shelves; static pages and localized sitemap URLs support discovery. The graph reflects shown calls and documented integrations; the product-detail page and some API helpers are present in the tree but their implementations were not excerpted.

Main entry points: [`app/layouts/default.vue`](https://github.com/yaonkey/new-kws/blob/master/app/layouts/default.vue) (Site layout), [`app/pages/index.vue`](https://github.com/yaonkey/new-kws/blob/master/app/pages/index.vue) (Home page), [`app/pages/products/index.vue`](https://github.com/yaonkey/new-kws/blob/master/app/pages/products/index.vue) (Product listing), [`app/pages/patterns/index.vue`](https://github.com/yaonkey/new-kws/blob/master/app/pages/patterns/index.vue) (Pattern listing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_home["Home page<br/>[index.vue]"]
  node_layout["Site layout<br/>[default.vue]"]
  node_about["About page<br/>[about.vue]"]
  node_socials["Socials page<br/>[socials.vue]"]
  node_header["Site header<br/>[SiteHeader.vue]"]
  node_footer["Site footer<br/>[SiteFooter.vue]"]
end

subgraph group_catalog["Catalog and discovery"]
  node_product_list["Product listing<br/>[index.vue]"]
  node_product_detail["Product details<br/>[&#91;slug&#93;.vue]"]
  node_patterns["Pattern listing<br/>[index.vue]"]
  node_product_card["Product card<br/>[ProductCard.vue]"]
  node_catalog_rules["Catalog rules<br/>[useCatalog.ts]"]
  node_products_api["Products API client<br/>[useProductsApi.ts]"]
  node_shelves_api["Shelves API client<br/>[useShelvesApi.ts]"]
  node_markets_api["Markets API client<br/>[useMarketsApi.ts]"]
end

subgraph group_commerce["Cart and checkout"]
  node_cart_page["Cart page<br/>[cart.vue]"]
  node_cart[("Cart state<br/>[useCart.ts]")]
  node_cart_drawer["Cart drawer<br/>[CartDrawer.vue]"]
  node_checkout["Telegram checkout"]
  node_cart_fx["Cart animation<br/>[useCartFx.ts]"]
  node_cart_fly["Cart fly effect<br/>[CartFly.vue]"]
end

subgraph group_integrations["External services"]
  node_crm["KWS CRM API"]
  node_telegram["Telegram"]
  node_sitemap["Sitemap URLs<br/>[urls.ts]"]
end

node_visitor(("Visitor"))

node_visitor -->|"visits"| node_home
node_visitor -->|"browses"| node_product_list
node_visitor -->|"browses"| node_patterns
node_visitor -->|"opens"| node_product_detail
node_home -->|"fetches market"| node_markets_api
node_home -->|"fetches shelves"| node_shelves_api
node_markets_api -->|"requests market"| node_crm
node_home -.->|"renders within"| node_layout
node_product_list -->|"fetches catalog"| node_products_api
node_patterns -->|"fetches catalog"| node_products_api
node_products_api -.->|"loads catalog"| node_crm
node_product_list -->|"filters with"| node_catalog_rules
node_patterns -->|"localizes with"| node_catalog_rules
node_product_list -->|"renders cards"| node_product_card
node_patterns -->|"renders cards"| node_product_card
node_product_card -->|"adds items"| node_cart
node_product_card -->|"animates add"| node_cart_fx
node_cart_page -.->|"shows cart"| node_cart
node_cart_drawer -.->|"shows cart"| node_cart
node_checkout -->|"reads items"| node_cart
node_checkout -->|"opens order"| node_telegram
node_layout -->|"renders"| node_header
node_layout -->|"renders"| node_footer
node_layout -->|"renders"| node_cart_drawer
node_layout -->|"renders"| node_cart_fly
node_sitemap -->|"loads product slugs"| node_crm
node_visitor -.->|"visits"| node_about
node_visitor -.->|"visits"| node_socials

click node_home "https://github.com/yaonkey/new-kws/blob/master/app/pages/index.vue"
click node_layout "https://github.com/yaonkey/new-kws/blob/master/app/layouts/default.vue"
click node_about "https://github.com/yaonkey/new-kws/blob/master/app/pages/about.vue"
click node_socials "https://github.com/yaonkey/new-kws/blob/master/app/pages/socials.vue"
click node_product_list "https://github.com/yaonkey/new-kws/blob/master/app/pages/products/index.vue"
click node_product_detail "https://github.com/yaonkey/new-kws/blob/master/app/pages/products/%5Bslug%5D.vue"
click node_patterns "https://github.com/yaonkey/new-kws/blob/master/app/pages/patterns/index.vue"
click node_product_card "https://github.com/yaonkey/new-kws/blob/master/app/components/ProductCard.vue"
click node_catalog_rules "https://github.com/yaonkey/new-kws/blob/master/app/composables/useCatalog.ts"
click node_products_api "https://github.com/yaonkey/new-kws/blob/master/app/composables/useProductsApi.ts"
click node_shelves_api "https://github.com/yaonkey/new-kws/blob/master/app/composables/useShelvesApi.ts"
click node_markets_api "https://github.com/yaonkey/new-kws/blob/master/app/composables/useMarketsApi.ts"
click node_cart_page "https://github.com/yaonkey/new-kws/blob/master/app/pages/cart.vue"
click node_cart "https://github.com/yaonkey/new-kws/blob/master/app/composables/useCart.ts"
click node_cart_drawer "https://github.com/yaonkey/new-kws/blob/master/app/components/CartDrawer.vue"
click node_checkout "https://github.com/yaonkey/new-kws/blob/master/app/composables/useTelegramCheckout.ts"
click node_cart_fx "https://github.com/yaonkey/new-kws/blob/master/app/composables/useCartFx.ts"
click node_sitemap "https://github.com/yaonkey/new-kws/blob/master/server/api/__sitemap__/urls.ts"
click node_header "https://github.com/yaonkey/new-kws/blob/master/app/components/SiteHeader.vue"
click node_footer "https://github.com/yaonkey/new-kws/blob/master/app/components/SiteFooter.vue"
click node_cart_fly "https://github.com/yaonkey/new-kws/blob/master/app/components/CartFly.vue"

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_layout,node_about,node_socials,node_header,node_footer toneBlue
class node_product_list,node_product_detail,node_patterns,node_product_card,node_catalog_rules,node_products_api,node_shelves_api,node_markets_api toneAmber
class node_cart_page,node_cart,node_cart_drawer,node_checkout,node_cart_fx,node_cart_fly toneMint
class node_crm,node_telegram,node_sitemap toneRose
class node_visitor toneIndigo
```

## Components

### Storefront

- [Home page](https://github.com/yaonkey/new-kws/blob/master/app/pages/index.vue): `app/pages/index.vue`
- [Site layout](https://github.com/yaonkey/new-kws/blob/master/app/layouts/default.vue): `app/layouts/default.vue`
- [About page](https://github.com/yaonkey/new-kws/blob/master/app/pages/about.vue): `app/pages/about.vue`
- [Socials page](https://github.com/yaonkey/new-kws/blob/master/app/pages/socials.vue): `app/pages/socials.vue`
- [Site header](https://github.com/yaonkey/new-kws/blob/master/app/components/SiteHeader.vue): `app/components/SiteHeader.vue`
- [Site footer](https://github.com/yaonkey/new-kws/blob/master/app/components/SiteFooter.vue): `app/components/SiteFooter.vue`

### Catalog and discovery

- [Product listing](https://github.com/yaonkey/new-kws/blob/master/app/pages/products/index.vue): `app/pages/products/index.vue`
- [Product details](https://github.com/yaonkey/new-kws/blob/master/app/pages/products/%5Bslug%5D.vue): `app/pages/products/[slug].vue`
- [Pattern listing](https://github.com/yaonkey/new-kws/blob/master/app/pages/patterns/index.vue): `app/pages/patterns/index.vue`
- [Product card](https://github.com/yaonkey/new-kws/blob/master/app/components/ProductCard.vue): `app/components/ProductCard.vue`
- [Catalog rules](https://github.com/yaonkey/new-kws/blob/master/app/composables/useCatalog.ts): `app/composables/useCatalog.ts`
- [Products API client](https://github.com/yaonkey/new-kws/blob/master/app/composables/useProductsApi.ts): `app/composables/useProductsApi.ts`
- [Shelves API client](https://github.com/yaonkey/new-kws/blob/master/app/composables/useShelvesApi.ts): `app/composables/useShelvesApi.ts`
- [Markets API client](https://github.com/yaonkey/new-kws/blob/master/app/composables/useMarketsApi.ts): `app/composables/useMarketsApi.ts`

### Cart and checkout

- [Cart page](https://github.com/yaonkey/new-kws/blob/master/app/pages/cart.vue): `app/pages/cart.vue`
- [Cart state](https://github.com/yaonkey/new-kws/blob/master/app/composables/useCart.ts): `app/composables/useCart.ts`
- [Cart drawer](https://github.com/yaonkey/new-kws/blob/master/app/components/CartDrawer.vue): `app/components/CartDrawer.vue`
- [Telegram checkout](https://github.com/yaonkey/new-kws/blob/master/app/composables/useTelegramCheckout.ts): `app/composables/useTelegramCheckout.ts`
- [Cart animation](https://github.com/yaonkey/new-kws/blob/master/app/composables/useCartFx.ts): `app/composables/useCartFx.ts`
- [Cart fly effect](https://github.com/yaonkey/new-kws/blob/master/app/components/CartFly.vue): `app/components/CartFly.vue`

### External services

- **KWS CRM API**
- **Telegram**
- [Sitemap URLs](https://github.com/yaonkey/new-kws/blob/master/server/api/__sitemap__/urls.ts): `server/api/__sitemap__/urls.ts`

### Other components

- **Visitor**

## Connections

- Visitor → Home page: visits
- Visitor → Product listing: browses
- Visitor → Pattern listing: browses
- Visitor → Product details: opens
- Home page → Markets API client: fetches market (evidence: `app/pages/index.vue`)
- Home page → Shelves API client: fetches shelves (evidence: `app/pages/index.vue`)
- Markets API client → KWS CRM API: requests market (evidence: `app/composables/useMarketsApi.ts`)
- Home page → Site layout: renders within
- Product listing → Products API client: fetches catalog (evidence: `app/pages/products/index.vue`)
- Pattern listing → Products API client: fetches catalog (evidence: `app/pages/patterns/index.vue`)
- Products API client → KWS CRM API: loads catalog (evidence: `README.md`)
- Product listing → Catalog rules: filters with (evidence: `app/pages/products/index.vue`)
- Pattern listing → Catalog rules: localizes with (evidence: `app/pages/patterns/index.vue`)
- Product listing → Product card: renders cards (evidence: `app/pages/products/index.vue`)
- Pattern listing → Product card: renders cards (evidence: `app/pages/patterns/index.vue`)
- Product card → Cart state: adds items (evidence: `app/components/ProductCard.vue`)
- Product card → Cart animation: animates add (evidence: `app/components/ProductCard.vue`)
- Cart page → Cart state: shows cart
- Cart drawer → Cart state: shows cart
- Telegram checkout → Cart state: reads items (evidence: `app/composables/useTelegramCheckout.ts`)
- Telegram checkout → Telegram: opens order (evidence: `app/composables/useTelegramCheckout.ts`)
- Site layout → Site header: renders (evidence: `app/layouts/default.vue`)
- Site layout → Site footer: renders (evidence: `app/layouts/default.vue`)
- Site layout → Cart drawer: renders (evidence: `app/layouts/default.vue`)
- Site layout → Cart fly effect: renders (evidence: `app/layouts/default.vue`)
- Sitemap URLs → KWS CRM API: loads product slugs (evidence: `server/api/__sitemap__/urls.ts`)
- Visitor → About page: visits
- Visitor → Socials page: visits
