# nana-779/monokeys-frontend architecture

> Architecture diagram of the GitHub repository nana-779/monokeys-frontend, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nana-779/monokeys-frontend
- Repository: https://github.com/nana-779/monokeys-frontend

## Overview

MONO / KEYS is a Next.js storefront UI replica for reviewing shopping screens and navigation locally; it is not a fully wired commerce system. The main journey is browsing products, assembling a custom keyboard or cart, then visiting checkout and order-result screens. Separate branches cover account management, reviews, and admin product screens. Product APIs connect to a Spring Boot backend, while the README says several other flows—including login, cart persistence, order submission, and admin authorization—remain unconnected. Relationships below are limited to README statements and sampled-source references.

Main entry points: [`src/features/products/api.ts`](https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/products/api.ts) (Product API), [`src/app/(frontend)/custom/page.tsx`](https://github.com/nana-779/monokeys-frontend/blob/develop/src/app/(frontend)/custom/page.tsx) (Custom builder), [`src/app/(frontend)/checkout/page.tsx`](https://github.com/nana-779/monokeys-frontend/blob/develop/src/app/(frontend)/checkout/page.tsx) (Checkout screens), [`src/app/(frontend)/mypage/profile/page.tsx`](https://github.com/nana-779/monokeys-frontend/blob/develop/src/app/(frontend)/mypage/profile/page.tsx) (Profile screens)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_home["Home page<br/>[page.tsx]"]
  node_catalog["Product catalog<br/>[product-grid.tsx]"]
  node_product_api["Product API<br/>[api.ts]"]
  node_product_detail["Product detail"]
  node_custom_builder["Custom builder<br/>[page.tsx]"]
  node_build_api["Build recommendations<br/>[builds-api.ts]"]
end

subgraph group_commerce["Commerce"]
  node_cart["Cart state and UI<br/>[cart-provider.tsx]"]
  node_checkout["Checkout screens<br/>[page.tsx]"]
  node_checkout_api["Checkout API<br/>[api.ts]"]
  node_payment_flow["Payment flow"]
  node_refund_flow["Refund workflow"]
  node_orders["Order history<br/>[my-order-list.tsx]"]
end

subgraph group_account["Account"]
  node_auth["Authentication API<br/>[api.ts]"]
  node_account_api["Account API<br/>[api.ts]"]
  node_signup["Signup screens<br/>[page.tsx]"]
  node_profile["Profile screens<br/>[page.tsx]"]
end

subgraph group_operations["Reviews and admin"]
  node_reviews["Review features<br/>[api.ts]"]
  node_review_editor["Review editor"]
  node_admin["Admin products"]
  node_admin_api["Admin API<br/>[api.ts]"]
end

subgraph group_shared["Shared runtime"]
  node_shell["Store shell<br/>[store-shell.tsx]"]
  node_http["HTTP request client<br/>[api-client.ts]"]
end

node_shopper(("Shopper"))
node_backend{{"Spring Boot API"}}

node_shopper -->|"browses"| node_home
node_shopper -->|"browses"| node_catalog
node_shopper -->|"configures"| node_custom_builder
node_shopper -->|"visits"| node_checkout
node_shopper -->|"visits"| node_signup
node_shopper -->|"manages account"| node_profile
node_shopper -->|"views preview"| node_admin
node_home -->|"loads products"| node_product_api
node_catalog -->|"loads products"| node_product_api
node_product_detail -->|"loads product"| node_product_api
node_product_api -->|"requests through"| node_http
node_product_api -->|"fetches products"| node_backend
node_custom_builder -->|"loads catalog"| node_product_api
node_custom_builder -->|"requests recommendations"| node_build_api
node_custom_builder -.->|"adds build"| node_cart
node_shell -->|"calls login"| node_auth
node_shell -->|"uses cart state"| node_cart
node_signup -->|"uses account API"| node_account_api
node_profile -->|"uses session API"| node_auth
node_profile -->|"uses account API"| node_account_api
node_checkout -->|"uses checkout API"| node_checkout_api
node_checkout_api -->|"requests through"| node_http
node_checkout -.->|"initiates payment"| node_payment_flow
node_payment_flow -.->|"confirms payment"| node_backend
node_checkout -.->|"offers refunds"| node_refund_flow
node_orders -->|"loads review status"| node_reviews
node_review_editor -->|"submits reviews"| node_reviews
node_reviews -->|"requests through"| node_http
node_admin -.->|"uses admin API"| node_admin_api

click node_home "https://github.com/nana-779/monokeys-frontend/blob/develop/src/app/(frontend)/page.tsx"
click node_catalog "https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/products/product-grid.tsx"
click node_product_api "https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/products/api.ts"
click node_product_detail "https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/products/product-detail-view.tsx"
click node_custom_builder "https://github.com/nana-779/monokeys-frontend/blob/develop/src/app/(frontend)/custom/page.tsx"
click node_build_api "https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/products/builds-api.ts"
click node_cart "https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/cart/cart-provider.tsx"
click node_checkout "https://github.com/nana-779/monokeys-frontend/blob/develop/src/app/(frontend)/checkout/page.tsx"
click node_checkout_api "https://github.com/nana-779/monokeys-frontend/blob/develop/src/app/(frontend)/checkout/api.ts"
click node_payment_flow "https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/payments/payment-result-flow.ts"
click node_refund_flow "https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/payments/refund-workflow.tsx"
click node_orders "https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/orders/my-order-list.tsx"
click node_auth "https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/auth/api.ts"
click node_account_api "https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/user/api.ts"
click node_signup "https://github.com/nana-779/monokeys-frontend/blob/develop/src/app/(frontend)/signup/page.tsx"
click node_profile "https://github.com/nana-779/monokeys-frontend/blob/develop/src/app/(frontend)/mypage/profile/page.tsx"
click node_reviews "https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/reviews/api.ts"
click node_review_editor "https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/reviews/review-editor-modal.tsx"
click node_admin "https://github.com/nana-779/monokeys-frontend/blob/develop/src/app/(admin)/admin/products/admin-dashboard.tsx"
click node_admin_api "https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/admin/api.ts"
click node_shell "https://github.com/nana-779/monokeys-frontend/blob/develop/src/components/store-shell.tsx"
click node_http "https://github.com/nana-779/monokeys-frontend/blob/develop/src/lib/api-client.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_catalog,node_product_api,node_product_detail,node_custom_builder,node_build_api toneBlue
class node_cart,node_checkout,node_checkout_api,node_payment_flow,node_refund_flow,node_orders toneAmber
class node_auth,node_account_api,node_signup,node_profile,node_backend toneMint
class node_reviews,node_review_editor,node_admin,node_admin_api toneRose
class node_shell,node_http,node_shopper toneIndigo
```

## Components

### Storefront

- [Home page](https://github.com/nana-779/monokeys-frontend/blob/develop/src/app/(frontend)/page.tsx): `src/app/(frontend)/page.tsx`
- [Product catalog](https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/products/product-grid.tsx): `src/features/products/product-grid.tsx`
- [Product API](https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/products/api.ts): `src/features/products/api.ts`
- [Product detail](https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/products/product-detail-view.tsx): `src/features/products/product-detail-view.tsx`
- [Custom builder](https://github.com/nana-779/monokeys-frontend/blob/develop/src/app/(frontend)/custom/page.tsx): `src/app/(frontend)/custom/page.tsx`
- [Build recommendations](https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/products/builds-api.ts): `src/features/products/builds-api.ts`

### Commerce

- [Cart state and UI](https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/cart/cart-provider.tsx): `src/features/cart/cart-provider.tsx`
- [Checkout screens](https://github.com/nana-779/monokeys-frontend/blob/develop/src/app/(frontend)/checkout/page.tsx): `src/app/(frontend)/checkout/page.tsx`
- [Checkout API](https://github.com/nana-779/monokeys-frontend/blob/develop/src/app/(frontend)/checkout/api.ts): `src/app/(frontend)/checkout/api.ts`
- [Payment flow](https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/payments/payment-result-flow.ts): `src/features/payments/payment-result-flow.ts`
- [Refund workflow](https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/payments/refund-workflow.tsx): `src/features/payments/refund-workflow.tsx`
- [Order history](https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/orders/my-order-list.tsx): `src/features/orders/my-order-list.tsx`

### Account

- [Authentication API](https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/auth/api.ts): `src/features/auth/api.ts`
- [Account API](https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/user/api.ts): `src/features/user/api.ts`
- [Signup screens](https://github.com/nana-779/monokeys-frontend/blob/develop/src/app/(frontend)/signup/page.tsx): `src/app/(frontend)/signup/page.tsx`
- [Profile screens](https://github.com/nana-779/monokeys-frontend/blob/develop/src/app/(frontend)/mypage/profile/page.tsx): `src/app/(frontend)/mypage/profile/page.tsx`

### Reviews and admin

- [Review features](https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/reviews/api.ts): `src/features/reviews/api.ts`
- [Review editor](https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/reviews/review-editor-modal.tsx): `src/features/reviews/review-editor-modal.tsx`
- [Admin products](https://github.com/nana-779/monokeys-frontend/blob/develop/src/app/(admin)/admin/products/admin-dashboard.tsx): `src/app/(admin)/admin/products/admin-dashboard.tsx`
- [Admin API](https://github.com/nana-779/monokeys-frontend/blob/develop/src/features/admin/api.ts): `src/features/admin/api.ts`

### Shared runtime

- [Store shell](https://github.com/nana-779/monokeys-frontend/blob/develop/src/components/store-shell.tsx): `src/components/store-shell.tsx`
- [HTTP request client](https://github.com/nana-779/monokeys-frontend/blob/develop/src/lib/api-client.ts): `src/lib/api-client.ts`

### Other components

- **Shopper**
- **Spring Boot API**

## Connections

- Shopper → Home page: browses (evidence: `README.md`)
- Shopper → Product catalog: browses (evidence: `README.md`)
- Shopper → Custom builder: configures (evidence: `README.md`)
- Shopper → Checkout screens: visits (evidence: `README.md`)
- Shopper → Signup screens: visits (evidence: `README.md`)
- Shopper → Profile screens: manages account (evidence: `README.md`)
- Shopper → Admin products: views preview (evidence: `README.md`)
- Home page → Product API: loads products (evidence: `src/app/(frontend)/page.tsx`)
- Product catalog → Product API: loads products (evidence: `README.md`)
- Product detail → Product API: loads product (evidence: `README.md`)
- Product API → HTTP request client: requests through (evidence: `src/features/products/api.ts`)
- Product API → Spring Boot API: fetches products (evidence: `README.md`)
- Custom builder → Product API: loads catalog (evidence: `src/app/(frontend)/custom/page.tsx`)
- Custom builder → Build recommendations: requests recommendations (evidence: `src/app/(frontend)/custom/page.tsx`)
- Custom builder → Cart state and UI: adds build (evidence: `src/app/(frontend)/custom/page.tsx`)
- Store shell → Authentication API: calls login (evidence: `src/components/store-shell.tsx`)
- Store shell → Cart state and UI: uses cart state (evidence: `src/components/store-shell.tsx`)
- Signup screens → Account API: uses account API (evidence: `src/app/(frontend)/signup/page.tsx`)
- Profile screens → Authentication API: uses session API (evidence: `src/app/(frontend)/mypage/profile/page.tsx`)
- Profile screens → Account API: uses account API (evidence: `src/app/(frontend)/mypage/profile/page.tsx`)
- Checkout screens → Checkout API: uses checkout API (evidence: `src/app/(frontend)/checkout/api.ts`)
- Checkout API → HTTP request client: requests through (evidence: `src/app/(frontend)/checkout/api.ts`)
- Checkout screens → Payment flow: initiates payment
- Payment flow → Spring Boot API: confirms payment
- Checkout screens → Refund workflow: offers refunds
- Order history → Review features: loads review status
- Review editor → Review features: submits reviews (evidence: `src/features/reviews/review-editor-modal.tsx`)
- Review features → HTTP request client: requests through (evidence: `src/features/reviews/api.ts`)
- Admin products → Admin API: uses admin API
