# gghosttttt/cafe-spring-front architecture

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

- Interactive diagram: https://gitdiagram.com/gghosttttt/cafe-spring-front
- Repository: https://github.com/gghosttttt/cafe-spring-front

## Overview

cafe-front is a Vue-based café administration frontend. An administrator enters through login, then uses the routed dashboard, product/category management, and order workflows; views delegate data operations to Pinia stores, which use a shared Axios client to communicate with the backend. The README describes only a starter template, so product capabilities are inferred from the routed views and source index. Unsampled view and component relationships are included only where the source index names them; other uncertain connections are omitted.

Main entry points: [`src/index.js`](https://github.com/gghosttttt/cafe-spring-front/blob/main/src/index.js) (Route table), [`src/stores/productStore.js`](https://github.com/gghosttttt/cafe-spring-front/blob/main/src/stores/productStore.js) (Product state), [`src/views/Product.jsx`](https://github.com/gghosttttt/cafe-spring-front/blob/main/src/views/Product.jsx) (Product management), [`src/stores/authStore.js`](https://github.com/gghosttttt/cafe-spring-front/blob/main/src/stores/authStore.js) (Authentication state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App shell"]
  node_router["Route table<br/>[index.js]"]
  node_app["App shell<br/>[App.jsx]"]
  node_sidebar["Sidebar<br/>[Sidebar.jsx]"]
  node_header["Header<br/>[Header.jsx]"]
end

subgraph group_operations["Admin workflows"]
  node_login["Login<br/>[Login.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_dashboard_widgets["Dashboard widgets"]
  node_products["Product management<br/>[Product.jsx]"]
  node_product_detail["Product editor<br/>[ProductDetail.jsx]"]
  node_product_card["Product card<br/>[ProductCard.jsx]"]
  node_category_list["Category list<br/>[CategoryList.jsx]"]
  node_category_modal["Category modal<br/>[CategoryModal.jsx]"]
  node_orders["Order workflow<br/>[Order.jsx]"]
  node_order_detail["Order history<br/>[OrderDetail.jsx]"]
  node_button["Global button<br/>[BtnGlobal.jsx]"]
end

subgraph group_state["Client state"]
  node_auth_store["Authentication state<br/>[authStore.js]"]
  node_product_store["Product state<br/>[productStore.js]"]
  node_category_store["Category state<br/>[categoryStore.js]"]
  node_order_store["Order state<br/>[orderStore.js]"]
end

subgraph group_services["API and feedback"]
  node_api_client["HTTP client<br/>[api.js]"]
  node_notifications["Notifications<br/>[notyfStore.js]"]
end

node_administrator(("Administrator"))
node_backend{{"Café API"}}

node_administrator -->|"opens pages"| node_router
node_router -->|"routes to"| node_login
node_router -->|"routes to"| node_dashboard
node_router -->|"routes to"| node_products
node_router -->|"routes to"| node_product_detail
node_router -->|"routes to"| node_orders
node_router -->|"routes to"| node_order_detail
node_app -->|"renders routes"| node_router
node_app -->|"renders"| node_sidebar
node_app -->|"renders"| node_header
node_sidebar -->|"uses"| node_auth_store
node_login -->|"authenticates"| node_auth_store
node_login -->|"reports status"| node_notifications
node_login -->|"renders"| node_button
node_dashboard -->|"renders"| node_dashboard_widgets
node_products -->|"renders"| node_product_card
node_products -->|"renders"| node_category_list
node_products -->|"renders"| node_category_modal
node_products -->|"uses"| node_product_store
node_products -->|"uses"| node_category_store
node_product_card -->|"uses"| node_product_store
node_category_list -->|"uses"| node_category_store
node_category_list -->|"renders"| node_category_modal
node_category_modal -->|"renders"| node_button
node_product_detail -->|"edits"| node_product_store
node_product_detail -->|"loads categories"| node_category_store
node_product_detail -->|"loads token"| node_auth_store
node_product_detail -->|"renders"| node_button
node_orders -->|"uses"| node_product_store
node_orders -->|"uses"| node_auth_store
node_orders -->|"manages orders"| node_order_store
node_orders -->|"renders"| node_button
node_order_detail -->|"uses"| node_product_store
node_order_detail -->|"loads token"| node_auth_store
node_order_detail -->|"loads history"| node_order_store
node_order_detail -->|"renders"| node_button
node_auth_store -->|"calls"| node_api_client
node_product_store -->|"calls"| node_api_client
node_category_store -->|"calls"| node_api_client
node_order_store -->|"calls"| node_api_client
node_category_store -->|"reports results"| node_notifications
node_product_store -->|"reports results"| node_notifications
node_order_store -->|"reports results"| node_notifications
node_api_client -->|"sends requests"| node_backend

click node_router "https://github.com/gghosttttt/cafe-spring-front/blob/main/src/index.js"
click node_app "https://github.com/gghosttttt/cafe-spring-front/blob/main/src/App.jsx"
click node_sidebar "https://github.com/gghosttttt/cafe-spring-front/blob/main/src/components/global/Sidebar.jsx"
click node_header "https://github.com/gghosttttt/cafe-spring-front/blob/main/src/components/global/Header.jsx"
click node_login "https://github.com/gghosttttt/cafe-spring-front/blob/main/src/views/Login.jsx"
click node_dashboard "https://github.com/gghosttttt/cafe-spring-front/blob/main/src/views/Dashboard.jsx"
click node_dashboard_widgets "https://github.com/gghosttttt/cafe-spring-front/tree/main/src/components/dashboard"
click node_products "https://github.com/gghosttttt/cafe-spring-front/blob/main/src/views/Product.jsx"
click node_product_detail "https://github.com/gghosttttt/cafe-spring-front/blob/main/src/views/ProductDetail.jsx"
click node_product_card "https://github.com/gghosttttt/cafe-spring-front/blob/main/src/components/product/ProductCard.jsx"
click node_category_list "https://github.com/gghosttttt/cafe-spring-front/blob/main/src/components/product/CategoryList.jsx"
click node_category_modal "https://github.com/gghosttttt/cafe-spring-front/blob/main/src/components/product/CategoryModal.jsx"
click node_orders "https://github.com/gghosttttt/cafe-spring-front/blob/main/src/views/Order.jsx"
click node_order_detail "https://github.com/gghosttttt/cafe-spring-front/blob/main/src/views/OrderDetail.jsx"
click node_button "https://github.com/gghosttttt/cafe-spring-front/blob/main/src/components/global/BtnGlobal.jsx"
click node_auth_store "https://github.com/gghosttttt/cafe-spring-front/blob/main/src/stores/authStore.js"
click node_product_store "https://github.com/gghosttttt/cafe-spring-front/blob/main/src/stores/productStore.js"
click node_category_store "https://github.com/gghosttttt/cafe-spring-front/blob/main/src/stores/categoryStore.js"
click node_order_store "https://github.com/gghosttttt/cafe-spring-front/blob/main/src/stores/orderStore.js"
click node_api_client "https://github.com/gghosttttt/cafe-spring-front/blob/main/src/services/api.js"
click node_notifications "https://github.com/gghosttttt/cafe-spring-front/blob/main/src/stores/notyfStore.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_router,node_app,node_sidebar,node_header toneBlue
class node_login,node_dashboard,node_dashboard_widgets,node_products,node_product_detail,node_product_card,node_category_list,node_category_modal,node_orders,node_order_detail,node_button toneAmber
class node_auth_store,node_product_store,node_category_store,node_order_store,node_backend toneMint
class node_api_client,node_notifications toneRose
class node_administrator toneIndigo
```

## Components

### App shell

- [Route table](https://github.com/gghosttttt/cafe-spring-front/blob/main/src/index.js): `src/index.js`
- [App shell](https://github.com/gghosttttt/cafe-spring-front/blob/main/src/App.jsx): `src/App.jsx`
- [Sidebar](https://github.com/gghosttttt/cafe-spring-front/blob/main/src/components/global/Sidebar.jsx): `src/components/global/Sidebar.jsx`
- [Header](https://github.com/gghosttttt/cafe-spring-front/blob/main/src/components/global/Header.jsx): `src/components/global/Header.jsx`

### Admin workflows

- [Login](https://github.com/gghosttttt/cafe-spring-front/blob/main/src/views/Login.jsx): `src/views/Login.jsx`
- [Dashboard](https://github.com/gghosttttt/cafe-spring-front/blob/main/src/views/Dashboard.jsx): `src/views/Dashboard.jsx`
- [Dashboard widgets](https://github.com/gghosttttt/cafe-spring-front/tree/main/src/components/dashboard): `src/components/dashboard`
- [Product management](https://github.com/gghosttttt/cafe-spring-front/blob/main/src/views/Product.jsx): `src/views/Product.jsx`
- [Product editor](https://github.com/gghosttttt/cafe-spring-front/blob/main/src/views/ProductDetail.jsx): `src/views/ProductDetail.jsx`
- [Product card](https://github.com/gghosttttt/cafe-spring-front/blob/main/src/components/product/ProductCard.jsx): `src/components/product/ProductCard.jsx`
- [Category list](https://github.com/gghosttttt/cafe-spring-front/blob/main/src/components/product/CategoryList.jsx): `src/components/product/CategoryList.jsx`
- [Category modal](https://github.com/gghosttttt/cafe-spring-front/blob/main/src/components/product/CategoryModal.jsx): `src/components/product/CategoryModal.jsx`
- [Order workflow](https://github.com/gghosttttt/cafe-spring-front/blob/main/src/views/Order.jsx): `src/views/Order.jsx`
- [Order history](https://github.com/gghosttttt/cafe-spring-front/blob/main/src/views/OrderDetail.jsx): `src/views/OrderDetail.jsx`
- [Global button](https://github.com/gghosttttt/cafe-spring-front/blob/main/src/components/global/BtnGlobal.jsx): `src/components/global/BtnGlobal.jsx`

### Client state

- [Authentication state](https://github.com/gghosttttt/cafe-spring-front/blob/main/src/stores/authStore.js): `src/stores/authStore.js`
- [Product state](https://github.com/gghosttttt/cafe-spring-front/blob/main/src/stores/productStore.js): `src/stores/productStore.js`
- [Category state](https://github.com/gghosttttt/cafe-spring-front/blob/main/src/stores/categoryStore.js): `src/stores/categoryStore.js`
- [Order state](https://github.com/gghosttttt/cafe-spring-front/blob/main/src/stores/orderStore.js): `src/stores/orderStore.js`

### API and feedback

- [HTTP client](https://github.com/gghosttttt/cafe-spring-front/blob/main/src/services/api.js): `src/services/api.js`
- [Notifications](https://github.com/gghosttttt/cafe-spring-front/blob/main/src/stores/notyfStore.js): `src/stores/notyfStore.js`

### Other components

- **Administrator**
- **Café API**

## Connections

- Administrator → Route table: opens pages (evidence: `src/index.js`)
- Route table → Login: routes to (evidence: `src/index.js`)
- Route table → Dashboard: routes to (evidence: `src/index.js`)
- Route table → Product management: routes to (evidence: `src/index.js`)
- Route table → Product editor: routes to (evidence: `src/index.js`)
- Route table → Order workflow: routes to (evidence: `src/index.js`)
- Route table → Order history: routes to (evidence: `src/index.js`)
- App shell → Route table: renders routes (evidence: `src/App.jsx`)
- App shell → Sidebar: renders (evidence: `src/App.jsx`)
- App shell → Header: renders (evidence: `src/App.jsx`)
- Sidebar → Authentication state: uses (evidence: `src/components/global/Sidebar.jsx`)
- Login → Authentication state: authenticates (evidence: `src/views/Login.jsx`)
- Login → Notifications: reports status (evidence: `src/views/Login.jsx`)
- Login → Global button: renders (evidence: `src/views/Login.jsx`)
- Dashboard → Dashboard widgets: renders (evidence: `src/views/Dashboard.jsx`)
- Product management → Product card: renders (evidence: `src/views/Product.jsx`)
- Product management → Category list: renders (evidence: `src/views/Product.jsx`)
- Product management → Category modal: renders (evidence: `src/views/Product.jsx`)
- Product management → Product state: uses (evidence: `src/views/Product.jsx`)
- Product management → Category state: uses (evidence: `src/views/Product.jsx`)
- Product card → Product state: uses (evidence: `src/components/product/ProductCard.jsx`)
- Category list → Category state: uses (evidence: `src/components/product/CategoryList.jsx`)
- Category list → Category modal: renders (evidence: `src/components/product/CategoryList.jsx`)
- Category modal → Global button: renders (evidence: `src/components/product/CategoryModal.jsx`)
- Product editor → Product state: edits (evidence: `src/views/ProductDetail.jsx`)
- Product editor → Category state: loads categories (evidence: `src/views/ProductDetail.jsx`)
- Product editor → Authentication state: loads token (evidence: `src/views/ProductDetail.jsx`)
- Product editor → Global button: renders (evidence: `src/views/ProductDetail.jsx`)
- Order workflow → Product state: uses (evidence: `src/views/Order.jsx`)
- Order workflow → Authentication state: uses (evidence: `src/views/Order.jsx`)
- Order workflow → Order state: manages orders (evidence: `src/views/Order.jsx`)
- Order workflow → Global button: renders (evidence: `src/views/Order.jsx`)
- Order history → Product state: uses (evidence: `src/views/OrderDetail.jsx`)
- Order history → Authentication state: loads token (evidence: `src/views/OrderDetail.jsx`)
- Order history → Order state: loads history (evidence: `src/views/OrderDetail.jsx`)
- Order history → Global button: renders (evidence: `src/views/OrderDetail.jsx`)
- Authentication state → HTTP client: calls (evidence: `src/stores/authStore.js`)
- Product state → HTTP client: calls (evidence: `src/stores/productStore.js`)
- Category state → HTTP client: calls (evidence: `src/stores/categoryStore.js`)
- Order state → HTTP client: calls (evidence: `src/stores/orderStore.js`)
- Category state → Notifications: reports results (evidence: `src/stores/categoryStore.js`)
- Product state → Notifications: reports results (evidence: `src/stores/productStore.js`)
- Order state → Notifications: reports results (evidence: `src/stores/orderStore.js`)
- HTTP client → Café API: sends requests (evidence: `src/services/api.js`)
