# leonardondev/pizzashop-web architecture

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

- Interactive diagram: https://gitdiagram.com/leonardondev/pizzashop-web
- Repository: https://github.com/leonardondev/pizzashop-web

## Overview

This is a restaurant-management frontend for operators: they sign in or register, then manage orders and inspect restaurant performance. The runtime routes requests through authenticated app or auth layouts; order screens expose status-changing actions and details, while the dashboard presents sales and product metrics. API modules use a shared Axios client, but the backend contract and several screen-to-data connections are not shown, so those links are marked unverified rather than inferred as direct calls. The README is empty.

Main entry points: [`src/routes.tsx`](https://github.com/leonardondev/pizzashop-web/blob/main/src/routes.tsx) (Route dispatch), [`src/lib/axios.ts`](https://github.com/leonardondev/pizzashop-web/blob/main/src/lib/axios.ts) (HTTP client), [`src/api`](https://github.com/leonardondev/pizzashop-web/tree/main/src/api) (Account API), [`src/components/store-profile-dialog.tsx`](https://github.com/leonardondev/pizzashop-web/blob/main/src/components/store-profile-dialog.tsx) (Store profile editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Application shell"]
  node_app["App provider<br/>[App.tsx]"]
  node_router["Route dispatch<br/>[routes.tsx]"]
  node_app_layout["Authenticated layout<br/>[app.tsx]"]
  node_auth_layout["Auth layout<br/>[auth.tsx]"]
end

subgraph group_account["Account access"]
  node_sign_in["Sign in<br/>[sign-in.tsx]"]
  node_sign_up["Restaurant signup<br/>[sign-up.tsx]"]
  node_account_menu["Account menu<br/>[account-menu.tsx]"]
  node_store_profile["Store profile editor"]
end

subgraph group_orders["Order operations"]
  node_orders_page["Orders screen<br/>[orders.tsx]"]
  node_order_row["Order actions"]
  node_order_details["Order details<br/>[order-details.tsx]"]
end

subgraph group_insights["Sales insights"]
  node_dashboard["Dashboard<br/>[dashboard.tsx]"]
  node_metric_cards["Sales metrics"]
  node_charts["Revenue and product charts"]
end

subgraph group_transport["API transport"]
  node_restaurant_api["Restaurant profile API"]
  node_auth_api["Account API"]
  node_order_api["Order API"]
  node_analytics_api["Analytics API"]
  node_axios["HTTP client<br/>[axios.ts]"]
end

node_operator(("Restaurant operator"))
node_backend{{"Restaurant service"}}

node_operator -.->|"opens"| node_app
node_app -->|"provides"| node_router
node_router -->|"routes to"| node_app_layout
node_router -->|"routes to"| node_auth_layout
node_router -->|"routes to"| node_orders_page
node_router -->|"routes to"| node_dashboard
node_router -->|"routes to"| node_sign_in
node_router -->|"routes to"| node_sign_up
node_sign_in -->|"calls"| node_auth_api
node_sign_up -->|"calls"| node_auth_api
node_account_menu -->|"loads profile"| node_restaurant_api
node_account_menu -->|"opens"| node_store_profile
node_store_profile -->|"loads profile"| node_restaurant_api
node_store_profile -->|"updates profile"| node_auth_api
node_orders_page -.->|"renders"| node_order_row
node_order_row -->|"loads and updates"| node_order_api
node_order_row -->|"opens"| node_order_details
node_order_details -->|"loads details"| node_order_api
node_dashboard -.->|"presents"| node_metric_cards
node_dashboard -.->|"presents"| node_charts
node_charts -->|"loads products"| node_analytics_api
node_restaurant_api -->|"uses"| node_axios
node_auth_api -.->|"uses"| node_axios
node_order_api -->|"uses"| node_axios
node_analytics_api -.->|"uses"| node_axios
node_axios -.->|"sends requests"| node_backend

click node_app "https://github.com/leonardondev/pizzashop-web/blob/main/src/App.tsx"
click node_router "https://github.com/leonardondev/pizzashop-web/blob/main/src/routes.tsx"
click node_app_layout "https://github.com/leonardondev/pizzashop-web/blob/main/src/pages/_layouts/app.tsx"
click node_auth_layout "https://github.com/leonardondev/pizzashop-web/blob/main/src/pages/_layouts/auth.tsx"
click node_sign_in "https://github.com/leonardondev/pizzashop-web/blob/main/src/pages/auth/sign-in.tsx"
click node_sign_up "https://github.com/leonardondev/pizzashop-web/blob/main/src/pages/auth/sign-up.tsx"
click node_account_menu "https://github.com/leonardondev/pizzashop-web/blob/main/src/components/account-menu.tsx"
click node_store_profile "https://github.com/leonardondev/pizzashop-web/blob/main/src/components/store-profile-dialog.tsx"
click node_restaurant_api "https://github.com/leonardondev/pizzashop-web/blob/main/src/api/get-managed-restaurant.ts"
click node_auth_api "https://github.com/leonardondev/pizzashop-web/tree/main/src/api"
click node_orders_page "https://github.com/leonardondev/pizzashop-web/blob/main/src/pages/app/orders/orders.tsx"
click node_order_row "https://github.com/leonardondev/pizzashop-web/blob/main/src/pages/app/orders/order-table-row.tsx"
click node_order_details "https://github.com/leonardondev/pizzashop-web/blob/main/src/pages/app/orders/order-details.tsx"
click node_order_api "https://github.com/leonardondev/pizzashop-web/tree/main/src/api"
click node_dashboard "https://github.com/leonardondev/pizzashop-web/blob/main/src/pages/app/dashboard/dashboard.tsx"
click node_metric_cards "https://github.com/leonardondev/pizzashop-web/tree/main/src/pages/app/dashboard"
click node_charts "https://github.com/leonardondev/pizzashop-web/tree/main/src/pages/app/dashboard"
click node_analytics_api "https://github.com/leonardondev/pizzashop-web/tree/main/src/api"
click node_axios "https://github.com/leonardondev/pizzashop-web/blob/main/src/lib/axios.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_app,node_router,node_app_layout,node_auth_layout toneBlue
class node_sign_in,node_sign_up,node_account_menu,node_store_profile toneAmber
class node_orders_page,node_order_row,node_order_details toneMint
class node_dashboard,node_metric_cards,node_charts toneRose
class node_restaurant_api,node_auth_api,node_order_api,node_analytics_api,node_axios,node_operator,node_backend toneIndigo
```

## Components

### Application shell

- [App provider](https://github.com/leonardondev/pizzashop-web/blob/main/src/App.tsx): `src/App.tsx`
- [Route dispatch](https://github.com/leonardondev/pizzashop-web/blob/main/src/routes.tsx): `src/routes.tsx`
- [Authenticated layout](https://github.com/leonardondev/pizzashop-web/blob/main/src/pages/_layouts/app.tsx): `src/pages/_layouts/app.tsx`
- [Auth layout](https://github.com/leonardondev/pizzashop-web/blob/main/src/pages/_layouts/auth.tsx): `src/pages/_layouts/auth.tsx`

### Account access

- [Sign in](https://github.com/leonardondev/pizzashop-web/blob/main/src/pages/auth/sign-in.tsx): `src/pages/auth/sign-in.tsx`
- [Restaurant signup](https://github.com/leonardondev/pizzashop-web/blob/main/src/pages/auth/sign-up.tsx): `src/pages/auth/sign-up.tsx`
- [Account menu](https://github.com/leonardondev/pizzashop-web/blob/main/src/components/account-menu.tsx): `src/components/account-menu.tsx`
- [Store profile editor](https://github.com/leonardondev/pizzashop-web/blob/main/src/components/store-profile-dialog.tsx): `src/components/store-profile-dialog.tsx`

### Order operations

- [Orders screen](https://github.com/leonardondev/pizzashop-web/blob/main/src/pages/app/orders/orders.tsx): `src/pages/app/orders/orders.tsx`
- [Order actions](https://github.com/leonardondev/pizzashop-web/blob/main/src/pages/app/orders/order-table-row.tsx): `src/pages/app/orders/order-table-row.tsx`
- [Order details](https://github.com/leonardondev/pizzashop-web/blob/main/src/pages/app/orders/order-details.tsx): `src/pages/app/orders/order-details.tsx`

### Sales insights

- [Dashboard](https://github.com/leonardondev/pizzashop-web/blob/main/src/pages/app/dashboard/dashboard.tsx): `src/pages/app/dashboard/dashboard.tsx`
- [Sales metrics](https://github.com/leonardondev/pizzashop-web/tree/main/src/pages/app/dashboard): `src/pages/app/dashboard`
- [Revenue and product charts](https://github.com/leonardondev/pizzashop-web/tree/main/src/pages/app/dashboard): `src/pages/app/dashboard`

### API transport

- [Restaurant profile API](https://github.com/leonardondev/pizzashop-web/blob/main/src/api/get-managed-restaurant.ts): `src/api/get-managed-restaurant.ts`
- [Account API](https://github.com/leonardondev/pizzashop-web/tree/main/src/api): `src/api`
- [Order API](https://github.com/leonardondev/pizzashop-web/tree/main/src/api): `src/api`
- [Analytics API](https://github.com/leonardondev/pizzashop-web/tree/main/src/api): `src/api`
- [HTTP client](https://github.com/leonardondev/pizzashop-web/blob/main/src/lib/axios.ts): `src/lib/axios.ts`

### Other components

- **Restaurant operator**
- **Restaurant service**

## Connections

- Restaurant operator → App provider: opens
- App provider → Route dispatch: provides (evidence: `src/App.tsx`)
- Route dispatch → Authenticated layout: routes to (evidence: `src/routes.tsx`)
- Route dispatch → Auth layout: routes to (evidence: `src/routes.tsx`)
- Route dispatch → Orders screen: routes to (evidence: `src/routes.tsx`)
- Route dispatch → Dashboard: routes to (evidence: `src/routes.tsx`)
- Route dispatch → Sign in: routes to (evidence: `src/routes.tsx`)
- Route dispatch → Restaurant signup: routes to (evidence: `src/routes.tsx`)
- Sign in → Account API: calls (evidence: `src/pages/auth/sign-in.tsx`)
- Restaurant signup → Account API: calls (evidence: `src/pages/auth/sign-up.tsx`)
- Account menu → Restaurant profile API: loads profile (evidence: `src/components/account-menu.tsx`)
- Account menu → Store profile editor: opens (evidence: `src/components/account-menu.tsx`)
- Store profile editor → Restaurant profile API: loads profile (evidence: `src/components/store-profile-dialog.tsx`)
- Store profile editor → Account API: updates profile (evidence: `src/components/store-profile-dialog.tsx`)
- Orders screen → Order actions: renders
- Order actions → Order API: loads and updates (evidence: `src/pages/app/orders/order-table-row.tsx`)
- Order actions → Order details: opens (evidence: `src/pages/app/orders/order-table-row.tsx`)
- Order details → Order API: loads details (evidence: `src/pages/app/orders/order-details.tsx`)
- Dashboard → Sales metrics: presents
- Dashboard → Revenue and product charts: presents
- Revenue and product charts → Analytics API: loads products (evidence: `src/pages/app/dashboard/popular-products-chart.tsx`)
- Restaurant profile API → HTTP client: uses (evidence: `src/api/get-managed-restaurant.ts`)
- Account API → HTTP client: uses (evidence: `src/api/get-orders.ts`)
- Order API → HTTP client: uses (evidence: `src/api/get-orders.ts`)
- Analytics API → HTTP client: uses (evidence: `src/api/get-orders.ts`)
- HTTP client → Restaurant service: sends requests
