# minkhantkyaw-design/coffeeshopsample architecture

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

- Interactive diagram: https://gitdiagram.com/minkhantkyaw-design/coffeeshopsample
- Repository: https://github.com/minkhantkyaw-design/coffeeshopsample

## Overview

Bean & Bloom is a coffee-shop management app: guests browse and search coffee, customers authenticate and place counter-pickup orders, and sales staff manage coffee inventory and progress orders. The React UI calls the ASP.NET API through Vite’s documented /api proxy; the API applies role and order rules and persists users, coffees, and orders in SQL Server. The main workflow and key management branches are documented, but excerpts do not show all route definitions or frontend API helpers, so those internal links are omitted where unverified.

Main entry points: [`backend/Program.cs`](https://github.com/minkhantkyaw-design/coffeeshopsample/blob/main/backend/Program.cs) (HTTP API), [`backend/Models.cs`](https://github.com/minkhantkyaw-design/coffeeshopsample/blob/main/backend/Models.cs) (Domain entities), [`frontend/src/main.jsx`](https://github.com/minkhantkyaw-design/coffeeshopsample/blob/main/frontend/src/main.jsx) (Shop interface), [`frontend/vite.config.js`](https://github.com/minkhantkyaw-design/coffeeshopsample/blob/main/frontend/vite.config.js) (API proxy)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Customer and sales UI"]
  node_app["Shop interface<br/>[main.jsx]"]
  node_proxy["API proxy<br/>[vite.config.js]"]
end

subgraph group_api["API and business rules"]
  node_routes["HTTP API<br/>[Program.cs]"]
  node_auth["Accounts and sessions<br/>[Program.cs]"]
  node_menu["Coffee catalog<br/>[Program.cs]"]
  node_ordering["Order and stock rules<br/>[Program.cs]"]
  node_status["Order progression<br/>[Program.cs]"]
end

subgraph group_data["Persistent data"]
  node_models["Domain entities<br/>[Models.cs]"]
  node_database[("SQL Server database")]
end

node_guest(("Guest or user"))

node_guest -->|"uses"| node_app
node_app -.->|"requests /api"| node_proxy
node_proxy -->|"forwards /api"| node_routes
node_app -->|"loads and orders"| node_routes
node_routes -->|"routes auth"| node_auth
node_routes -->|"routes catalog"| node_menu
node_routes -->|"routes purchases"| node_ordering
node_routes -->|"routes updates"| node_status
node_auth -->|"uses users"| node_models
node_menu -->|"uses coffees"| node_models
node_ordering -->|"uses orders"| node_models
node_status -->|"updates orders"| node_models
node_models -->|"maps entities"| node_database
node_routes -->|"initializes and seeds"| node_database

click node_app "https://github.com/minkhantkyaw-design/coffeeshopsample/blob/main/frontend/src/main.jsx"
click node_proxy "https://github.com/minkhantkyaw-design/coffeeshopsample/blob/main/frontend/vite.config.js"
click node_routes "https://github.com/minkhantkyaw-design/coffeeshopsample/blob/main/backend/Program.cs"
click node_auth "https://github.com/minkhantkyaw-design/coffeeshopsample/blob/main/backend/Program.cs"
click node_menu "https://github.com/minkhantkyaw-design/coffeeshopsample/blob/main/backend/Program.cs"
click node_ordering "https://github.com/minkhantkyaw-design/coffeeshopsample/blob/main/backend/Program.cs"
click node_status "https://github.com/minkhantkyaw-design/coffeeshopsample/blob/main/backend/Program.cs"
click node_models "https://github.com/minkhantkyaw-design/coffeeshopsample/blob/main/backend/Models.cs"

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_app,node_proxy,node_guest toneBlue
class node_routes,node_auth,node_menu,node_ordering,node_status toneAmber
class node_models,node_database toneMint
```

## Components

### Customer and sales UI

- [Shop interface](https://github.com/minkhantkyaw-design/coffeeshopsample/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`
- [API proxy](https://github.com/minkhantkyaw-design/coffeeshopsample/blob/main/frontend/vite.config.js): `frontend/vite.config.js`

### API and business rules

- [HTTP API](https://github.com/minkhantkyaw-design/coffeeshopsample/blob/main/backend/Program.cs): `backend/Program.cs`
- [Accounts and sessions](https://github.com/minkhantkyaw-design/coffeeshopsample/blob/main/backend/Program.cs): `backend/Program.cs`
- [Coffee catalog](https://github.com/minkhantkyaw-design/coffeeshopsample/blob/main/backend/Program.cs): `backend/Program.cs`
- [Order and stock rules](https://github.com/minkhantkyaw-design/coffeeshopsample/blob/main/backend/Program.cs): `backend/Program.cs`
- [Order progression](https://github.com/minkhantkyaw-design/coffeeshopsample/blob/main/backend/Program.cs): `backend/Program.cs`

### Persistent data

- [Domain entities](https://github.com/minkhantkyaw-design/coffeeshopsample/blob/main/backend/Models.cs): `backend/Models.cs`
- **SQL Server database**

### Other components

- **Guest or user**

## Connections

- Guest or user → Shop interface: uses (evidence: `README.md`)
- Shop interface → API proxy: requests /api (evidence: `README.md`)
- API proxy → HTTP API: forwards /api (evidence: `README.md`)
- Shop interface → HTTP API: loads and orders (evidence: `frontend/src/main.jsx`)
- HTTP API → Accounts and sessions: routes auth (evidence: `backend/Program.cs`)
- HTTP API → Coffee catalog: routes catalog (evidence: `backend/Program.cs`)
- HTTP API → Order and stock rules: routes purchases (evidence: `backend/Program.cs`)
- HTTP API → Order progression: routes updates (evidence: `backend/Program.cs`)
- Accounts and sessions → Domain entities: uses users (evidence: `backend/Program.cs`)
- Coffee catalog → Domain entities: uses coffees (evidence: `backend/Program.cs`)
- Order and stock rules → Domain entities: uses orders (evidence: `backend/Program.cs`)
- Order progression → Domain entities: updates orders (evidence: `backend/Program.cs`)
- Domain entities → SQL Server database: maps entities (evidence: `backend/Models.cs`)
- HTTP API → SQL Server database: initializes and seeds (evidence: `backend/Program.cs`)
