# 123onlywork/stroymat_map_front architecture

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

- Interactive diagram: https://gitdiagram.com/123onlywork/stroymat_map_front
- Repository: https://github.com/123onlywork/stroymat_map_front

## Overview

Stroymat is a Next.js commerce application: customers discover products, authenticate, manage a cart and favorites, place orders, and leave reviews; administrators manage catalog data, orders, and reviews. The graph separates storefront stages, admin operations, authentication, and the shared service/state layer. Several routes and payment-related flows are visible only in the file tree, so their internal call relationships are omitted; edges use only relationships evidenced by sampled source or the source index.

Main entry points: [`src/api/api.interceptor.ts`](https://github.com/123onlywork/stroymat_map_front/blob/main/src/api/api.interceptor.ts) (HTTP Client), [`src/app/(customer)/auth/Auth.tsx`](https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/(customer)/auth/Auth.tsx) (Sign In / Register), [`src/app/(customer)/checkout/Checkout.tsx`](https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/(customer)/checkout/Checkout.tsx) (Checkout), [`src/services/auth/auth.service.ts`](https://github.com/123onlywork/stroymat_map_front/blob/main/src/services/auth/auth.service.ts) (Authentication Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_home["Home<br/>[Home.tsx]"]
  node_product_discovery["Product Discovery"]
  node_category_page["Category Page<br/>[page.tsx]"]
  node_product_detail["Product Detail<br/>[Product.tsx]"]
  node_reviews["Product Reviews<br/>[ProductReviews.tsx]"]
end

subgraph group_commerce["Customer Commerce"]
  node_cart["Cart<br/>[HeaderCart.tsx]"]
  node_checkout["Checkout<br/>[Checkout.tsx]"]
  node_favorites["Favorites<br/>[Favorites.tsx]"]
  node_orders["My Orders<br/>[MyOrders.tsx]"]
end

subgraph group_admin["Administration"]
  node_admin_dashboard["Admin Dashboard<br/>[Dashboard.tsx]"]
  node_admin_categories["Category Management"]
  node_admin_products["Product Management"]
  node_admin_orders["Order Management<br/>[useAdminOrders.ts]"]
  node_admin_reviews["Review Management<br/>[useAdminReviews.ts]"]
end

subgraph group_identity["Authentication"]
  node_auth_ui["Sign In / Register<br/>[Auth.tsx]"]
  node_auth_guard["Route Guard<br/>[AuthProvider.tsx]"]
end

subgraph group_core["Services and State"]
  node_payment["Payment Service<br/>[payment.service.ts]"]
  node_auth_service["Authentication Service<br/>[auth.service.ts]"]
  node_api["HTTP Client<br/>[api.interceptor.ts]"]
  node_product_service["Product Service<br/>[product.service.ts]"]
  node_category_service["Category Service"]
  node_order_service["Order Service<br/>[order.service.ts]"]
  node_review_service["Review Service<br/>[review.service.ts]"]
  node_state[("Application State<br/>[store.ts]")]
end

node_customer(("Customer"))
node_external_api(("Commerce API"))

node_customer -->|"opens"| node_home
node_customer -->|"browses"| node_product_discovery
node_customer -->|"views"| node_product_detail
node_customer -->|"authenticates"| node_auth_ui
node_customer -->|"manages"| node_cart
node_customer -->|"checks out"| node_checkout
node_customer -->|"saves items"| node_favorites
node_customer -->|"tracks"| node_orders
node_customer -->|"reviews"| node_reviews
node_product_discovery -->|"reads filters"| node_state
node_auth_guard -->|"renders"| node_auth_ui
node_auth_guard -->|"dispatches actions"| node_state
node_auth_ui -->|"dispatches actions"| node_state
node_auth_ui -.-> node_auth_service
node_auth_service -->|"sends requests"| node_api
node_api -->|"refreshes tokens"| node_auth_service
node_admin_categories -->|"requests categories"| node_category_service
node_admin_reviews -->|"loads reviews"| node_review_service
node_product_service -->|"sends requests"| node_api
node_category_service -->|"sends requests"| node_api
node_order_service -->|"sends requests"| node_api
node_review_service -->|"sends requests"| node_api
node_api -.->|"sends HTTP requests"| node_external_api
node_checkout -.-> node_payment
node_checkout -.-> node_order_service
node_admin_products -.-> node_product_service
node_admin_orders -.-> node_order_service
node_admin_reviews -->|"loads reviews"| node_review_service

click node_home "https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/Home.tsx"
click node_product_discovery "https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/explorer/ProductExplorer.tsx"
click node_category_page "https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/category/%5Bslug%5D/page.tsx"
click node_product_detail "https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/product/%5Bslug%5D/Product.tsx"
click node_reviews "https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/product/%5Bslug%5D/product-reviews/ProductReviews.tsx"
click node_cart "https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/layout/header/cart/HeaderCart.tsx"
click node_checkout "https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/(customer)/checkout/Checkout.tsx"
click node_favorites "https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/(customer)/favorites/Favorites.tsx"
click node_orders "https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/(customer)/my-orders/MyOrders.tsx"
click node_payment "https://github.com/123onlywork/stroymat_map_front/blob/main/src/services/payment.service.ts"
click node_admin_dashboard "https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/admin/Dashboard.tsx"
click node_admin_categories "https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/admin/categories/useAdminCategories.ts"
click node_admin_products "https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/admin/products/useAdminProducts.ts"
click node_admin_orders "https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/admin/orders/useAdminOrders.ts"
click node_admin_reviews "https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/admin/reviews/useAdminReviews.ts"
click node_auth_ui "https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/(customer)/auth/Auth.tsx"
click node_auth_guard "https://github.com/123onlywork/stroymat_map_front/blob/main/src/providers/auth-provider/AuthProvider.tsx"
click node_auth_service "https://github.com/123onlywork/stroymat_map_front/blob/main/src/services/auth/auth.service.ts"
click node_api "https://github.com/123onlywork/stroymat_map_front/blob/main/src/api/api.interceptor.ts"
click node_product_service "https://github.com/123onlywork/stroymat_map_front/blob/main/src/services/product/product.service.ts"
click node_category_service "https://github.com/123onlywork/stroymat_map_front/blob/main/src/services/category.service.ts"
click node_order_service "https://github.com/123onlywork/stroymat_map_front/blob/main/src/services/order.service.ts"
click node_review_service "https://github.com/123onlywork/stroymat_map_front/blob/main/src/services/review.service.ts"
click node_state "https://github.com/123onlywork/stroymat_map_front/blob/main/src/store/store.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_product_discovery,node_category_page,node_product_detail,node_reviews toneBlue
class node_cart,node_checkout,node_favorites,node_orders toneAmber
class node_admin_dashboard,node_admin_categories,node_admin_products,node_admin_orders,node_admin_reviews,node_external_api toneMint
class node_auth_ui,node_auth_guard toneRose
class node_payment,node_auth_service,node_api,node_product_service,node_category_service,node_order_service,node_review_service,node_state,node_customer toneIndigo
```

## Components

### Storefront

- [Home](https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/Home.tsx): `src/app/Home.tsx`
- [Product Discovery](https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/explorer/ProductExplorer.tsx): `src/app/explorer/ProductExplorer.tsx`
- [Category Page](https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/category/%5Bslug%5D/page.tsx): `src/app/category/[slug]/page.tsx`
- [Product Detail](https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/product/%5Bslug%5D/Product.tsx): `src/app/product/[slug]/Product.tsx`
- [Product Reviews](https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/product/%5Bslug%5D/product-reviews/ProductReviews.tsx): `src/app/product/[slug]/product-reviews/ProductReviews.tsx`

### Customer Commerce

- [Cart](https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/layout/header/cart/HeaderCart.tsx): `src/app/layout/header/cart/HeaderCart.tsx`
- [Checkout](https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/(customer)/checkout/Checkout.tsx): `src/app/(customer)/checkout/Checkout.tsx`
- [Favorites](https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/(customer)/favorites/Favorites.tsx): `src/app/(customer)/favorites/Favorites.tsx`
- [My Orders](https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/(customer)/my-orders/MyOrders.tsx): `src/app/(customer)/my-orders/MyOrders.tsx`

### Administration

- [Admin Dashboard](https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/admin/Dashboard.tsx): `src/app/admin/Dashboard.tsx`
- [Category Management](https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/admin/categories/useAdminCategories.ts): `src/app/admin/categories/useAdminCategories.ts`
- [Product Management](https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/admin/products/useAdminProducts.ts): `src/app/admin/products/useAdminProducts.ts`
- [Order Management](https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/admin/orders/useAdminOrders.ts): `src/app/admin/orders/useAdminOrders.ts`
- [Review Management](https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/admin/reviews/useAdminReviews.ts): `src/app/admin/reviews/useAdminReviews.ts`

### Authentication

- [Sign In / Register](https://github.com/123onlywork/stroymat_map_front/blob/main/src/app/(customer)/auth/Auth.tsx): `src/app/(customer)/auth/Auth.tsx`
- [Route Guard](https://github.com/123onlywork/stroymat_map_front/blob/main/src/providers/auth-provider/AuthProvider.tsx): `src/providers/auth-provider/AuthProvider.tsx`

### Services and State

- [Payment Service](https://github.com/123onlywork/stroymat_map_front/blob/main/src/services/payment.service.ts): `src/services/payment.service.ts`
- [Authentication Service](https://github.com/123onlywork/stroymat_map_front/blob/main/src/services/auth/auth.service.ts): `src/services/auth/auth.service.ts`
- [HTTP Client](https://github.com/123onlywork/stroymat_map_front/blob/main/src/api/api.interceptor.ts): `src/api/api.interceptor.ts`
- [Product Service](https://github.com/123onlywork/stroymat_map_front/blob/main/src/services/product/product.service.ts): `src/services/product/product.service.ts`
- [Category Service](https://github.com/123onlywork/stroymat_map_front/blob/main/src/services/category.service.ts): `src/services/category.service.ts`
- [Order Service](https://github.com/123onlywork/stroymat_map_front/blob/main/src/services/order.service.ts): `src/services/order.service.ts`
- [Review Service](https://github.com/123onlywork/stroymat_map_front/blob/main/src/services/review.service.ts): `src/services/review.service.ts`
- [Application State](https://github.com/123onlywork/stroymat_map_front/blob/main/src/store/store.ts): `src/store/store.ts`

### Other components

- **Customer**
- **Commerce API**

## Connections

- Customer → Home: opens
- Customer → Product Discovery: browses
- Customer → Product Detail: views
- Customer → Sign In / Register: authenticates
- Customer → Cart: manages
- Customer → Checkout: checks out
- Customer → Favorites: saves items
- Customer → My Orders: tracks
- Customer → Product Reviews: reviews
- Product Discovery → Application State: reads filters
- Route Guard → Sign In / Register: renders (evidence: `src/providers/auth-provider/AuthProvider.tsx`)
- Route Guard → Application State: dispatches actions (evidence: `src/providers/auth-provider/AuthProvider.tsx`)
- Sign In / Register → Application State: dispatches actions (evidence: `src/app/(customer)/auth/Auth.tsx`)
- Sign In / Register → Authentication Service
- Authentication Service → HTTP Client: sends requests (evidence: `src/services/auth/auth.service.ts`)
- HTTP Client → Authentication Service: refreshes tokens (evidence: `src/api/api.interceptor.ts`)
- Category Management → Category Service: requests categories (evidence: `src/app/admin/categories/useAdminCategories.ts`)
- Review Management → Review Service: loads reviews (evidence: `src/app/admin/reviews/useAdminReviews.ts`)
- Product Service → HTTP Client: sends requests (evidence: `src/services/product/product.service.ts`)
- Category Service → HTTP Client: sends requests (evidence: `src/services/category.service.ts`)
- Order Service → HTTP Client: sends requests (evidence: `src/services/order.service.ts`)
- Review Service → HTTP Client: sends requests (evidence: `src/services/review.service.ts`)
- HTTP Client → Commerce API: sends HTTP requests
- Checkout → Payment Service
- Checkout → Order Service
- Product Management → Product Service (evidence: `src/app/admin/products/useAdminProducts.ts`)
- Order Management → Order Service (evidence: `src/app/admin/orders/useAdminOrders.ts`)
- Review Management → Review Service: loads reviews (evidence: `src/app/admin/reviews/useAdminReviews.ts`)
