# hiroyokii/gemmas-kitchenette architecture

> Architecture diagram of the GitHub repository hiroyokii/gemmas-kitchenette, 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/hiroyokii/gemmas-kitchenette
- Repository: https://github.com/hiroyokii/gemmas-kitchenette

## Overview

Gemma’s Kitchenette is a web food-ordering and business-management system. Customers browse the daily menu, build a cart, place pickup or delivery orders, choose COD or simulated GCash, and track orders; admins manage menus, food, inventory, purchases, orders, and reporting. The React client routes role-specific pages and calls an Express API; the API exposes domain routes and persists application data through Prisma/PostgreSQL. README capabilities fill in unsampled subsystems, but their internal call paths are not asserted here.

Main entry points: [`server/src/app.ts`](https://github.com/hiroyokii/gemmas-kitchenette/blob/main/server/src/app.ts) (Express API), [`client/src/routes/AppRoutes.tsx`](https://github.com/hiroyokii/gemmas-kitchenette/blob/main/client/src/routes/AppRoutes.tsx) (Role-based routes), [`server/src/lib/prisma.ts`](https://github.com/hiroyokii/gemmas-kitchenette/blob/main/server/src/lib/prisma.ts) (PostgreSQL database), [`client/src/pages/customer`](https://github.com/hiroyokii/gemmas-kitchenette/tree/main/client/src/pages/customer) (Customer pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_client_routes["Role-based routes<br/>[AppRoutes.tsx]"]
  node_customer_pages["Customer pages"]
  node_admin_pages["Admin pages"]
  node_client_auth["Session and auth<br/>[AuthProvider.tsx]"]
  node_client_api["API client<br/>[axios.ts]"]
  node_auth_service["Auth service<br/>[auth.service.ts]"]
  node_order_service["Order service<br/>[order.service.ts]"]
end

subgraph group_api["API and domain"]
  node_express_app["Express API<br/>[app.ts]"]
  node_auth_routes["Auth routes<br/>[auth.routes.ts]"]
  node_order_routes["Order routes<br/>[order.routes.ts]"]
  node_review_routes["Review routes<br/>[review.routes.ts]"]
  node_auth_controller["Auth controller<br/>[auth.controller.ts]"]
  node_order_controller["Order controller"]
  node_review_controller["Review controller"]
  node_auth_domain["Identity and access<br/>[auth.service.ts]"]
end

subgraph group_ops["Business operations"]
  node_order_domain["Ordering and payment<br/>[order.service.ts]"]
  node_review_domain["Reviews and ratings<br/>[review.service.ts]"]
  node_admin_domain["Menu and inventory"]
  node_reporting["Reports and monitoring"]
end

subgraph group_platform["Persistence and media"]
  node_database[("PostgreSQL database<br/>[prisma.ts]")]
  node_food_media[("Food image storage")]
end

node_customer(("Customer"))
node_admin(("Admin"))

node_customer -->|"browses and orders"| node_client_routes
node_admin -->|"manages operations"| node_client_routes
node_client_routes -->|"routes customer"| node_customer_pages
node_client_routes -->|"routes admin"| node_admin_pages
node_client_auth -->|"requests sessions"| node_auth_service
node_auth_service -->|"calls API"| node_client_api
node_order_service -->|"calls API"| node_client_api
node_client_api -.->|"sends requests"| node_express_app
node_express_app -->|"mounts"| node_auth_routes
node_express_app -->|"mounts"| node_order_routes
node_express_app -->|"mounts"| node_review_routes
node_auth_routes -->|"dispatches"| node_auth_controller
node_order_routes -->|"dispatches"| node_order_controller
node_review_routes -->|"dispatches"| node_review_controller
node_auth_controller -->|"calls"| node_auth_domain
node_order_controller -->|"calls"| node_order_domain
node_review_controller -->|"calls"| node_review_domain
node_admin_pages -.->|"manages"| node_admin_domain
node_admin_pages -.->|"views reports"| node_reporting
node_customer_pages -.->|"places and tracks"| node_order_domain
node_customer_pages -.->|"submits feedback"| node_review_domain
node_order_domain -.->|"persists orders"| node_database
node_review_domain -->|"stores ratings"| node_database
node_admin_domain -.->|"stores operations data"| node_database
node_reporting -.->|"reads business data"| node_database
node_admin_domain -.->|"uploads images"| node_food_media

click node_client_routes "https://github.com/hiroyokii/gemmas-kitchenette/blob/main/client/src/routes/AppRoutes.tsx"
click node_customer_pages "https://github.com/hiroyokii/gemmas-kitchenette/tree/main/client/src/pages/customer"
click node_admin_pages "https://github.com/hiroyokii/gemmas-kitchenette/tree/main/client/src/pages/admin"
click node_client_auth "https://github.com/hiroyokii/gemmas-kitchenette/blob/main/client/src/providers/AuthProvider.tsx"
click node_client_api "https://github.com/hiroyokii/gemmas-kitchenette/blob/main/client/src/api/axios.ts"
click node_auth_service "https://github.com/hiroyokii/gemmas-kitchenette/blob/main/client/src/services/auth.service.ts"
click node_order_service "https://github.com/hiroyokii/gemmas-kitchenette/blob/main/client/src/services/order.service.ts"
click node_express_app "https://github.com/hiroyokii/gemmas-kitchenette/blob/main/server/src/app.ts"
click node_auth_routes "https://github.com/hiroyokii/gemmas-kitchenette/blob/main/server/src/routes/auth.routes.ts"
click node_order_routes "https://github.com/hiroyokii/gemmas-kitchenette/blob/main/server/src/routes/order.routes.ts"
click node_review_routes "https://github.com/hiroyokii/gemmas-kitchenette/blob/main/server/src/routes/review.routes.ts"
click node_auth_controller "https://github.com/hiroyokii/gemmas-kitchenette/blob/main/server/src/controllers/auth.controller.ts"
click node_order_controller "https://github.com/hiroyokii/gemmas-kitchenette/blob/main/server/src/controllers/order.controller.ts"
click node_review_controller "https://github.com/hiroyokii/gemmas-kitchenette/blob/main/server/src/controllers/review.controller.ts"
click node_auth_domain "https://github.com/hiroyokii/gemmas-kitchenette/blob/main/server/src/services/auth.service.ts"
click node_order_domain "https://github.com/hiroyokii/gemmas-kitchenette/blob/main/server/src/services/order.service.ts"
click node_review_domain "https://github.com/hiroyokii/gemmas-kitchenette/blob/main/server/src/services/review.service.ts"
click node_admin_domain "https://github.com/hiroyokii/gemmas-kitchenette/tree/main/server/src"
click node_reporting "https://github.com/hiroyokii/gemmas-kitchenette/tree/main/server/src"
click node_database "https://github.com/hiroyokii/gemmas-kitchenette/blob/main/server/src/lib/prisma.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_client_routes,node_customer_pages,node_admin_pages,node_client_auth,node_client_api,node_auth_service,node_order_service toneBlue
class node_express_app,node_auth_routes,node_order_routes,node_review_routes,node_auth_controller,node_order_controller,node_review_controller,node_auth_domain toneAmber
class node_order_domain,node_review_domain,node_admin_domain,node_reporting toneMint
class node_database,node_food_media toneRose
class node_customer,node_admin toneIndigo
```

## Components

### Web client

- [Role-based routes](https://github.com/hiroyokii/gemmas-kitchenette/blob/main/client/src/routes/AppRoutes.tsx): `client/src/routes/AppRoutes.tsx`
- [Customer pages](https://github.com/hiroyokii/gemmas-kitchenette/tree/main/client/src/pages/customer): `client/src/pages/customer`
- [Admin pages](https://github.com/hiroyokii/gemmas-kitchenette/tree/main/client/src/pages/admin): `client/src/pages/admin`
- [Session and auth](https://github.com/hiroyokii/gemmas-kitchenette/blob/main/client/src/providers/AuthProvider.tsx): `client/src/providers/AuthProvider.tsx`
- [API client](https://github.com/hiroyokii/gemmas-kitchenette/blob/main/client/src/api/axios.ts): `client/src/api/axios.ts`
- [Auth service](https://github.com/hiroyokii/gemmas-kitchenette/blob/main/client/src/services/auth.service.ts): `client/src/services/auth.service.ts`
- [Order service](https://github.com/hiroyokii/gemmas-kitchenette/blob/main/client/src/services/order.service.ts): `client/src/services/order.service.ts`

### API and domain

- [Express API](https://github.com/hiroyokii/gemmas-kitchenette/blob/main/server/src/app.ts): `server/src/app.ts`
- [Auth routes](https://github.com/hiroyokii/gemmas-kitchenette/blob/main/server/src/routes/auth.routes.ts): `server/src/routes/auth.routes.ts`
- [Order routes](https://github.com/hiroyokii/gemmas-kitchenette/blob/main/server/src/routes/order.routes.ts): `server/src/routes/order.routes.ts`
- [Review routes](https://github.com/hiroyokii/gemmas-kitchenette/blob/main/server/src/routes/review.routes.ts): `server/src/routes/review.routes.ts`
- [Auth controller](https://github.com/hiroyokii/gemmas-kitchenette/blob/main/server/src/controllers/auth.controller.ts): `server/src/controllers/auth.controller.ts`
- [Order controller](https://github.com/hiroyokii/gemmas-kitchenette/blob/main/server/src/controllers/order.controller.ts): `server/src/controllers/order.controller.ts`
- [Review controller](https://github.com/hiroyokii/gemmas-kitchenette/blob/main/server/src/controllers/review.controller.ts): `server/src/controllers/review.controller.ts`
- [Identity and access](https://github.com/hiroyokii/gemmas-kitchenette/blob/main/server/src/services/auth.service.ts): `server/src/services/auth.service.ts`

### Business operations

- [Ordering and payment](https://github.com/hiroyokii/gemmas-kitchenette/blob/main/server/src/services/order.service.ts): `server/src/services/order.service.ts`
- [Reviews and ratings](https://github.com/hiroyokii/gemmas-kitchenette/blob/main/server/src/services/review.service.ts): `server/src/services/review.service.ts`
- [Menu and inventory](https://github.com/hiroyokii/gemmas-kitchenette/tree/main/server/src): `server/src`
- [Reports and monitoring](https://github.com/hiroyokii/gemmas-kitchenette/tree/main/server/src): `server/src`

### Persistence and media

- [PostgreSQL database](https://github.com/hiroyokii/gemmas-kitchenette/blob/main/server/src/lib/prisma.ts): `server/src/lib/prisma.ts`
- **Food image storage**

### Other components

- **Customer**
- **Admin**

## Connections

- Customer → Role-based routes: browses and orders
- Admin → Role-based routes: manages operations
- Role-based routes → Customer pages: routes customer (evidence: `client/src/routes/AppRoutes.tsx`)
- Role-based routes → Admin pages: routes admin (evidence: `client/src/routes/AppRoutes.tsx`)
- Session and auth → Auth service: requests sessions (evidence: `client/src/providers/AuthProvider.tsx`)
- Auth service → API client: calls API (evidence: `client/src/services/auth.service.ts`)
- Order service → API client: calls API (evidence: `client/src/services/order.service.ts`)
- API client → Express API: sends requests
- Express API → Auth routes: mounts (evidence: `server/src/app.ts`)
- Express API → Order routes: mounts (evidence: `server/src/app.ts`)
- Express API → Review routes: mounts (evidence: `server/src/app.ts`)
- Auth routes → Auth controller: dispatches (evidence: `server/src/routes/auth.routes.ts`)
- Order routes → Order controller: dispatches (evidence: `server/src/routes/order.routes.ts`)
- Review routes → Review controller: dispatches (evidence: `server/src/routes/review.routes.ts`)
- Auth controller → Identity and access: calls (evidence: `server/src/controllers/auth.controller.ts`)
- Order controller → Ordering and payment: calls (evidence: `server/src/controllers/order.controller.ts`)
- Review controller → Reviews and ratings: calls (evidence: `server/src/controllers/review.controller.ts`)
- Admin pages → Menu and inventory: manages
- Admin pages → Reports and monitoring: views reports
- Customer pages → Ordering and payment: places and tracks
- Customer pages → Reviews and ratings: submits feedback
- Ordering and payment → PostgreSQL database: persists orders
- Reviews and ratings → PostgreSQL database: stores ratings (evidence: `server/src/services/review.service.ts`)
- Menu and inventory → PostgreSQL database: stores operations data (evidence: `server/src/services/review.service.ts`)
- Reports and monitoring → PostgreSQL database: reads business data (evidence: `server/src/services/review.service.ts`)
- Menu and inventory → Food image storage: uploads images
